Protobuf messages

Miscellaneous proto

evmos.proto.bytes_to_access_list_tx(binary_data: bytes) AccessListTx[source]

Deserialize evmos.proto.autogen.py.ethermint.evm.v1.AccessListTx.

evmos.proto.bytes_to_auth_info(binary_data: bytes) AuthInfo[source]

Deserialize evmos.proto.autogen.py.cosmos.tx.v1beta1.AuthInfo.

evmos.proto.bytes_to_dynamic_fee_tx(binary_data: bytes) DynamicFeeTx[source]

Deserialize evmos.proto.autogen.py.ethermint.evm.v1.DynamicFeeTx.

evmos.proto.bytes_to_legacy_tx(binary_data: bytes) LegacyTx[source]

Deserialize evmos.proto.autogen.py.ethermint.evm.v1.LegacyTx.

evmos.proto.bytes_to_msg_ethereum_tx(binary_data: bytes) MsgEthereumTx[source]

Deserialize evmos.proto.autogen.py.ethermint.evm.v1.MsgEthereumTx.

evmos.proto.bytes_to_tx_body(binary_data: bytes) TxBody[source]

Deserialize evmos.proto.autogen.py.cosmos.tx.v1beta1.TxBody.

evmos.proto.bytes_to_tx_raw(binary_data: bytes) TxRaw[source]

Deserialize evmos.proto.autogen.py.cosmos.tx.v1beta1.TxRaw.

evmos.proto.create_ibc_msg_transfer(source_port: str, source_channel: str, amount: str, denom: str, sender: str, receiver: str, revision_number: int, revision_height: int, timeout_timestamp: str) MessageGenerated[MsgTransfer][source]

Create message for IBC transfer.

evmos.proto.create_msg_send(from_address: str, to_address: str, amount: str, denom: str) MessageGenerated[MsgSend][source]

Create MessageGenerated for given args.

evmos.proto.create_msg_vote(proposal_id: int, option: int | evmos.proto.autogen.py.cosmos.gov.v1beta1.VoteOption, sender: str) MessageGenerated[MsgVote][source]

Create voting message.

evmos.proto.create_tx_raw(body_bytes: bytes, auth_info_bytes: bytes, signatures: Sequence[bytes]) MessageGenerated[TxRaw][source]

Create message with raw transaction.

evmos.proto.create_web3_extension(chain_id: int, fee_payer: str, fee_payer_sig: bytes) MessageGenerated[ExtensionOptionsWeb3Tx][source]

Create web3 extension options message.

AUTHZ proto

class evmos.proto.authz.RevokeMessages(value)[source]

Bases: str, Enum

Revoke message paths.

REVOKE_MSG_DELEGATE = '/cosmos.staking.v1beta1.MsgDelegate'

Revoke delegate message path.

REVOKE_MSG_WITHDRAW_DELEGATOR_REWARDS = '/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward'

Revoke delegate and withdraw rewards message path.

evmos.proto.authz.StakeAuthTypes

Alias for evmos.proto.autogen.py.cosmos.staking.v1beta1.AuthorizationType

evmos.proto.authz.create_msg_grant(granter: str, grantee: str, grant_message: MessageGenerated[Message], seconds: int) MessageGenerated[MsgGrant][source]

Create grant message.

evmos.proto.authz.create_msg_revoke(granter: str, grantee: str, type: str | evmos.proto.authz.RevokeMessages) MessageGenerated[MsgRevoke][source]

Create revoke message.

evmos.proto.authz.create_stake_authorization(allow_address: str, denom: str, max_tokens: str | None, authorization_type: AuthorizationType) MessageGenerated[StakeAuthorization][source]

Create staking authorization message.

ERC20 proto

evmos.proto.erc20.create_msg_convert_coin(denom: str, amount: str, receiver: str, sender: str) MessageGenerated[MsgConvertCoin][source]

Create message for coin conversion.

evmos.proto.erc20.create_msg_convert_erc20(contract_address: str, amount: str, receiver: str, sender: str) MessageGenerated[MsgConvertErc20][source]

Create message for ERC20 conversion.

Revenue proto

evmos.proto.revenue.create_msg_cancel_revenue(contract_address: str, deployer_address: str) MessageGenerated[MsgCancelRevenue][source]

Create a message for revenue cancellation.

evmos.proto.revenue.create_msg_register_revenue(contract_address: str, deployer_address: str, withdrawer_address: str, nonces: Sequence[int]) MessageGenerated[MsgRegisterRevenue][source]

Create a message for revenue registration.

