[][src]Attribute Macro owasm_abi_derive::eth_abi

#[eth_abi]

Derive of the Ethereum/Solidity ABI for the given trait interface.

The first parameter represents the identifier of the generated endpoint implementation. The seconds parameter is optional and represents the identifier of the generated client implementation.

System Description

Endpoint

Converts ABI encoded payload into a called function with its parameters.

Client

Opposite of an endpoint that allows users (clients) to build up queries in the form of a payload to functions of a contract by a generated interface.

Example: Using just one argument

#[eth_abi(Endpoint)]
trait Contract { }

Creates an endpoint implementation named Endpoint for the interface defined in the Contract trait.

Example: Using two arguments

#[eth_abi(Endpoint2, Client2)]
trait Contract2 { }

Creates an endpoint implementation named Endpoint2 and a client implementation named Client2 for the interface defined in the Contract2 trait.