ICosmos
interface defines a set of functions for interacting with the Cosmos blockchain from an Ethereum Virtual Machine (EVM) environment. It includes functions for address conversion, querying, and executing Cosmos messages.
COSMOS_ADDRESS
Cosmos
precompile contract.
COSMOS_CONTRACT
is_blocked_address
Name | Type | Description |
---|---|---|
account | address | The address to check |
Type | Description |
---|---|
bool | true if the address is blocked, false otherwise |
is_module_address
Name | Type | Description |
---|---|---|
account | address | The address to check |
Type | Description |
---|---|
bool | true if the address is a module account, false otherwise |
to_cosmos_address
Name | Type | Description |
---|---|---|
evm_address | address | The EVM address to convert |
Type | Description |
---|---|
string memory | The corresponding Cosmos address |
to_evm_address
Name | Type | Description |
---|---|---|
cosmos_address | string memory | The Cosmos address to convert |
Type | Description |
---|---|
address | The corresponding EVM address |
to_denom
Name | Type | Description |
---|---|---|
erc20_address | address | The ERC20 address to convert |
Type | Description |
---|---|
string memory | The corresponding Cosmos denom |
to_erc20
Name | Type | Description |
---|---|---|
denom | string memory | The Cosmos denom to convert |
Type | Description |
---|---|
address | The corresponding ERC20 address |
execute_cosmos
Name | Type | Description |
---|---|---|
msg | string memory | The Cosmos message in JSON format |
Type | Description |
---|---|
bool | Dummy return value |
query_cosmos
Name | Type | Description |
---|---|---|
path | string memory | The query path |
req | string memory | The query request in JSON format |
Type | Description |
---|---|
string memory | The query result in JSON format |