evmos.proto.revenue.create_msg_update_revenue(contract_address: str, deployer_address: str, withdrawer_address: str) MessageGenerated[MsgUpdateRevenue][source]

Create a message for revenue update.

Staking proto

evmos.proto.staking.create_msg_begin_redelegate(delegator_address: str, validator_src_address: str, validator_dst_address: str, amount: str, denom: str) MessageGenerated[MsgBeginRedelegate][source]

Create a message for staking redelegation.

evmos.proto.staking.create_msg_delegate(delegator_address: str, validator_address: str, amount: str, denom: str) MessageGenerated[MsgDelegate][source]

Create a message for staking delegation.

evmos.proto.staking.create_msg_set_withdraw_address(delegator_address: str, withdraw_address: str) MessageGenerated[MsgSetWithdrawAddress][source]

Create a message for withdrawal address setting.

evmos.proto.staking.create_msg_undelegate(delegator_address: str, validator_address: str, amount: str, denom: str) MessageGenerated[MsgUndelegate][source]

Create a message for staking undelegation.

evmos.proto.staking.create_msg_withdraw_delegator_reward(delegator_address: str, validator_address: str) MessageGenerated[MsgWithdrawDelegatorReward][source]

Create a message for delegator rewards withdrawal.

evmos.proto.staking.create_msg_withdraw_validator_commission(validator_address: str) MessageGenerated[MsgWithdrawValidatorCommission][source]

Create a message for validator commission withdrawal.

Transactions proto

class evmos.proto.transactions.TxGeneratedBase(sign_direct: TxGeneratedSignInfo, legacy_amino: TxGeneratedSignInfo)[source]

Bases: object

Transaction generated by this library.

legacy_amino: TxGeneratedSignInfo

Data to sign (intended for use with EIP712 signing).

sign_direct: TxGeneratedSignInfo

Data to sign directly (intended for keplr-style signing).

class evmos.proto.transactions.TxGeneratedSignInfo(body: TxBody, auth_info: AuthInfo, sign_bytes: HexStr)[source]

Bases: object

Type of TxGenerated fields.

auth_info: AuthInfo

Transaction authentication info.

body: TxBody

Transaction body.

sign_bytes: HexStr

Raw bytes for signing as hex string.

evmos.proto.transactions.create_auth_info(signer_info: SignerInfo, fee: Fee) AuthInfo[source]

Create an AuthInfo instance.

Create AuthInfo with provided parameters.

evmos.proto.transactions.create_body(message: Any, memo: str) TxBody[source]

Create a TxBody instance.

Create TxBody with single message provided.

evmos.proto.transactions.create_body_with_multiple_messages(messages: Sequence[Any], memo: str) TxBody[source]

Create a TxBody instance.

Create TxBody with multiple messages provided.

evmos.proto.transactions.create_fee(fee: str, denom: str, gas_limit: int) Fee[source]

Create a Fee instance.

Create Fee with provided parameters.

evmos.proto.transactions.create_sig_doc(body_bytes: bytes, auth_info_bytes: bytes, chain_id: str, account_number: int) SignDoc[source]

Create a SignDoc instance.

Create SignDoc with provided parameters.

evmos.proto.transactions.create_signer_info(algo: str, public_key: bytes, sequence: int, mode: int | evmos.proto.autogen.py.cosmos.tx.signing.v1beta1.SignMode) SignerInfo[source]

Create a SignerInfo instance.

Create SignerInfo with provided parameters.

evmos.proto.transactions.create_transaction(message: Any, memo: str, fee: str, denom: str, gas_limit: int, algo: str, pub_key: str, sequence: int, account_number: int, chain_id: str) TxGeneratedBase[source]

Create transaction parameters with a single message.

evmos.proto.transactions.create_transaction_with_multiple_messages(messages: Any, memo: str, fee: str, denom: str, gas_limit: int, algo: str, pub_key: str, sequence: int, account_number: int, chain_id: str) TxGeneratedBase[source]

Create transaction parameters with multiple messages.

Validators proto

evmos.proto.validator.create_msg_edit_validator(*, moniker: str | None, identity: str | None, website: str | None, security_contact: str | None, details: str | None, validator_address: str, commission_rate: str | None, min_self_delegation: str | None) MessageGenerated[MsgEditValidator][source]

Create message for validator editing.

Utility functions

class evmos.proto.utils.MessageGenerated(message: _M, path: str)[source]

Bases: Generic[_M]

Structure of message generated by our library.

message: _M

Actual message instance.

path: str

Path where this was generated inside the library.

evmos.proto.utils.create_any_message(msg: MessageGenerated[Message]) Any[source]

Wrap message (coerced to binary) with convenience wrapper.

Returns

Any