diff --git a/bindings/cosmos/precompile/relayer/i_relayer_module.abigen.go b/bindings/cosmos/precompile/relayer/i_relayer_module.abigen.go index 44c2013ab2..dd5c802d58 100644 --- a/bindings/cosmos/precompile/relayer/i_relayer_module.abigen.go +++ b/bindings/cosmos/precompile/relayer/i_relayer_module.abigen.go @@ -43,7 +43,7 @@ type IRelayerModulePacketData struct { // RelayerModuleMetaData contains all meta data concerning the RelayerModule contract. var RelayerModuleMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcPort\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcChannel\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetDstPort\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetChannelOrdering\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetConnection\",\"type\":\"string\"}],\"name\":\"AcknowledgePacket\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"burner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"portId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyPortId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyChannelId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"}],\"name\":\"ChannelCloseConfirm\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"portId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyPortId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyChannelId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"}],\"name\":\"ChannelCloseInit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"ChannelClosed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"portId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyPortId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyChannelId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"}],\"name\":\"ChannelOpenAck\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"portId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyPortId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyChannelId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"}],\"name\":\"ChannelOpenConfirm\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"portId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyPortId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyChannelId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"ChannelOpenInit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"portId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyPortId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyChannelId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"ChannelOpenTry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"CoinReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"CoinSpent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"Coinbase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyClientId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyConnectionId\",\"type\":\"string\"}],\"name\":\"ConnectionOpenAck\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyClientId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyConnectionId\",\"type\":\"string\"}],\"name\":\"ConnectionOpenConfirm\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyClientId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyConnectionId\",\"type\":\"string\"}],\"name\":\"ConnectionOpenInit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyClientId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyConnectionId\",\"type\":\"string\"}],\"name\":\"ConnectionOpenTry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientType\",\"type\":\"string\"}],\"name\":\"CreateClient\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"name\":\"DenominationTrace\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FungibleTokenPacket\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"IbcTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Message\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"sender\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structIRelayerModule.PacketData\",\"name\":\"packetData\",\"type\":\"tuple\"}],\"name\":\"RecvPacket\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"subjectId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientType\",\"type\":\"string\"}],\"name\":\"SubmitMisbehaviour\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"refundReceiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"refundDenom\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Timeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcPort\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcChannel\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetDstPort\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetChannelOrdering\",\"type\":\"string\"}],\"name\":\"TimeoutPacket\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientType\",\"type\":\"string\"}],\"name\":\"UpdateClient\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientType\",\"type\":\"string\"}],\"name\":\"UpgradeClient\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetConnection\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"sender\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structIRelayerModule.PacketData\",\"name\":\"packetData\",\"type\":\"tuple\"}],\"name\":\"WriteAcknowledgement\",\"type\":\"event\"}]", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcPort\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcChannel\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetDstPort\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetChannelOrdering\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetConnection\",\"type\":\"string\"}],\"name\":\"AcknowledgePacket\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"burner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"portId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyPortId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyChannelId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"}],\"name\":\"ChannelCloseConfirm\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"portId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyPortId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyChannelId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"}],\"name\":\"ChannelCloseInit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"ChannelClosed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"portId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyPortId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyChannelId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"}],\"name\":\"ChannelOpenAck\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"portId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyPortId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyChannelId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"}],\"name\":\"ChannelOpenConfirm\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"portId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyPortId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyChannelId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"ChannelOpenInit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"portId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"channelId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyPortId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyChannelId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"ChannelOpenTry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"CoinReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"CoinSpent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"Coinbase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyClientId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyConnectionId\",\"type\":\"string\"}],\"name\":\"ConnectionOpenAck\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyClientId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyConnectionId\",\"type\":\"string\"}],\"name\":\"ConnectionOpenConfirm\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyClientId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyConnectionId\",\"type\":\"string\"}],\"name\":\"ConnectionOpenInit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"counterpartyClientId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"counterpartyConnectionId\",\"type\":\"string\"}],\"name\":\"ConnectionOpenTry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientType\",\"type\":\"string\"}],\"name\":\"CreateClient\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"name\":\"DenominationTrace\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"fee\",\"type\":\"string\"}],\"name\":\"DistributeFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FungibleTokenPacket\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"IbcTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Message\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"sender\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structIRelayerModule.PacketData\",\"name\":\"packetData\",\"type\":\"tuple\"}],\"name\":\"RecvPacket\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"subjectId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientType\",\"type\":\"string\"}],\"name\":\"SubmitMisbehaviour\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"refundReceiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"refundDenom\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Timeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcPort\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcChannel\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetDstPort\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetChannelOrdering\",\"type\":\"string\"}],\"name\":\"TimeoutPacket\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientType\",\"type\":\"string\"}],\"name\":\"UpdateClient\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientId\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"clientType\",\"type\":\"string\"}],\"name\":\"UpgradeClient\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetConnection\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"sender\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structIRelayerModule.PacketData\",\"name\":\"packetData\",\"type\":\"tuple\"}],\"name\":\"WriteAcknowledgement\",\"type\":\"event\"}]", } // RelayerModuleABI is the input ABI used to generate the binding from. @@ -3005,6 +3005,159 @@ func (_RelayerModule *RelayerModuleFilterer) ParseDenominationTrace(log types.Lo return event, nil } +// RelayerModuleDistributeFeeIterator is returned from FilterDistributeFee and is used to iterate over the raw logs and unpacked data for DistributeFee events raised by the RelayerModule contract. +type RelayerModuleDistributeFeeIterator struct { + Event *RelayerModuleDistributeFee // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *RelayerModuleDistributeFeeIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(RelayerModuleDistributeFee) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(RelayerModuleDistributeFee) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *RelayerModuleDistributeFeeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *RelayerModuleDistributeFeeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// RelayerModuleDistributeFee represents a DistributeFee event raised by the RelayerModule contract. +type RelayerModuleDistributeFee struct { + Receiver common.Address + Fee common.Hash + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDistributeFee is a free log retrieval operation binding the contract event 0x67e2bceb7881996b4bbddf9ab5d5c9bceb0ace3a06538b5e40be96094c4c9a72. +// +// Solidity: event DistributeFee(address indexed receiver, string indexed fee) +func (_RelayerModule *RelayerModuleFilterer) FilterDistributeFee(opts *bind.FilterOpts, receiver []common.Address, fee []string) (*RelayerModuleDistributeFeeIterator, error) { + + var receiverRule []interface{} + for _, receiverItem := range receiver { + receiverRule = append(receiverRule, receiverItem) + } + var feeRule []interface{} + for _, feeItem := range fee { + feeRule = append(feeRule, feeItem) + } + + logs, sub, err := _RelayerModule.contract.FilterLogs(opts, "DistributeFee", receiverRule, feeRule) + if err != nil { + return nil, err + } + return &RelayerModuleDistributeFeeIterator{contract: _RelayerModule.contract, event: "DistributeFee", logs: logs, sub: sub}, nil +} + +// WatchDistributeFee is a free log subscription operation binding the contract event 0x67e2bceb7881996b4bbddf9ab5d5c9bceb0ace3a06538b5e40be96094c4c9a72. +// +// Solidity: event DistributeFee(address indexed receiver, string indexed fee) +func (_RelayerModule *RelayerModuleFilterer) WatchDistributeFee(opts *bind.WatchOpts, sink chan<- *RelayerModuleDistributeFee, receiver []common.Address, fee []string) (event.Subscription, error) { + + var receiverRule []interface{} + for _, receiverItem := range receiver { + receiverRule = append(receiverRule, receiverItem) + } + var feeRule []interface{} + for _, feeItem := range fee { + feeRule = append(feeRule, feeItem) + } + + logs, sub, err := _RelayerModule.contract.WatchLogs(opts, "DistributeFee", receiverRule, feeRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(RelayerModuleDistributeFee) + if err := _RelayerModule.contract.UnpackLog(event, "DistributeFee", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDistributeFee is a log parse operation binding the contract event 0x67e2bceb7881996b4bbddf9ab5d5c9bceb0ace3a06538b5e40be96094c4c9a72. +// +// Solidity: event DistributeFee(address indexed receiver, string indexed fee) +func (_RelayerModule *RelayerModuleFilterer) ParseDistributeFee(log types.Log) (*RelayerModuleDistributeFee, error) { + event := new(RelayerModuleDistributeFee) + if err := _RelayerModule.contract.UnpackLog(event, "DistributeFee", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // RelayerModuleFungibleTokenPacketIterator is returned from FilterFungibleTokenPacket and is used to iterate over the raw logs and unpacked data for FungibleTokenPacket events raised by the RelayerModule contract. type RelayerModuleFungibleTokenPacketIterator struct { Event *RelayerModuleFungibleTokenPacket // Event containing the contract specifics and raw log diff --git a/contracts/src/Relayer.sol b/contracts/src/Relayer.sol index 53eac97094..daf16a8aa2 100644 --- a/contracts/src/Relayer.sol +++ b/contracts/src/Relayer.sol @@ -137,6 +137,11 @@ interface IRelayerModule { ); event ChannelClosed(); event DenominationTrace(string indexed denom); + // 29-fee + event DistributeFee( + address indexed receiver, + string indexed fee + ); // Bank event Transfer( address indexed recipient, diff --git a/integration_tests/contracts/contracts/Relayer.sol b/integration_tests/contracts/contracts/Relayer.sol index 53eac97094..daf16a8aa2 100644 --- a/integration_tests/contracts/contracts/Relayer.sol +++ b/integration_tests/contracts/contracts/Relayer.sol @@ -137,6 +137,11 @@ interface IRelayerModule { ); event ChannelClosed(); event DenominationTrace(string indexed denom); + // 29-fee + event DistributeFee( + address indexed receiver, + string indexed fee + ); // Bank event Transfer( address indexed recipient, diff --git a/integration_tests/test_ibc_rly.py b/integration_tests/test_ibc_rly.py index 162f2a95d8..e1d0530507 100644 --- a/integration_tests/test_ibc_rly.py +++ b/integration_tests/test_ibc_rly.py @@ -139,6 +139,13 @@ def coin_spent(spender, amt, denom): } +def distribute_fee(receiver, fee): + return { + "receiver": receiver, + "fee": keccak(text=fee), + } + + def fungible(dst, src, amt, denom): return { "receiver": dst, @@ -275,6 +282,7 @@ def test_ibc_incentivized_transfer(ibc): amount = ibc_incentivized_transfer(ibc) logs = get_logs(w3, start) fee_denom = "ibcfee" + fee = f"{src_amount}{fee_denom}" transfer_denom = "transfer/channel-0/basetcro" dst_adr = ibc.chainmain.cosmos_cli().address("signer2") src_relayer = ADDRS["signer1"] @@ -284,8 +292,11 @@ def test_ibc_incentivized_transfer(ibc): expected = [ update_client(), acknowledge_packet(), + distribute_fee(src_relayer, fee), *send_coins(feeibc_addr, src_relayer, src_amount, fee_denom), + distribute_fee(src_relayer, fee), *send_coins(feeibc_addr, src_relayer, src_amount, fee_denom), + distribute_fee(cronos_signer2, fee), *send_coins(feeibc_addr, cronos_signer2, src_amount, fee_denom), fungible(checksum_dst_adr, cronos_signer2, amount, dst_denom), update_client(),