Vesting

Solidity Interface & ABIarrow-up-right

ICS20.sol, formerly known as IBCTransfer.sol, provides an interface for Solidity contracts to engage with the IBC protocol on the Ego chain. This streamlines development for developers, eliminating the need for in-depth understanding of the implementation intricacies of the transfer module in IBC-go. Instead, they can conduct IBC transfers using the Ethereum interface they are accustomed to. An example of a straightforward implementation is available in the Egaxd/extensions repository.

Interface ICS20.solarrow-up-right

Find the Solidity interface in the Egaxd/extensions repo.

Find the ABI in the Egaxd/extensions repo.

Transactionsarrow-up-right

  • approve

    /// @dev Approves IBC transfer with a specific amount of tokens.
    /// @param spender spender The address which will spend the funds.
    /// @param allocations The allocations for the authorization.
    function approve(
        address spender,
        Allocation[] calldata allocations
    ) external returns (bool approved);
  • revoke

    /// @dev Revokes IBC transfer authorization for a specific spender
    /// @param spender The address which will spend the funds.
    function revoke(address spender) external returns (bool revoked);
  • increaseAllowance

    /// @dev Increase the allowance of a given spender by a specific amount of tokens and IBC connection for IBC transfer methods.
    /// @param spender The address which will spend the funds.
    /// @param sourcePort The source port of the IBC transaction.
    /// @param sourceChannel The source channel of the IBC transaction.
    /// @param denom The denomination of the tokens transferred.
    /// @param amount The amount of tokens to be spent.
    function increaseAllowance(
        address spender,
        string calldata sourcePort,
        string calldata sourceChannel,
        string calldata denom,
        uint256 amount
    ) external returns (bool approved);
  • decreaseAllowance

    /// @dev Decreases the allowance of a given spender by a specific amount of tokens for for IBC transfer methods.
    /// @param spender The address which will spend the funds.
    /// @param sourcePort The source port of the IBC transaction.
    /// @param sourceChannel The source channel of the IBC transaction.
    /// @param denom The denomination of the tokens transferred.
    /// @param amount The amount of tokens to be spent.
    function decreaseAllowance(
        address spender,
        string calldata sourcePort,
        string calldata sourceChannel,
        string calldata denom,
        uint256 amount
    ) external returns (bool approved);
  • transfer

    /// @dev Transfer defines a method for performing an IBC transfer.
    /// @param sourcePort the address of the validator
    /// @param sourceChannel the address of the validator
    /// @param denom the denomination of the Coin to be transferred to the receiver
    /// @param amount the amount of the Coin to be transferred to the receiver
    /// @param sender the hex address of the sender
    /// @param receiver the bech32 address of the receiver
    /// @param timeoutHeight the bech32 address of the receiver
    /// @param timeoutTimestamp the bech32 address of the receiver
    /// @param memo the bech32 address of the receiver
    function transfer(
        string memory sourcePort,
        string memory sourceChannel,
        string memory denom,
        uint256 amount,
        address sender,
        string memory receiver,
        Height memory timeoutHeight,
        uint64 timeoutTimestamp,
        string memory memo
    ) external returns (uint64 nextSequence);

  • denomTrace

  • denomTraces

  • denomHash

  • allowance

Each of the transactions emits its corresponding event. These are:

  • IBCTransfer

  • IBCTransferAuthorization

  • RevokeIBCTransferAuthorization

  • AllowanceChange

Last updated