diff --git a/Makefile b/Makefile index 92980c2e..0c7ee63d 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ distclean: clean ### Protobuf ### ############################################################################### -protoVer=0.11.2 +protoVer=0.13.0 protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) @@ -120,3 +120,29 @@ format: benchmark: @go test -mod=readonly -bench=. ./... + +############################################################################### +### Compile Solidity Contracts ### +############################################################################### + +CONTRACTS_DIR := contracts +COMPILED_DIR := $(CONTRACTS_DIR)/compiled_contracts + +# Compile and format solidity contracts for the erc20 module. Also install +# openzeppeling as the contracts are build on top of openzeppelin templates. +contracts-compile: contracts-clean dep-install create-contracts-abi + +# Install openzeppelin solidity contracts +dep-install: + @echo "Importing openzeppelin contracts..." + @cd $(CONTRACTS_DIR) && \ + npm install + +# Clean tmp files +contracts-clean: + @rm -rf $(CONTRACTS_DIR)/node_modules + +# Compile, filter out and format contracts into the following format. +create-contracts-abi: + solc --combined-json abi,bin --evm-version paris --include-path $(CONTRACTS_DIR)/node_modules --base-path ./contracts ./contracts/Token.sol | jq '.contracts["Token.sol:Token"]' > $(COMPILED_DIR)/Token.json + diff --git a/api/irismod/coinswap/coinswap.pulsar.go b/api/irismod/coinswap/coinswap.pulsar.go index cd30b8fb..c30c5720 100644 --- a/api/irismod/coinswap/coinswap.pulsar.go +++ b/api/irismod/coinswap/coinswap.pulsar.go @@ -2621,19 +2621,19 @@ var file_irismod_coinswap_coinswap_proto_rawDesc = []byte{ 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x16, 0x75, 0x6e, 0x69, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x3a, 0x08, - 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xbb, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, - 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x77, 0x61, - 0x70, 0x42, 0x0d, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x77, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, - 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x73, - 0x77, 0x61, 0x70, 0xa2, 0x02, 0x03, 0x49, 0x43, 0x58, 0xaa, 0x02, 0x10, 0x49, 0x72, 0x69, 0x73, - 0x6d, 0x6f, 0x64, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x77, 0x61, 0x70, 0xca, 0x02, 0x10, 0x49, - 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x77, 0x61, 0x70, 0xe2, - 0x02, 0x1c, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x77, - 0x61, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x11, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x77, - 0x61, 0x70, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xbb, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, + 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x63, 0x6f, 0x69, + 0x6e, 0x73, 0x77, 0x61, 0x70, 0x42, 0x0d, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x77, 0x61, 0x70, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, + 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x63, + 0x6f, 0x69, 0x6e, 0x73, 0x77, 0x61, 0x70, 0xa2, 0x02, 0x03, 0x49, 0x43, 0x58, 0xaa, 0x02, 0x10, + 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x77, 0x61, 0x70, + 0xca, 0x02, 0x10, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x43, 0x6f, 0x69, 0x6e, 0x73, + 0x77, 0x61, 0x70, 0xe2, 0x02, 0x1c, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x43, 0x6f, + 0x69, 0x6e, 0x73, 0x77, 0x61, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x11, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x43, 0x6f, + 0x69, 0x6e, 0x73, 0x77, 0x61, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/irismod/coinswap/tx.pulsar.go b/api/irismod/coinswap/tx.pulsar.go index 8826a56e..a0002c33 100644 --- a/api/irismod/coinswap/tx.pulsar.go +++ b/api/irismod/coinswap/tx.pulsar.go @@ -7189,19 +7189,19 @@ var file_irismod_coinswap_tx_proto_rawDesc = []byte{ 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x29, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x77, 0x61, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xb5, 0x01, 0x0a, 0x14, - 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x63, 0x6f, 0x69, 0x6e, - 0x73, 0x77, 0x61, 0x70, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, - 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x77, 0x61, 0x70, - 0xa2, 0x02, 0x03, 0x49, 0x43, 0x58, 0xaa, 0x02, 0x10, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x77, 0x61, 0x70, 0xca, 0x02, 0x10, 0x49, 0x72, 0x69, 0x73, - 0x6d, 0x6f, 0x64, 0x5c, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x77, 0x61, 0x70, 0xe2, 0x02, 0x1c, 0x49, - 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x77, 0x61, 0x70, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x49, 0x72, - 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x77, 0x61, 0x70, 0xc8, - 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xb5, 0x01, 0xc8, 0xe1, + 0x1e, 0x00, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, + 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x77, 0x61, 0x70, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x63, 0x6f, 0x69, 0x6e, + 0x73, 0x77, 0x61, 0x70, 0xa2, 0x02, 0x03, 0x49, 0x43, 0x58, 0xaa, 0x02, 0x10, 0x49, 0x72, 0x69, + 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x77, 0x61, 0x70, 0xca, 0x02, 0x10, + 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x77, 0x61, 0x70, + 0xe2, 0x02, 0x1c, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x43, 0x6f, 0x69, 0x6e, 0x73, + 0x77, 0x61, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x11, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x43, 0x6f, 0x69, 0x6e, 0x73, + 0x77, 0x61, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/irismod/farm/farm.pulsar.go b/api/irismod/farm/farm.pulsar.go index 4431c535..398be638 100644 --- a/api/irismod/farm/farm.pulsar.go +++ b/api/irismod/farm/farm.pulsar.go @@ -5224,17 +5224,17 @@ var file_irismod_farm_farm_proto_rawDesc = []byte{ 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x66, 0x75, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x42, 0x6f, 0x6e, 0x64, 0x3a, - 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0x9f, 0x01, 0x0a, 0x10, 0x63, 0x6f, - 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x66, 0x61, 0x72, 0x6d, 0x42, 0x09, - 0x46, 0x61, 0x72, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, - 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, - 0x6d, 0x6f, 0x64, 0x2f, 0x66, 0x61, 0x72, 0x6d, 0xa2, 0x02, 0x03, 0x49, 0x46, 0x58, 0xaa, 0x02, - 0x0c, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x46, 0x61, 0x72, 0x6d, 0xca, 0x02, 0x0c, - 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x46, 0x61, 0x72, 0x6d, 0xe2, 0x02, 0x18, 0x49, - 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x46, 0x61, 0x72, 0x6d, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, - 0x64, 0x3a, 0x3a, 0x46, 0x61, 0x72, 0x6d, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0x9f, 0x01, 0xc8, 0xe1, 0x1e, 0x00, + 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x66, 0x61, + 0x72, 0x6d, 0x42, 0x09, 0x46, 0x61, 0x72, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, + 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x66, 0x61, 0x72, 0x6d, 0xa2, 0x02, 0x03, 0x49, + 0x46, 0x58, 0xaa, 0x02, 0x0c, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x46, 0x61, 0x72, + 0x6d, 0xca, 0x02, 0x0c, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x46, 0x61, 0x72, 0x6d, + 0xe2, 0x02, 0x18, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x46, 0x61, 0x72, 0x6d, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x49, 0x72, + 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x46, 0x61, 0x72, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/api/irismod/farm/tx.pulsar.go b/api/irismod/farm/tx.pulsar.go index ae372636..c5cf78c6 100644 --- a/api/irismod/farm/tx.pulsar.go +++ b/api/irismod/farm/tx.pulsar.go @@ -9099,16 +9099,16 @@ var file_irismod_farm_tx_proto_rawDesc = []byte{ 0x6d, 0x73, 0x1a, 0x25, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x66, 0x61, 0x72, 0x6d, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, - 0x42, 0x9d, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, - 0x2e, 0x66, 0x61, 0x72, 0x6d, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, - 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x66, 0x61, 0x72, 0x6d, 0xa2, 0x02, 0x03, - 0x49, 0x46, 0x58, 0xaa, 0x02, 0x0c, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x46, 0x61, - 0x72, 0x6d, 0xca, 0x02, 0x0c, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x46, 0x61, 0x72, - 0x6d, 0xe2, 0x02, 0x18, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x46, 0x61, 0x72, 0x6d, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x49, - 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x46, 0x61, 0x72, 0x6d, 0xc8, 0xe1, 0x1e, 0x00, + 0x42, 0x9d, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, + 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x66, 0x61, 0x72, 0x6d, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x66, 0x61, 0x72, + 0x6d, 0xa2, 0x02, 0x03, 0x49, 0x46, 0x58, 0xaa, 0x02, 0x0c, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, + 0x64, 0x2e, 0x46, 0x61, 0x72, 0x6d, 0xca, 0x02, 0x0c, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, + 0x5c, 0x46, 0x61, 0x72, 0x6d, 0xe2, 0x02, 0x18, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, + 0x46, 0x61, 0x72, 0x6d, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x0d, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x46, 0x61, 0x72, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/api/irismod/htlc/htlc.pulsar.go b/api/irismod/htlc/htlc.pulsar.go index f78f5623..1c783639 100644 --- a/api/irismod/htlc/htlc.pulsar.go +++ b/api/irismod/htlc/htlc.pulsar.go @@ -4684,17 +4684,17 @@ var file_irismod_htlc_htlc_proto_rawDesc = []byte{ 0x10, 0x01, 0x1a, 0x0c, 0x8a, 0x9d, 0x20, 0x08, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x55, 0x54, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x1a, 0x0c, 0x8a, 0x9d, 0x20, 0x08, 0x4f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x1a, 0x04, 0x88, 0xa3, - 0x1e, 0x00, 0x42, 0x9f, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, - 0x6f, 0x64, 0x2e, 0x68, 0x74, 0x6c, 0x63, 0x42, 0x09, 0x48, 0x74, 0x6c, 0x63, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x68, 0x74, 0x6c, - 0x63, 0xa2, 0x02, 0x03, 0x49, 0x48, 0x58, 0xaa, 0x02, 0x0c, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, - 0x64, 0x2e, 0x48, 0x74, 0x6c, 0x63, 0xca, 0x02, 0x0c, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, - 0x5c, 0x48, 0x74, 0x6c, 0x63, 0xe2, 0x02, 0x18, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, - 0x48, 0x74, 0x6c, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x0d, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x48, 0x74, 0x6c, 0x63, - 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x1e, 0x00, 0x42, 0x9f, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x69, + 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x68, 0x74, 0x6c, 0x63, 0x42, 0x09, 0x48, 0x74, 0x6c, + 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, + 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, + 0x2f, 0x68, 0x74, 0x6c, 0x63, 0xa2, 0x02, 0x03, 0x49, 0x48, 0x58, 0xaa, 0x02, 0x0c, 0x49, 0x72, + 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x48, 0x74, 0x6c, 0x63, 0xca, 0x02, 0x0c, 0x49, 0x72, 0x69, + 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x48, 0x74, 0x6c, 0x63, 0xe2, 0x02, 0x18, 0x49, 0x72, 0x69, 0x73, + 0x6d, 0x6f, 0x64, 0x5c, 0x48, 0x74, 0x6c, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, + 0x48, 0x74, 0x6c, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/irismod/htlc/tx.pulsar.go b/api/irismod/htlc/tx.pulsar.go index 87ad2c95..1cb9916d 100644 --- a/api/irismod/htlc/tx.pulsar.go +++ b/api/irismod/htlc/tx.pulsar.go @@ -3543,17 +3543,17 @@ var file_irismod_htlc_tx_proto_rawDesc = []byte{ 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x25, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x68, 0x74, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, - 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x9d, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, - 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x68, 0x74, 0x6c, 0x63, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, - 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x68, 0x74, - 0x6c, 0x63, 0xa2, 0x02, 0x03, 0x49, 0x48, 0x58, 0xaa, 0x02, 0x0c, 0x49, 0x72, 0x69, 0x73, 0x6d, - 0x6f, 0x64, 0x2e, 0x48, 0x74, 0x6c, 0x63, 0xca, 0x02, 0x0c, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, - 0x64, 0x5c, 0x48, 0x74, 0x6c, 0x63, 0xe2, 0x02, 0x18, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, - 0x5c, 0x48, 0x74, 0x6c, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x0d, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x48, 0x74, 0x6c, - 0x63, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x9d, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x10, 0x63, 0x6f, + 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x68, 0x74, 0x6c, 0x63, 0x42, 0x07, + 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, + 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, + 0x64, 0x2f, 0x68, 0x74, 0x6c, 0x63, 0xa2, 0x02, 0x03, 0x49, 0x48, 0x58, 0xaa, 0x02, 0x0c, 0x49, + 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x48, 0x74, 0x6c, 0x63, 0xca, 0x02, 0x0c, 0x49, 0x72, + 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x48, 0x74, 0x6c, 0x63, 0xe2, 0x02, 0x18, 0x49, 0x72, 0x69, + 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x48, 0x74, 0x6c, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, + 0x3a, 0x48, 0x74, 0x6c, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/irismod/mt/mt.pulsar.go b/api/irismod/mt/mt.pulsar.go index 64b1c050..26a22a35 100644 --- a/api/irismod/mt/mt.pulsar.go +++ b/api/irismod/mt/mt.pulsar.go @@ -1818,16 +1818,16 @@ var file_irismod_mt_mt_proto_rawDesc = []byte{ 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x6d, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0x91, 0x01, 0x0a, 0x0e, 0x63, - 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x6d, 0x74, 0x42, 0x07, 0x4d, - 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, - 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, - 0x2f, 0x6d, 0x74, 0xa2, 0x02, 0x03, 0x49, 0x4d, 0x58, 0xaa, 0x02, 0x0a, 0x49, 0x72, 0x69, 0x73, - 0x6d, 0x6f, 0x64, 0x2e, 0x4d, 0x74, 0xca, 0x02, 0x0a, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, - 0x5c, 0x4d, 0x74, 0xe2, 0x02, 0x16, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x4d, 0x74, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x49, - 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x4d, 0x74, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, + 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0x91, 0x01, 0xc8, 0xe1, 0x1e, + 0x00, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x6d, + 0x74, 0x42, 0x07, 0x4d, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, + 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, + 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x6d, 0x74, 0xa2, 0x02, 0x03, 0x49, 0x4d, 0x58, 0xaa, 0x02, 0x0a, + 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x4d, 0x74, 0xca, 0x02, 0x0a, 0x49, 0x72, 0x69, + 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x4d, 0x74, 0xe2, 0x02, 0x16, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, + 0x64, 0x5c, 0x4d, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x0b, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x4d, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/api/irismod/mt/tx.pulsar.go b/api/irismod/mt/tx.pulsar.go index 6fa2619c..98ea44e1 100644 --- a/api/irismod/mt/tx.pulsar.go +++ b/api/irismod/mt/tx.pulsar.go @@ -6473,16 +6473,16 @@ var file_irismod_mt_tx_proto_rawDesc = []byte{ 0x72, 0x6e, 0x4d, 0x54, 0x12, 0x15, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x6d, 0x74, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, 0x4d, 0x54, 0x1a, 0x1d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x6d, 0x74, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, - 0x4d, 0x54, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x91, 0x01, 0x0a, 0x0e, 0x63, - 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x6d, 0x74, 0x42, 0x07, 0x54, - 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, - 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, - 0x2f, 0x6d, 0x74, 0xa2, 0x02, 0x03, 0x49, 0x4d, 0x58, 0xaa, 0x02, 0x0a, 0x49, 0x72, 0x69, 0x73, - 0x6d, 0x6f, 0x64, 0x2e, 0x4d, 0x74, 0xca, 0x02, 0x0a, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, - 0x5c, 0x4d, 0x74, 0xe2, 0x02, 0x16, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x4d, 0x74, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x49, - 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x4d, 0x74, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, + 0x4d, 0x54, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x91, 0x01, 0xc8, 0xe1, 0x1e, + 0x00, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x6d, + 0x74, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, + 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, + 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x6d, 0x74, 0xa2, 0x02, 0x03, 0x49, 0x4d, 0x58, 0xaa, 0x02, 0x0a, + 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x4d, 0x74, 0xca, 0x02, 0x0a, 0x49, 0x72, 0x69, + 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x4d, 0x74, 0xe2, 0x02, 0x16, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, + 0x64, 0x5c, 0x4d, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x0b, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x4d, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/api/irismod/nft/nft.pulsar.go b/api/irismod/nft/nft.pulsar.go index 6b7a91e6..80521cfc 100644 --- a/api/irismod/nft/nft.pulsar.go +++ b/api/irismod/nft/nft.pulsar.go @@ -5130,16 +5130,16 @@ var file_irismod_nft_nft_proto_rawDesc = []byte{ 0x14, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4e, 0x46, 0x54, 0x42, 0x0c, 0xc8, 0xde, 0x1f, 0x00, 0xe2, 0xde, 0x1f, 0x04, 0x4e, 0x46, 0x54, 0x73, 0x52, 0x04, 0x6e, 0x66, 0x74, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, - 0x98, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, - 0x6e, 0x66, 0x74, 0x42, 0x08, 0x4e, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, - 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x6e, 0x66, 0x74, 0xa2, 0x02, 0x03, 0x49, 0x4e, - 0x58, 0xaa, 0x02, 0x0b, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x4e, 0x66, 0x74, 0xca, - 0x02, 0x0b, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x4e, 0x66, 0x74, 0xe2, 0x02, 0x17, - 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x4e, 0x66, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, - 0x64, 0x3a, 0x3a, 0x4e, 0x66, 0x74, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x98, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, + 0x6d, 0x6f, 0x64, 0x2e, 0x6e, 0x66, 0x74, 0x42, 0x08, 0x4e, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x6e, 0x66, 0x74, 0xa2, + 0x02, 0x03, 0x49, 0x4e, 0x58, 0xaa, 0x02, 0x0b, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, + 0x4e, 0x66, 0x74, 0xca, 0x02, 0x0b, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x4e, 0x66, + 0x74, 0xe2, 0x02, 0x17, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x4e, 0x66, 0x74, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x49, 0x72, + 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x4e, 0x66, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/api/irismod/nft/tx.pulsar.go b/api/irismod/nft/tx.pulsar.go index c5f565dc..7044fd80 100644 --- a/api/irismod/nft/tx.pulsar.go +++ b/api/irismod/nft/tx.pulsar.go @@ -7608,16 +7608,16 @@ var file_irismod_nft_tx_proto_rawDesc = []byte{ 0x6e, 0x73, 0x66, 0x65, 0x72, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x1a, 0x25, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0x97, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, - 0x64, 0x2e, 0x6e, 0x66, 0x74, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, - 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x6e, 0x66, 0x74, 0xa2, 0x02, 0x03, 0x49, - 0x4e, 0x58, 0xaa, 0x02, 0x0b, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x4e, 0x66, 0x74, - 0xca, 0x02, 0x0b, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x4e, 0x66, 0x74, 0xe2, 0x02, - 0x17, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x4e, 0x66, 0x74, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x49, 0x72, 0x69, 0x73, 0x6d, - 0x6f, 0x64, 0x3a, 0x3a, 0x4e, 0x66, 0x74, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x65, 0x42, 0x97, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, + 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x6e, 0x66, 0x74, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x6e, 0x66, 0x74, + 0xa2, 0x02, 0x03, 0x49, 0x4e, 0x58, 0xaa, 0x02, 0x0b, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, + 0x2e, 0x4e, 0x66, 0x74, 0xca, 0x02, 0x0b, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x4e, + 0x66, 0x74, 0xe2, 0x02, 0x17, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x4e, 0x66, 0x74, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x49, + 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x4e, 0x66, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/api/irismod/record/record.pulsar.go b/api/irismod/record/record.pulsar.go index f1e2024e..fe15eb88 100644 --- a/api/irismod/record/record.pulsar.go +++ b/api/irismod/record/record.pulsar.go @@ -1397,18 +1397,18 @@ var file_irismod_record_record_proto_rawDesc = []byte{ 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x6f, 0x72, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xad, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, - 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, - 0x0b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, - 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, - 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0xa2, 0x02, 0x03, - 0x49, 0x52, 0x58, 0xaa, 0x02, 0x0e, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0xca, 0x02, 0x0e, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0xe2, 0x02, 0x1a, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0f, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x72, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xad, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, + 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x72, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x42, 0x0b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, + 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0xa2, 0x02, 0x03, 0x49, 0x52, 0x58, 0xaa, 0x02, 0x0e, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, + 0x64, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0xca, 0x02, 0x0e, 0x49, 0x72, 0x69, 0x73, 0x6d, + 0x6f, 0x64, 0x5c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0xe2, 0x02, 0x1a, 0x49, 0x72, 0x69, 0x73, + 0x6d, 0x6f, 0x64, 0x5c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, + 0x3a, 0x3a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/irismod/record/tx.pulsar.go b/api/irismod/record/tx.pulsar.go index d3d64055..9a02264f 100644 --- a/api/irismod/record/tx.pulsar.go +++ b/api/irismod/record/tx.pulsar.go @@ -1108,18 +1108,18 @@ var file_irismod_record_tx_proto_rawDesc = []byte{ 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x1a, 0x27, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xa9, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x69, - 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x07, 0x54, - 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, - 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, - 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0xa2, 0x02, 0x03, 0x49, 0x52, 0x58, 0xaa, 0x02, 0x0e, - 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0xca, 0x02, - 0x0e, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0xe2, - 0x02, 0x1a, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x49, - 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0xc8, 0xe1, - 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xa9, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x12, 0x63, + 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, + 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, + 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0xa2, 0x02, 0x03, 0x49, 0x52, + 0x58, 0xaa, 0x02, 0x0e, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0xca, 0x02, 0x0e, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0xe2, 0x02, 0x1a, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x0f, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/irismod/service/service.pulsar.go b/api/irismod/service/service.pulsar.go index 5bdf02d1..e4009128 100644 --- a/api/irismod/service/service.pulsar.go +++ b/api/irismod/service/service.pulsar.go @@ -9830,18 +9830,18 @@ var file_irismod_service_service_proto_rawDesc = []byte{ 0x53, 0x45, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x02, 0x1a, 0x0d, 0x8a, 0x9d, 0x20, 0x09, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x1a, 0x0c, 0x88, 0xa3, 0x1e, 0x00, 0xa8, 0xa4, 0x1e, 0x00, 0xb0, 0xa4, 0x1e, 0x01, 0x42, - 0xb4, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, - 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xa2, 0x02, 0x03, 0x49, 0x53, 0x58, 0xaa, 0x02, 0x0f, - 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xca, - 0x02, 0x0f, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0xe2, 0x02, 0x1b, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x10, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0xb4, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, + 0x6d, 0x6f, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x0c, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, + 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, + 0x6d, 0x6f, 0x64, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xa2, 0x02, 0x03, 0x49, 0x53, + 0x58, 0xaa, 0x02, 0x0f, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0xca, 0x02, 0x0f, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0xe2, 0x02, 0x1b, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/irismod/service/tx.pulsar.go b/api/irismod/service/tx.pulsar.go index 77c82bdc..7cfcb48a 100644 --- a/api/irismod/service/tx.pulsar.go +++ b/api/irismod/service/tx.pulsar.go @@ -16886,18 +16886,18 @@ var file_irismod_service_tx_proto_rawDesc = []byte{ 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x28, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaf, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, - 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, - 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, - 0x6d, 0x6f, 0x64, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xa2, 0x02, 0x03, 0x49, 0x53, - 0x58, 0xaa, 0x02, 0x0f, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0xca, 0x02, 0x0f, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0xe2, 0x02, 0x1b, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaf, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, + 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, + 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xa2, + 0x02, 0x03, 0x49, 0x53, 0x58, 0xaa, 0x02, 0x0f, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xca, 0x02, 0x0f, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, + 0x64, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xe2, 0x02, 0x1b, 0x49, 0x72, 0x69, 0x73, + 0x6d, 0x6f, 0x64, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, + 0x64, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/api/irismod/token/v1/event.pulsar.go b/api/irismod/token/v1/event.pulsar.go new file mode 100644 index 00000000..0ac1fbbb --- /dev/null +++ b/api/irismod/token/v1/event.pulsar.go @@ -0,0 +1,2286 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package tokenv1 + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_EventDeployERC20 protoreflect.MessageDescriptor + fd_EventDeployERC20_symbol protoreflect.FieldDescriptor + fd_EventDeployERC20_name protoreflect.FieldDescriptor + fd_EventDeployERC20_scale protoreflect.FieldDescriptor + fd_EventDeployERC20_min_unit protoreflect.FieldDescriptor + fd_EventDeployERC20_contract protoreflect.FieldDescriptor +) + +func init() { + file_irismod_token_v1_event_proto_init() + md_EventDeployERC20 = File_irismod_token_v1_event_proto.Messages().ByName("EventDeployERC20") + fd_EventDeployERC20_symbol = md_EventDeployERC20.Fields().ByName("symbol") + fd_EventDeployERC20_name = md_EventDeployERC20.Fields().ByName("name") + fd_EventDeployERC20_scale = md_EventDeployERC20.Fields().ByName("scale") + fd_EventDeployERC20_min_unit = md_EventDeployERC20.Fields().ByName("min_unit") + fd_EventDeployERC20_contract = md_EventDeployERC20.Fields().ByName("contract") +} + +var _ protoreflect.Message = (*fastReflection_EventDeployERC20)(nil) + +type fastReflection_EventDeployERC20 EventDeployERC20 + +func (x *EventDeployERC20) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventDeployERC20)(x) +} + +func (x *EventDeployERC20) slowProtoReflect() protoreflect.Message { + mi := &file_irismod_token_v1_event_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_EventDeployERC20_messageType fastReflection_EventDeployERC20_messageType +var _ protoreflect.MessageType = fastReflection_EventDeployERC20_messageType{} + +type fastReflection_EventDeployERC20_messageType struct{} + +func (x fastReflection_EventDeployERC20_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventDeployERC20)(nil) +} +func (x fastReflection_EventDeployERC20_messageType) New() protoreflect.Message { + return new(fastReflection_EventDeployERC20) +} +func (x fastReflection_EventDeployERC20_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventDeployERC20 +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventDeployERC20) Descriptor() protoreflect.MessageDescriptor { + return md_EventDeployERC20 +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_EventDeployERC20) Type() protoreflect.MessageType { + return _fastReflection_EventDeployERC20_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventDeployERC20) New() protoreflect.Message { + return new(fastReflection_EventDeployERC20) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventDeployERC20) Interface() protoreflect.ProtoMessage { + return (*EventDeployERC20)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_EventDeployERC20) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Symbol != "" { + value := protoreflect.ValueOfString(x.Symbol) + if !f(fd_EventDeployERC20_symbol, value) { + return + } + } + if x.Name != "" { + value := protoreflect.ValueOfString(x.Name) + if !f(fd_EventDeployERC20_name, value) { + return + } + } + if x.Scale != uint32(0) { + value := protoreflect.ValueOfUint32(x.Scale) + if !f(fd_EventDeployERC20_scale, value) { + return + } + } + if x.MinUnit != "" { + value := protoreflect.ValueOfString(x.MinUnit) + if !f(fd_EventDeployERC20_min_unit, value) { + return + } + } + if x.Contract != "" { + value := protoreflect.ValueOfString(x.Contract) + if !f(fd_EventDeployERC20_contract, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_EventDeployERC20) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "irismod.token.v1.EventDeployERC20.symbol": + return x.Symbol != "" + case "irismod.token.v1.EventDeployERC20.name": + return x.Name != "" + case "irismod.token.v1.EventDeployERC20.scale": + return x.Scale != uint32(0) + case "irismod.token.v1.EventDeployERC20.min_unit": + return x.MinUnit != "" + case "irismod.token.v1.EventDeployERC20.contract": + return x.Contract != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventDeployERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventDeployERC20 does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventDeployERC20) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "irismod.token.v1.EventDeployERC20.symbol": + x.Symbol = "" + case "irismod.token.v1.EventDeployERC20.name": + x.Name = "" + case "irismod.token.v1.EventDeployERC20.scale": + x.Scale = uint32(0) + case "irismod.token.v1.EventDeployERC20.min_unit": + x.MinUnit = "" + case "irismod.token.v1.EventDeployERC20.contract": + x.Contract = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventDeployERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventDeployERC20 does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_EventDeployERC20) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "irismod.token.v1.EventDeployERC20.symbol": + value := x.Symbol + return protoreflect.ValueOfString(value) + case "irismod.token.v1.EventDeployERC20.name": + value := x.Name + return protoreflect.ValueOfString(value) + case "irismod.token.v1.EventDeployERC20.scale": + value := x.Scale + return protoreflect.ValueOfUint32(value) + case "irismod.token.v1.EventDeployERC20.min_unit": + value := x.MinUnit + return protoreflect.ValueOfString(value) + case "irismod.token.v1.EventDeployERC20.contract": + value := x.Contract + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventDeployERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventDeployERC20 does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventDeployERC20) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "irismod.token.v1.EventDeployERC20.symbol": + x.Symbol = value.Interface().(string) + case "irismod.token.v1.EventDeployERC20.name": + x.Name = value.Interface().(string) + case "irismod.token.v1.EventDeployERC20.scale": + x.Scale = uint32(value.Uint()) + case "irismod.token.v1.EventDeployERC20.min_unit": + x.MinUnit = value.Interface().(string) + case "irismod.token.v1.EventDeployERC20.contract": + x.Contract = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventDeployERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventDeployERC20 does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventDeployERC20) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irismod.token.v1.EventDeployERC20.symbol": + panic(fmt.Errorf("field symbol of message irismod.token.v1.EventDeployERC20 is not mutable")) + case "irismod.token.v1.EventDeployERC20.name": + panic(fmt.Errorf("field name of message irismod.token.v1.EventDeployERC20 is not mutable")) + case "irismod.token.v1.EventDeployERC20.scale": + panic(fmt.Errorf("field scale of message irismod.token.v1.EventDeployERC20 is not mutable")) + case "irismod.token.v1.EventDeployERC20.min_unit": + panic(fmt.Errorf("field min_unit of message irismod.token.v1.EventDeployERC20 is not mutable")) + case "irismod.token.v1.EventDeployERC20.contract": + panic(fmt.Errorf("field contract of message irismod.token.v1.EventDeployERC20 is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventDeployERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventDeployERC20 does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_EventDeployERC20) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irismod.token.v1.EventDeployERC20.symbol": + return protoreflect.ValueOfString("") + case "irismod.token.v1.EventDeployERC20.name": + return protoreflect.ValueOfString("") + case "irismod.token.v1.EventDeployERC20.scale": + return protoreflect.ValueOfUint32(uint32(0)) + case "irismod.token.v1.EventDeployERC20.min_unit": + return protoreflect.ValueOfString("") + case "irismod.token.v1.EventDeployERC20.contract": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventDeployERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventDeployERC20 does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_EventDeployERC20) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in irismod.token.v1.EventDeployERC20", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_EventDeployERC20) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventDeployERC20) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_EventDeployERC20) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_EventDeployERC20) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventDeployERC20) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Symbol) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Name) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Scale != 0 { + n += 1 + runtime.Sov(uint64(x.Scale)) + } + l = len(x.MinUnit) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Contract) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*EventDeployERC20) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Contract) > 0 { + i -= len(x.Contract) + copy(dAtA[i:], x.Contract) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Contract))) + i-- + dAtA[i] = 0x2a + } + if len(x.MinUnit) > 0 { + i -= len(x.MinUnit) + copy(dAtA[i:], x.MinUnit) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinUnit))) + i-- + dAtA[i] = 0x22 + } + if x.Scale != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Scale)) + i-- + dAtA[i] = 0x18 + } + if len(x.Name) > 0 { + i -= len(x.Name) + copy(dAtA[i:], x.Name) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) + i-- + dAtA[i] = 0x12 + } + if len(x.Symbol) > 0 { + i -= len(x.Symbol) + copy(dAtA[i:], x.Symbol) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Symbol))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*EventDeployERC20) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventDeployERC20: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventDeployERC20: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scale", wireType) + } + x.Scale = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Scale |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinUnit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.MinUnit = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Contract = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_EventSwapToERC20 protoreflect.MessageDescriptor + fd_EventSwapToERC20_amount protoreflect.FieldDescriptor + fd_EventSwapToERC20_sender protoreflect.FieldDescriptor + fd_EventSwapToERC20_receiver protoreflect.FieldDescriptor + fd_EventSwapToERC20_to_contract protoreflect.FieldDescriptor +) + +func init() { + file_irismod_token_v1_event_proto_init() + md_EventSwapToERC20 = File_irismod_token_v1_event_proto.Messages().ByName("EventSwapToERC20") + fd_EventSwapToERC20_amount = md_EventSwapToERC20.Fields().ByName("amount") + fd_EventSwapToERC20_sender = md_EventSwapToERC20.Fields().ByName("sender") + fd_EventSwapToERC20_receiver = md_EventSwapToERC20.Fields().ByName("receiver") + fd_EventSwapToERC20_to_contract = md_EventSwapToERC20.Fields().ByName("to_contract") +} + +var _ protoreflect.Message = (*fastReflection_EventSwapToERC20)(nil) + +type fastReflection_EventSwapToERC20 EventSwapToERC20 + +func (x *EventSwapToERC20) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventSwapToERC20)(x) +} + +func (x *EventSwapToERC20) slowProtoReflect() protoreflect.Message { + mi := &file_irismod_token_v1_event_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_EventSwapToERC20_messageType fastReflection_EventSwapToERC20_messageType +var _ protoreflect.MessageType = fastReflection_EventSwapToERC20_messageType{} + +type fastReflection_EventSwapToERC20_messageType struct{} + +func (x fastReflection_EventSwapToERC20_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventSwapToERC20)(nil) +} +func (x fastReflection_EventSwapToERC20_messageType) New() protoreflect.Message { + return new(fastReflection_EventSwapToERC20) +} +func (x fastReflection_EventSwapToERC20_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventSwapToERC20 +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventSwapToERC20) Descriptor() protoreflect.MessageDescriptor { + return md_EventSwapToERC20 +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_EventSwapToERC20) Type() protoreflect.MessageType { + return _fastReflection_EventSwapToERC20_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventSwapToERC20) New() protoreflect.Message { + return new(fastReflection_EventSwapToERC20) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventSwapToERC20) Interface() protoreflect.ProtoMessage { + return (*EventSwapToERC20)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_EventSwapToERC20) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Amount != nil { + value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + if !f(fd_EventSwapToERC20_amount, value) { + return + } + } + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_EventSwapToERC20_sender, value) { + return + } + } + if x.Receiver != "" { + value := protoreflect.ValueOfString(x.Receiver) + if !f(fd_EventSwapToERC20_receiver, value) { + return + } + } + if x.ToContract != "" { + value := protoreflect.ValueOfString(x.ToContract) + if !f(fd_EventSwapToERC20_to_contract, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_EventSwapToERC20) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "irismod.token.v1.EventSwapToERC20.amount": + return x.Amount != nil + case "irismod.token.v1.EventSwapToERC20.sender": + return x.Sender != "" + case "irismod.token.v1.EventSwapToERC20.receiver": + return x.Receiver != "" + case "irismod.token.v1.EventSwapToERC20.to_contract": + return x.ToContract != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventSwapToERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventSwapToERC20 does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventSwapToERC20) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "irismod.token.v1.EventSwapToERC20.amount": + x.Amount = nil + case "irismod.token.v1.EventSwapToERC20.sender": + x.Sender = "" + case "irismod.token.v1.EventSwapToERC20.receiver": + x.Receiver = "" + case "irismod.token.v1.EventSwapToERC20.to_contract": + x.ToContract = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventSwapToERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventSwapToERC20 does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_EventSwapToERC20) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "irismod.token.v1.EventSwapToERC20.amount": + value := x.Amount + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "irismod.token.v1.EventSwapToERC20.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "irismod.token.v1.EventSwapToERC20.receiver": + value := x.Receiver + return protoreflect.ValueOfString(value) + case "irismod.token.v1.EventSwapToERC20.to_contract": + value := x.ToContract + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventSwapToERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventSwapToERC20 does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventSwapToERC20) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "irismod.token.v1.EventSwapToERC20.amount": + x.Amount = value.Message().Interface().(*v1beta1.Coin) + case "irismod.token.v1.EventSwapToERC20.sender": + x.Sender = value.Interface().(string) + case "irismod.token.v1.EventSwapToERC20.receiver": + x.Receiver = value.Interface().(string) + case "irismod.token.v1.EventSwapToERC20.to_contract": + x.ToContract = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventSwapToERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventSwapToERC20 does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventSwapToERC20) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irismod.token.v1.EventSwapToERC20.amount": + if x.Amount == nil { + x.Amount = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + case "irismod.token.v1.EventSwapToERC20.sender": + panic(fmt.Errorf("field sender of message irismod.token.v1.EventSwapToERC20 is not mutable")) + case "irismod.token.v1.EventSwapToERC20.receiver": + panic(fmt.Errorf("field receiver of message irismod.token.v1.EventSwapToERC20 is not mutable")) + case "irismod.token.v1.EventSwapToERC20.to_contract": + panic(fmt.Errorf("field to_contract of message irismod.token.v1.EventSwapToERC20 is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventSwapToERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventSwapToERC20 does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_EventSwapToERC20) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irismod.token.v1.EventSwapToERC20.amount": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "irismod.token.v1.EventSwapToERC20.sender": + return protoreflect.ValueOfString("") + case "irismod.token.v1.EventSwapToERC20.receiver": + return protoreflect.ValueOfString("") + case "irismod.token.v1.EventSwapToERC20.to_contract": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventSwapToERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventSwapToERC20 does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_EventSwapToERC20) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in irismod.token.v1.EventSwapToERC20", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_EventSwapToERC20) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventSwapToERC20) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_EventSwapToERC20) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_EventSwapToERC20) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventSwapToERC20) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Amount != nil { + l = options.Size(x.Amount) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Receiver) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ToContract) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*EventSwapToERC20) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ToContract) > 0 { + i -= len(x.ToContract) + copy(dAtA[i:], x.ToContract) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ToContract))) + i-- + dAtA[i] = 0x22 + } + if len(x.Receiver) > 0 { + i -= len(x.Receiver) + copy(dAtA[i:], x.Receiver) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Receiver))) + i-- + dAtA[i] = 0x1a + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0x12 + } + if x.Amount != nil { + encoded, err := options.Marshal(x.Amount) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*EventSwapToERC20) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventSwapToERC20: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventSwapToERC20: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Amount == nil { + x.Amount = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ToContract", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ToContract = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_EventSwapFromERC20 protoreflect.MessageDescriptor + fd_EventSwapFromERC20_wanted_amount protoreflect.FieldDescriptor + fd_EventSwapFromERC20_sender protoreflect.FieldDescriptor + fd_EventSwapFromERC20_receiver protoreflect.FieldDescriptor + fd_EventSwapFromERC20_from_contract protoreflect.FieldDescriptor +) + +func init() { + file_irismod_token_v1_event_proto_init() + md_EventSwapFromERC20 = File_irismod_token_v1_event_proto.Messages().ByName("EventSwapFromERC20") + fd_EventSwapFromERC20_wanted_amount = md_EventSwapFromERC20.Fields().ByName("wanted_amount") + fd_EventSwapFromERC20_sender = md_EventSwapFromERC20.Fields().ByName("sender") + fd_EventSwapFromERC20_receiver = md_EventSwapFromERC20.Fields().ByName("receiver") + fd_EventSwapFromERC20_from_contract = md_EventSwapFromERC20.Fields().ByName("from_contract") +} + +var _ protoreflect.Message = (*fastReflection_EventSwapFromERC20)(nil) + +type fastReflection_EventSwapFromERC20 EventSwapFromERC20 + +func (x *EventSwapFromERC20) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventSwapFromERC20)(x) +} + +func (x *EventSwapFromERC20) slowProtoReflect() protoreflect.Message { + mi := &file_irismod_token_v1_event_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_EventSwapFromERC20_messageType fastReflection_EventSwapFromERC20_messageType +var _ protoreflect.MessageType = fastReflection_EventSwapFromERC20_messageType{} + +type fastReflection_EventSwapFromERC20_messageType struct{} + +func (x fastReflection_EventSwapFromERC20_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventSwapFromERC20)(nil) +} +func (x fastReflection_EventSwapFromERC20_messageType) New() protoreflect.Message { + return new(fastReflection_EventSwapFromERC20) +} +func (x fastReflection_EventSwapFromERC20_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventSwapFromERC20 +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventSwapFromERC20) Descriptor() protoreflect.MessageDescriptor { + return md_EventSwapFromERC20 +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_EventSwapFromERC20) Type() protoreflect.MessageType { + return _fastReflection_EventSwapFromERC20_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventSwapFromERC20) New() protoreflect.Message { + return new(fastReflection_EventSwapFromERC20) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventSwapFromERC20) Interface() protoreflect.ProtoMessage { + return (*EventSwapFromERC20)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_EventSwapFromERC20) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.WantedAmount != nil { + value := protoreflect.ValueOfMessage(x.WantedAmount.ProtoReflect()) + if !f(fd_EventSwapFromERC20_wanted_amount, value) { + return + } + } + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_EventSwapFromERC20_sender, value) { + return + } + } + if x.Receiver != "" { + value := protoreflect.ValueOfString(x.Receiver) + if !f(fd_EventSwapFromERC20_receiver, value) { + return + } + } + if x.FromContract != "" { + value := protoreflect.ValueOfString(x.FromContract) + if !f(fd_EventSwapFromERC20_from_contract, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_EventSwapFromERC20) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "irismod.token.v1.EventSwapFromERC20.wanted_amount": + return x.WantedAmount != nil + case "irismod.token.v1.EventSwapFromERC20.sender": + return x.Sender != "" + case "irismod.token.v1.EventSwapFromERC20.receiver": + return x.Receiver != "" + case "irismod.token.v1.EventSwapFromERC20.from_contract": + return x.FromContract != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventSwapFromERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventSwapFromERC20 does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventSwapFromERC20) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "irismod.token.v1.EventSwapFromERC20.wanted_amount": + x.WantedAmount = nil + case "irismod.token.v1.EventSwapFromERC20.sender": + x.Sender = "" + case "irismod.token.v1.EventSwapFromERC20.receiver": + x.Receiver = "" + case "irismod.token.v1.EventSwapFromERC20.from_contract": + x.FromContract = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventSwapFromERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventSwapFromERC20 does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_EventSwapFromERC20) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "irismod.token.v1.EventSwapFromERC20.wanted_amount": + value := x.WantedAmount + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "irismod.token.v1.EventSwapFromERC20.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "irismod.token.v1.EventSwapFromERC20.receiver": + value := x.Receiver + return protoreflect.ValueOfString(value) + case "irismod.token.v1.EventSwapFromERC20.from_contract": + value := x.FromContract + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventSwapFromERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventSwapFromERC20 does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventSwapFromERC20) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "irismod.token.v1.EventSwapFromERC20.wanted_amount": + x.WantedAmount = value.Message().Interface().(*v1beta1.Coin) + case "irismod.token.v1.EventSwapFromERC20.sender": + x.Sender = value.Interface().(string) + case "irismod.token.v1.EventSwapFromERC20.receiver": + x.Receiver = value.Interface().(string) + case "irismod.token.v1.EventSwapFromERC20.from_contract": + x.FromContract = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventSwapFromERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventSwapFromERC20 does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventSwapFromERC20) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irismod.token.v1.EventSwapFromERC20.wanted_amount": + if x.WantedAmount == nil { + x.WantedAmount = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.WantedAmount.ProtoReflect()) + case "irismod.token.v1.EventSwapFromERC20.sender": + panic(fmt.Errorf("field sender of message irismod.token.v1.EventSwapFromERC20 is not mutable")) + case "irismod.token.v1.EventSwapFromERC20.receiver": + panic(fmt.Errorf("field receiver of message irismod.token.v1.EventSwapFromERC20 is not mutable")) + case "irismod.token.v1.EventSwapFromERC20.from_contract": + panic(fmt.Errorf("field from_contract of message irismod.token.v1.EventSwapFromERC20 is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventSwapFromERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventSwapFromERC20 does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_EventSwapFromERC20) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irismod.token.v1.EventSwapFromERC20.wanted_amount": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "irismod.token.v1.EventSwapFromERC20.sender": + return protoreflect.ValueOfString("") + case "irismod.token.v1.EventSwapFromERC20.receiver": + return protoreflect.ValueOfString("") + case "irismod.token.v1.EventSwapFromERC20.from_contract": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.EventSwapFromERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.EventSwapFromERC20 does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_EventSwapFromERC20) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in irismod.token.v1.EventSwapFromERC20", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_EventSwapFromERC20) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventSwapFromERC20) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_EventSwapFromERC20) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_EventSwapFromERC20) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventSwapFromERC20) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.WantedAmount != nil { + l = options.Size(x.WantedAmount) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Receiver) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.FromContract) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*EventSwapFromERC20) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.FromContract) > 0 { + i -= len(x.FromContract) + copy(dAtA[i:], x.FromContract) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FromContract))) + i-- + dAtA[i] = 0x22 + } + if len(x.Receiver) > 0 { + i -= len(x.Receiver) + copy(dAtA[i:], x.Receiver) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Receiver))) + i-- + dAtA[i] = 0x1a + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0x12 + } + if x.WantedAmount != nil { + encoded, err := options.Marshal(x.WantedAmount) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*EventSwapFromERC20) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventSwapFromERC20: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventSwapFromERC20: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WantedAmount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.WantedAmount == nil { + x.WantedAmount = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.WantedAmount); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FromContract", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.FromContract = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: irismod/token/v1/event.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// EventDeployERC20 is an event emitted when deploying ERC20. +type EventDeployERC20 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Scale uint32 `protobuf:"varint,3,opt,name=scale,proto3" json:"scale,omitempty"` + MinUnit string `protobuf:"bytes,4,opt,name=min_unit,json=minUnit,proto3" json:"min_unit,omitempty"` + Contract string `protobuf:"bytes,5,opt,name=contract,proto3" json:"contract,omitempty"` +} + +func (x *EventDeployERC20) Reset() { + *x = EventDeployERC20{} + if protoimpl.UnsafeEnabled { + mi := &file_irismod_token_v1_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventDeployERC20) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventDeployERC20) ProtoMessage() {} + +// Deprecated: Use EventDeployERC20.ProtoReflect.Descriptor instead. +func (*EventDeployERC20) Descriptor() ([]byte, []int) { + return file_irismod_token_v1_event_proto_rawDescGZIP(), []int{0} +} + +func (x *EventDeployERC20) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *EventDeployERC20) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *EventDeployERC20) GetScale() uint32 { + if x != nil { + return x.Scale + } + return 0 +} + +func (x *EventDeployERC20) GetMinUnit() string { + if x != nil { + return x.MinUnit + } + return "" +} + +func (x *EventDeployERC20) GetContract() string { + if x != nil { + return x.Contract + } + return "" +} + +// EventSwapToERC20 is an event emitted when swapping token from native token to +// ERC20. +type EventSwapToERC20 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Amount *v1beta1.Coin `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` + ToContract string `protobuf:"bytes,4,opt,name=to_contract,json=toContract,proto3" json:"to_contract,omitempty"` +} + +func (x *EventSwapToERC20) Reset() { + *x = EventSwapToERC20{} + if protoimpl.UnsafeEnabled { + mi := &file_irismod_token_v1_event_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventSwapToERC20) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventSwapToERC20) ProtoMessage() {} + +// Deprecated: Use EventSwapToERC20.ProtoReflect.Descriptor instead. +func (*EventSwapToERC20) Descriptor() ([]byte, []int) { + return file_irismod_token_v1_event_proto_rawDescGZIP(), []int{1} +} + +func (x *EventSwapToERC20) GetAmount() *v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +func (x *EventSwapToERC20) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *EventSwapToERC20) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +func (x *EventSwapToERC20) GetToContract() string { + if x != nil { + return x.ToContract + } + return "" +} + +// EventSwapFromERC20 is an event emitted when swapping token from ERC20 to +// native token. +type EventSwapFromERC20 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WantedAmount *v1beta1.Coin `protobuf:"bytes,1,opt,name=wanted_amount,json=wantedAmount,proto3" json:"wanted_amount,omitempty"` + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` + FromContract string `protobuf:"bytes,4,opt,name=from_contract,json=fromContract,proto3" json:"from_contract,omitempty"` +} + +func (x *EventSwapFromERC20) Reset() { + *x = EventSwapFromERC20{} + if protoimpl.UnsafeEnabled { + mi := &file_irismod_token_v1_event_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventSwapFromERC20) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventSwapFromERC20) ProtoMessage() {} + +// Deprecated: Use EventSwapFromERC20.ProtoReflect.Descriptor instead. +func (*EventSwapFromERC20) Descriptor() ([]byte, []int) { + return file_irismod_token_v1_event_proto_rawDescGZIP(), []int{2} +} + +func (x *EventSwapFromERC20) GetWantedAmount() *v1beta1.Coin { + if x != nil { + return x.WantedAmount + } + return nil +} + +func (x *EventSwapFromERC20) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *EventSwapFromERC20) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +func (x *EventSwapFromERC20) GetFromContract() string { + if x != nil { + return x.FromContract + } + return "" +} + +var File_irismod_token_v1_event_proto protoreflect.FileDescriptor + +var file_irismod_token_v1_event_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2f, + 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, + 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, + 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, + 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x8b, 0x01, 0x0a, 0x10, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x45, 0x52, 0x43, 0x32, 0x30, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x6e, 0x5f, + 0x75, 0x6e, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x55, + 0x6e, 0x69, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x22, + 0xba, 0x01, 0x0a, 0x10, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x77, 0x61, 0x70, 0x54, 0x6f, 0x45, + 0x52, 0x43, 0x32, 0x30, 0x12, 0x37, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, + 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, + 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x74, + 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x74, 0x6f, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x22, 0xe1, 0x01, 0x0a, + 0x12, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x77, 0x61, 0x70, 0x46, 0x72, 0x6f, 0x6d, 0x45, 0x52, + 0x43, 0x32, 0x30, 0x12, 0x3e, 0x0a, 0x0d, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x0c, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x41, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x66, + 0x72, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x42, 0xc1, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, + 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, + 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, + 0x6d, 0x6f, 0x64, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x54, 0x58, 0xaa, 0x02, 0x10, 0x49, 0x72, 0x69, + 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, + 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1c, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x12, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_irismod_token_v1_event_proto_rawDescOnce sync.Once + file_irismod_token_v1_event_proto_rawDescData = file_irismod_token_v1_event_proto_rawDesc +) + +func file_irismod_token_v1_event_proto_rawDescGZIP() []byte { + file_irismod_token_v1_event_proto_rawDescOnce.Do(func() { + file_irismod_token_v1_event_proto_rawDescData = protoimpl.X.CompressGZIP(file_irismod_token_v1_event_proto_rawDescData) + }) + return file_irismod_token_v1_event_proto_rawDescData +} + +var file_irismod_token_v1_event_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_irismod_token_v1_event_proto_goTypes = []interface{}{ + (*EventDeployERC20)(nil), // 0: irismod.token.v1.EventDeployERC20 + (*EventSwapToERC20)(nil), // 1: irismod.token.v1.EventSwapToERC20 + (*EventSwapFromERC20)(nil), // 2: irismod.token.v1.EventSwapFromERC20 + (*v1beta1.Coin)(nil), // 3: cosmos.base.v1beta1.Coin +} +var file_irismod_token_v1_event_proto_depIdxs = []int32{ + 3, // 0: irismod.token.v1.EventSwapToERC20.amount:type_name -> cosmos.base.v1beta1.Coin + 3, // 1: irismod.token.v1.EventSwapFromERC20.wanted_amount:type_name -> cosmos.base.v1beta1.Coin + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_irismod_token_v1_event_proto_init() } +func file_irismod_token_v1_event_proto_init() { + if File_irismod_token_v1_event_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_irismod_token_v1_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventDeployERC20); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_irismod_token_v1_event_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventSwapToERC20); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_irismod_token_v1_event_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventSwapFromERC20); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_irismod_token_v1_event_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_irismod_token_v1_event_proto_goTypes, + DependencyIndexes: file_irismod_token_v1_event_proto_depIdxs, + MessageInfos: file_irismod_token_v1_event_proto_msgTypes, + }.Build() + File_irismod_token_v1_event_proto = out.File + file_irismod_token_v1_event_proto_rawDesc = nil + file_irismod_token_v1_event_proto_goTypes = nil + file_irismod_token_v1_event_proto_depIdxs = nil +} diff --git a/api/irismod/token/v1/token.pulsar.go b/api/irismod/token/v1/token.pulsar.go index b656da07..3cb3ad88 100644 --- a/api/irismod/token/v1/token.pulsar.go +++ b/api/irismod/token/v1/token.pulsar.go @@ -24,6 +24,7 @@ var ( fd_Token_max_supply protoreflect.FieldDescriptor fd_Token_mintable protoreflect.FieldDescriptor fd_Token_owner protoreflect.FieldDescriptor + fd_Token_contract protoreflect.FieldDescriptor ) func init() { @@ -37,6 +38,7 @@ func init() { fd_Token_max_supply = md_Token.Fields().ByName("max_supply") fd_Token_mintable = md_Token.Fields().ByName("mintable") fd_Token_owner = md_Token.Fields().ByName("owner") + fd_Token_contract = md_Token.Fields().ByName("contract") } var _ protoreflect.Message = (*fastReflection_Token)(nil) @@ -152,6 +154,12 @@ func (x *fastReflection_Token) Range(f func(protoreflect.FieldDescriptor, protor return } } + if x.Contract != "" { + value := protoreflect.ValueOfString(x.Contract) + if !f(fd_Token_contract, value) { + return + } + } } // Has reports whether a field is populated. @@ -183,6 +191,8 @@ func (x *fastReflection_Token) Has(fd protoreflect.FieldDescriptor) bool { return x.Mintable != false case "irismod.token.v1.Token.owner": return x.Owner != "" + case "irismod.token.v1.Token.contract": + return x.Contract != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.Token")) @@ -215,6 +225,8 @@ func (x *fastReflection_Token) Clear(fd protoreflect.FieldDescriptor) { x.Mintable = false case "irismod.token.v1.Token.owner": x.Owner = "" + case "irismod.token.v1.Token.contract": + x.Contract = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.Token")) @@ -255,6 +267,9 @@ func (x *fastReflection_Token) Get(descriptor protoreflect.FieldDescriptor) prot case "irismod.token.v1.Token.owner": value := x.Owner return protoreflect.ValueOfString(value) + case "irismod.token.v1.Token.contract": + value := x.Contract + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.Token")) @@ -291,6 +306,8 @@ func (x *fastReflection_Token) Set(fd protoreflect.FieldDescriptor, value protor x.Mintable = value.Bool() case "irismod.token.v1.Token.owner": x.Owner = value.Interface().(string) + case "irismod.token.v1.Token.contract": + x.Contract = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.Token")) @@ -327,6 +344,8 @@ func (x *fastReflection_Token) Mutable(fd protoreflect.FieldDescriptor) protoref panic(fmt.Errorf("field mintable of message irismod.token.v1.Token is not mutable")) case "irismod.token.v1.Token.owner": panic(fmt.Errorf("field owner of message irismod.token.v1.Token is not mutable")) + case "irismod.token.v1.Token.contract": + panic(fmt.Errorf("field contract of message irismod.token.v1.Token is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.Token")) @@ -356,6 +375,8 @@ func (x *fastReflection_Token) NewField(fd protoreflect.FieldDescriptor) protore return protoreflect.ValueOfBool(false) case "irismod.token.v1.Token.owner": return protoreflect.ValueOfString("") + case "irismod.token.v1.Token.contract": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.Token")) @@ -453,6 +474,10 @@ func (x *fastReflection_Token) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.Contract) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -482,6 +507,13 @@ func (x *fastReflection_Token) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Contract) > 0 { + i -= len(x.Contract) + copy(dAtA[i:], x.Contract) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Contract))) + i-- + dAtA[i] = 0x4a + } if len(x.Owner) > 0 { i -= len(x.Owner) copy(dAtA[i:], x.Owner) @@ -789,6 +821,38 @@ func (x *fastReflection_Token) ProtoMethods() *protoiface.Methods { } x.Owner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Contract = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1414,6 +1478,7 @@ type Token struct { MaxSupply uint64 `protobuf:"varint,6,opt,name=max_supply,json=maxSupply,proto3" json:"max_supply,omitempty"` Mintable bool `protobuf:"varint,7,opt,name=mintable,proto3" json:"mintable,omitempty"` Owner string `protobuf:"bytes,8,opt,name=owner,proto3" json:"owner,omitempty"` + Contract string `protobuf:"bytes,9,opt,name=contract,proto3" json:"contract,omitempty"` } func (x *Token) Reset() { @@ -1492,6 +1557,13 @@ func (x *Token) GetOwner() string { return "" } +func (x *Token) GetContract() string { + if x != nil { + return x.Contract + } + return "" +} + // Params defines token module's parameters type Params struct { state protoimpl.MessageState @@ -1553,7 +1625,7 @@ var file_irismod_token_v1_token_proto_rawDesc = []byte{ 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe2, 0x01, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfe, 0x01, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, @@ -1567,25 +1639,27 @@ var file_irismod_token_v1_token_proto_rawDesc = []byte{ 0x70, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x69, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0x97, 0x02, 0x0a, 0x06, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x54, 0x0a, 0x0e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, - 0x74, 0x61, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, - 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0c, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x61, 0x78, 0x52, 0x61, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x14, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x61, 0x73, 0x65, - 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x11, 0x69, 0x73, 0x73, - 0x75, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x12, 0x5f, - 0x0a, 0x14, 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x66, 0x65, 0x65, - 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xc8, 0xde, - 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, 0x6d, 0x69, - 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x65, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x3a, - 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xc1, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0x97, 0x02, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x54, 0x0a, 0x0e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x61, 0x78, 0x5f, + 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xc8, 0xde, 0x1f, 0x00, + 0xda, 0xde, 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0c, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x54, 0x61, 0x78, 0x52, 0x61, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x14, 0x69, 0x73, 0x73, 0x75, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, + 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x11, 0x69, 0x73, 0x73, 0x75, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x12, 0x5f, 0x0a, 0x14, 0x6d, 0x69, + 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, + 0x1f, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x74, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x46, 0x65, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, + 0x01, 0x42, 0xc1, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, @@ -1597,8 +1671,7 @@ var file_irismod_token_v1_token_proto_rawDesc = []byte{ 0x31, 0xe2, 0x02, 0x1c, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/irismod/token/v1/tx.pulsar.go b/api/irismod/token/v1/tx.pulsar.go index 8d02d86e..4b42f7ba 100644 --- a/api/irismod/token/v1/tx.pulsar.go +++ b/api/irismod/token/v1/tx.pulsar.go @@ -6729,6 +6729,2860 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth } } +var ( + md_MsgDeployERC20 protoreflect.MessageDescriptor + fd_MsgDeployERC20_symbol protoreflect.FieldDescriptor + fd_MsgDeployERC20_name protoreflect.FieldDescriptor + fd_MsgDeployERC20_scale protoreflect.FieldDescriptor + fd_MsgDeployERC20_min_unit protoreflect.FieldDescriptor + fd_MsgDeployERC20_authority protoreflect.FieldDescriptor +) + +func init() { + file_irismod_token_v1_tx_proto_init() + md_MsgDeployERC20 = File_irismod_token_v1_tx_proto.Messages().ByName("MsgDeployERC20") + fd_MsgDeployERC20_symbol = md_MsgDeployERC20.Fields().ByName("symbol") + fd_MsgDeployERC20_name = md_MsgDeployERC20.Fields().ByName("name") + fd_MsgDeployERC20_scale = md_MsgDeployERC20.Fields().ByName("scale") + fd_MsgDeployERC20_min_unit = md_MsgDeployERC20.Fields().ByName("min_unit") + fd_MsgDeployERC20_authority = md_MsgDeployERC20.Fields().ByName("authority") +} + +var _ protoreflect.Message = (*fastReflection_MsgDeployERC20)(nil) + +type fastReflection_MsgDeployERC20 MsgDeployERC20 + +func (x *MsgDeployERC20) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDeployERC20)(x) +} + +func (x *MsgDeployERC20) slowProtoReflect() protoreflect.Message { + mi := &file_irismod_token_v1_tx_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgDeployERC20_messageType fastReflection_MsgDeployERC20_messageType +var _ protoreflect.MessageType = fastReflection_MsgDeployERC20_messageType{} + +type fastReflection_MsgDeployERC20_messageType struct{} + +func (x fastReflection_MsgDeployERC20_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDeployERC20)(nil) +} +func (x fastReflection_MsgDeployERC20_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDeployERC20) +} +func (x fastReflection_MsgDeployERC20_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDeployERC20 +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgDeployERC20) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDeployERC20 +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgDeployERC20) Type() protoreflect.MessageType { + return _fastReflection_MsgDeployERC20_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgDeployERC20) New() protoreflect.Message { + return new(fastReflection_MsgDeployERC20) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgDeployERC20) Interface() protoreflect.ProtoMessage { + return (*MsgDeployERC20)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgDeployERC20) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Symbol != "" { + value := protoreflect.ValueOfString(x.Symbol) + if !f(fd_MsgDeployERC20_symbol, value) { + return + } + } + if x.Name != "" { + value := protoreflect.ValueOfString(x.Name) + if !f(fd_MsgDeployERC20_name, value) { + return + } + } + if x.Scale != uint32(0) { + value := protoreflect.ValueOfUint32(x.Scale) + if !f(fd_MsgDeployERC20_scale, value) { + return + } + } + if x.MinUnit != "" { + value := protoreflect.ValueOfString(x.MinUnit) + if !f(fd_MsgDeployERC20_min_unit, value) { + return + } + } + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgDeployERC20_authority, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgDeployERC20) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "irismod.token.v1.MsgDeployERC20.symbol": + return x.Symbol != "" + case "irismod.token.v1.MsgDeployERC20.name": + return x.Name != "" + case "irismod.token.v1.MsgDeployERC20.scale": + return x.Scale != uint32(0) + case "irismod.token.v1.MsgDeployERC20.min_unit": + return x.MinUnit != "" + case "irismod.token.v1.MsgDeployERC20.authority": + return x.Authority != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgDeployERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgDeployERC20 does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDeployERC20) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "irismod.token.v1.MsgDeployERC20.symbol": + x.Symbol = "" + case "irismod.token.v1.MsgDeployERC20.name": + x.Name = "" + case "irismod.token.v1.MsgDeployERC20.scale": + x.Scale = uint32(0) + case "irismod.token.v1.MsgDeployERC20.min_unit": + x.MinUnit = "" + case "irismod.token.v1.MsgDeployERC20.authority": + x.Authority = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgDeployERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgDeployERC20 does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgDeployERC20) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "irismod.token.v1.MsgDeployERC20.symbol": + value := x.Symbol + return protoreflect.ValueOfString(value) + case "irismod.token.v1.MsgDeployERC20.name": + value := x.Name + return protoreflect.ValueOfString(value) + case "irismod.token.v1.MsgDeployERC20.scale": + value := x.Scale + return protoreflect.ValueOfUint32(value) + case "irismod.token.v1.MsgDeployERC20.min_unit": + value := x.MinUnit + return protoreflect.ValueOfString(value) + case "irismod.token.v1.MsgDeployERC20.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgDeployERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgDeployERC20 does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDeployERC20) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "irismod.token.v1.MsgDeployERC20.symbol": + x.Symbol = value.Interface().(string) + case "irismod.token.v1.MsgDeployERC20.name": + x.Name = value.Interface().(string) + case "irismod.token.v1.MsgDeployERC20.scale": + x.Scale = uint32(value.Uint()) + case "irismod.token.v1.MsgDeployERC20.min_unit": + x.MinUnit = value.Interface().(string) + case "irismod.token.v1.MsgDeployERC20.authority": + x.Authority = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgDeployERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgDeployERC20 does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDeployERC20) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irismod.token.v1.MsgDeployERC20.symbol": + panic(fmt.Errorf("field symbol of message irismod.token.v1.MsgDeployERC20 is not mutable")) + case "irismod.token.v1.MsgDeployERC20.name": + panic(fmt.Errorf("field name of message irismod.token.v1.MsgDeployERC20 is not mutable")) + case "irismod.token.v1.MsgDeployERC20.scale": + panic(fmt.Errorf("field scale of message irismod.token.v1.MsgDeployERC20 is not mutable")) + case "irismod.token.v1.MsgDeployERC20.min_unit": + panic(fmt.Errorf("field min_unit of message irismod.token.v1.MsgDeployERC20 is not mutable")) + case "irismod.token.v1.MsgDeployERC20.authority": + panic(fmt.Errorf("field authority of message irismod.token.v1.MsgDeployERC20 is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgDeployERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgDeployERC20 does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgDeployERC20) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irismod.token.v1.MsgDeployERC20.symbol": + return protoreflect.ValueOfString("") + case "irismod.token.v1.MsgDeployERC20.name": + return protoreflect.ValueOfString("") + case "irismod.token.v1.MsgDeployERC20.scale": + return protoreflect.ValueOfUint32(uint32(0)) + case "irismod.token.v1.MsgDeployERC20.min_unit": + return protoreflect.ValueOfString("") + case "irismod.token.v1.MsgDeployERC20.authority": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgDeployERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgDeployERC20 does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgDeployERC20) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in irismod.token.v1.MsgDeployERC20", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgDeployERC20) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDeployERC20) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgDeployERC20) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgDeployERC20) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgDeployERC20) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Symbol) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Name) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Scale != 0 { + n += 1 + runtime.Sov(uint64(x.Scale)) + } + l = len(x.MinUnit) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgDeployERC20) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0x2a + } + if len(x.MinUnit) > 0 { + i -= len(x.MinUnit) + copy(dAtA[i:], x.MinUnit) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinUnit))) + i-- + dAtA[i] = 0x22 + } + if x.Scale != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Scale)) + i-- + dAtA[i] = 0x18 + } + if len(x.Name) > 0 { + i -= len(x.Name) + copy(dAtA[i:], x.Name) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) + i-- + dAtA[i] = 0x12 + } + if len(x.Symbol) > 0 { + i -= len(x.Symbol) + copy(dAtA[i:], x.Symbol) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Symbol))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgDeployERC20) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeployERC20: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeployERC20: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scale", wireType) + } + x.Scale = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Scale |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinUnit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.MinUnit = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgDeployERC20Response protoreflect.MessageDescriptor +) + +func init() { + file_irismod_token_v1_tx_proto_init() + md_MsgDeployERC20Response = File_irismod_token_v1_tx_proto.Messages().ByName("MsgDeployERC20Response") +} + +var _ protoreflect.Message = (*fastReflection_MsgDeployERC20Response)(nil) + +type fastReflection_MsgDeployERC20Response MsgDeployERC20Response + +func (x *MsgDeployERC20Response) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDeployERC20Response)(x) +} + +func (x *MsgDeployERC20Response) slowProtoReflect() protoreflect.Message { + mi := &file_irismod_token_v1_tx_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgDeployERC20Response_messageType fastReflection_MsgDeployERC20Response_messageType +var _ protoreflect.MessageType = fastReflection_MsgDeployERC20Response_messageType{} + +type fastReflection_MsgDeployERC20Response_messageType struct{} + +func (x fastReflection_MsgDeployERC20Response_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDeployERC20Response)(nil) +} +func (x fastReflection_MsgDeployERC20Response_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDeployERC20Response) +} +func (x fastReflection_MsgDeployERC20Response_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDeployERC20Response +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgDeployERC20Response) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDeployERC20Response +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgDeployERC20Response) Type() protoreflect.MessageType { + return _fastReflection_MsgDeployERC20Response_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgDeployERC20Response) New() protoreflect.Message { + return new(fastReflection_MsgDeployERC20Response) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgDeployERC20Response) Interface() protoreflect.ProtoMessage { + return (*MsgDeployERC20Response)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgDeployERC20Response) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgDeployERC20Response) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgDeployERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgDeployERC20Response does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDeployERC20Response) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgDeployERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgDeployERC20Response does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgDeployERC20Response) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgDeployERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgDeployERC20Response does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDeployERC20Response) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgDeployERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgDeployERC20Response does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDeployERC20Response) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgDeployERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgDeployERC20Response does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgDeployERC20Response) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgDeployERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgDeployERC20Response does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgDeployERC20Response) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in irismod.token.v1.MsgDeployERC20Response", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgDeployERC20Response) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDeployERC20Response) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgDeployERC20Response) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgDeployERC20Response) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgDeployERC20Response) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgDeployERC20Response) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgDeployERC20Response) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeployERC20Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeployERC20Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgSwapToERC20 protoreflect.MessageDescriptor + fd_MsgSwapToERC20_amount protoreflect.FieldDescriptor + fd_MsgSwapToERC20_sender protoreflect.FieldDescriptor + fd_MsgSwapToERC20_receiver protoreflect.FieldDescriptor +) + +func init() { + file_irismod_token_v1_tx_proto_init() + md_MsgSwapToERC20 = File_irismod_token_v1_tx_proto.Messages().ByName("MsgSwapToERC20") + fd_MsgSwapToERC20_amount = md_MsgSwapToERC20.Fields().ByName("amount") + fd_MsgSwapToERC20_sender = md_MsgSwapToERC20.Fields().ByName("sender") + fd_MsgSwapToERC20_receiver = md_MsgSwapToERC20.Fields().ByName("receiver") +} + +var _ protoreflect.Message = (*fastReflection_MsgSwapToERC20)(nil) + +type fastReflection_MsgSwapToERC20 MsgSwapToERC20 + +func (x *MsgSwapToERC20) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSwapToERC20)(x) +} + +func (x *MsgSwapToERC20) slowProtoReflect() protoreflect.Message { + mi := &file_irismod_token_v1_tx_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgSwapToERC20_messageType fastReflection_MsgSwapToERC20_messageType +var _ protoreflect.MessageType = fastReflection_MsgSwapToERC20_messageType{} + +type fastReflection_MsgSwapToERC20_messageType struct{} + +func (x fastReflection_MsgSwapToERC20_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSwapToERC20)(nil) +} +func (x fastReflection_MsgSwapToERC20_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSwapToERC20) +} +func (x fastReflection_MsgSwapToERC20_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSwapToERC20 +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSwapToERC20) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSwapToERC20 +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSwapToERC20) Type() protoreflect.MessageType { + return _fastReflection_MsgSwapToERC20_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSwapToERC20) New() protoreflect.Message { + return new(fastReflection_MsgSwapToERC20) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSwapToERC20) Interface() protoreflect.ProtoMessage { + return (*MsgSwapToERC20)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSwapToERC20) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Amount != nil { + value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + if !f(fd_MsgSwapToERC20_amount, value) { + return + } + } + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_MsgSwapToERC20_sender, value) { + return + } + } + if x.Receiver != "" { + value := protoreflect.ValueOfString(x.Receiver) + if !f(fd_MsgSwapToERC20_receiver, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSwapToERC20) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "irismod.token.v1.MsgSwapToERC20.amount": + return x.Amount != nil + case "irismod.token.v1.MsgSwapToERC20.sender": + return x.Sender != "" + case "irismod.token.v1.MsgSwapToERC20.receiver": + return x.Receiver != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapToERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapToERC20 does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSwapToERC20) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "irismod.token.v1.MsgSwapToERC20.amount": + x.Amount = nil + case "irismod.token.v1.MsgSwapToERC20.sender": + x.Sender = "" + case "irismod.token.v1.MsgSwapToERC20.receiver": + x.Receiver = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapToERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapToERC20 does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSwapToERC20) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "irismod.token.v1.MsgSwapToERC20.amount": + value := x.Amount + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "irismod.token.v1.MsgSwapToERC20.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "irismod.token.v1.MsgSwapToERC20.receiver": + value := x.Receiver + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapToERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapToERC20 does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSwapToERC20) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "irismod.token.v1.MsgSwapToERC20.amount": + x.Amount = value.Message().Interface().(*v1beta1.Coin) + case "irismod.token.v1.MsgSwapToERC20.sender": + x.Sender = value.Interface().(string) + case "irismod.token.v1.MsgSwapToERC20.receiver": + x.Receiver = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapToERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapToERC20 does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSwapToERC20) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irismod.token.v1.MsgSwapToERC20.amount": + if x.Amount == nil { + x.Amount = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + case "irismod.token.v1.MsgSwapToERC20.sender": + panic(fmt.Errorf("field sender of message irismod.token.v1.MsgSwapToERC20 is not mutable")) + case "irismod.token.v1.MsgSwapToERC20.receiver": + panic(fmt.Errorf("field receiver of message irismod.token.v1.MsgSwapToERC20 is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapToERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapToERC20 does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSwapToERC20) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irismod.token.v1.MsgSwapToERC20.amount": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "irismod.token.v1.MsgSwapToERC20.sender": + return protoreflect.ValueOfString("") + case "irismod.token.v1.MsgSwapToERC20.receiver": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapToERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapToERC20 does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSwapToERC20) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in irismod.token.v1.MsgSwapToERC20", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSwapToERC20) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSwapToERC20) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSwapToERC20) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSwapToERC20) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSwapToERC20) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Amount != nil { + l = options.Size(x.Amount) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Receiver) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSwapToERC20) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Receiver) > 0 { + i -= len(x.Receiver) + copy(dAtA[i:], x.Receiver) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Receiver))) + i-- + dAtA[i] = 0x1a + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0x12 + } + if x.Amount != nil { + encoded, err := options.Marshal(x.Amount) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSwapToERC20) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSwapToERC20: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSwapToERC20: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Amount == nil { + x.Amount = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgSwapToERC20Response protoreflect.MessageDescriptor +) + +func init() { + file_irismod_token_v1_tx_proto_init() + md_MsgSwapToERC20Response = File_irismod_token_v1_tx_proto.Messages().ByName("MsgSwapToERC20Response") +} + +var _ protoreflect.Message = (*fastReflection_MsgSwapToERC20Response)(nil) + +type fastReflection_MsgSwapToERC20Response MsgSwapToERC20Response + +func (x *MsgSwapToERC20Response) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSwapToERC20Response)(x) +} + +func (x *MsgSwapToERC20Response) slowProtoReflect() protoreflect.Message { + mi := &file_irismod_token_v1_tx_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgSwapToERC20Response_messageType fastReflection_MsgSwapToERC20Response_messageType +var _ protoreflect.MessageType = fastReflection_MsgSwapToERC20Response_messageType{} + +type fastReflection_MsgSwapToERC20Response_messageType struct{} + +func (x fastReflection_MsgSwapToERC20Response_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSwapToERC20Response)(nil) +} +func (x fastReflection_MsgSwapToERC20Response_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSwapToERC20Response) +} +func (x fastReflection_MsgSwapToERC20Response_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSwapToERC20Response +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSwapToERC20Response) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSwapToERC20Response +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSwapToERC20Response) Type() protoreflect.MessageType { + return _fastReflection_MsgSwapToERC20Response_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSwapToERC20Response) New() protoreflect.Message { + return new(fastReflection_MsgSwapToERC20Response) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSwapToERC20Response) Interface() protoreflect.ProtoMessage { + return (*MsgSwapToERC20Response)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSwapToERC20Response) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSwapToERC20Response) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapToERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapToERC20Response does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSwapToERC20Response) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapToERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapToERC20Response does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSwapToERC20Response) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapToERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapToERC20Response does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSwapToERC20Response) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapToERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapToERC20Response does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSwapToERC20Response) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapToERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapToERC20Response does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSwapToERC20Response) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapToERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapToERC20Response does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSwapToERC20Response) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in irismod.token.v1.MsgSwapToERC20Response", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSwapToERC20Response) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSwapToERC20Response) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSwapToERC20Response) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSwapToERC20Response) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSwapToERC20Response) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSwapToERC20Response) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSwapToERC20Response) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSwapToERC20Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSwapToERC20Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgSwapFromERC20 protoreflect.MessageDescriptor + fd_MsgSwapFromERC20_wanted_amount protoreflect.FieldDescriptor + fd_MsgSwapFromERC20_sender protoreflect.FieldDescriptor + fd_MsgSwapFromERC20_receiver protoreflect.FieldDescriptor +) + +func init() { + file_irismod_token_v1_tx_proto_init() + md_MsgSwapFromERC20 = File_irismod_token_v1_tx_proto.Messages().ByName("MsgSwapFromERC20") + fd_MsgSwapFromERC20_wanted_amount = md_MsgSwapFromERC20.Fields().ByName("wanted_amount") + fd_MsgSwapFromERC20_sender = md_MsgSwapFromERC20.Fields().ByName("sender") + fd_MsgSwapFromERC20_receiver = md_MsgSwapFromERC20.Fields().ByName("receiver") +} + +var _ protoreflect.Message = (*fastReflection_MsgSwapFromERC20)(nil) + +type fastReflection_MsgSwapFromERC20 MsgSwapFromERC20 + +func (x *MsgSwapFromERC20) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSwapFromERC20)(x) +} + +func (x *MsgSwapFromERC20) slowProtoReflect() protoreflect.Message { + mi := &file_irismod_token_v1_tx_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgSwapFromERC20_messageType fastReflection_MsgSwapFromERC20_messageType +var _ protoreflect.MessageType = fastReflection_MsgSwapFromERC20_messageType{} + +type fastReflection_MsgSwapFromERC20_messageType struct{} + +func (x fastReflection_MsgSwapFromERC20_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSwapFromERC20)(nil) +} +func (x fastReflection_MsgSwapFromERC20_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSwapFromERC20) +} +func (x fastReflection_MsgSwapFromERC20_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSwapFromERC20 +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSwapFromERC20) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSwapFromERC20 +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSwapFromERC20) Type() protoreflect.MessageType { + return _fastReflection_MsgSwapFromERC20_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSwapFromERC20) New() protoreflect.Message { + return new(fastReflection_MsgSwapFromERC20) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSwapFromERC20) Interface() protoreflect.ProtoMessage { + return (*MsgSwapFromERC20)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSwapFromERC20) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.WantedAmount != nil { + value := protoreflect.ValueOfMessage(x.WantedAmount.ProtoReflect()) + if !f(fd_MsgSwapFromERC20_wanted_amount, value) { + return + } + } + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_MsgSwapFromERC20_sender, value) { + return + } + } + if x.Receiver != "" { + value := protoreflect.ValueOfString(x.Receiver) + if !f(fd_MsgSwapFromERC20_receiver, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSwapFromERC20) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "irismod.token.v1.MsgSwapFromERC20.wanted_amount": + return x.WantedAmount != nil + case "irismod.token.v1.MsgSwapFromERC20.sender": + return x.Sender != "" + case "irismod.token.v1.MsgSwapFromERC20.receiver": + return x.Receiver != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapFromERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapFromERC20 does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSwapFromERC20) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "irismod.token.v1.MsgSwapFromERC20.wanted_amount": + x.WantedAmount = nil + case "irismod.token.v1.MsgSwapFromERC20.sender": + x.Sender = "" + case "irismod.token.v1.MsgSwapFromERC20.receiver": + x.Receiver = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapFromERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapFromERC20 does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSwapFromERC20) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "irismod.token.v1.MsgSwapFromERC20.wanted_amount": + value := x.WantedAmount + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "irismod.token.v1.MsgSwapFromERC20.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "irismod.token.v1.MsgSwapFromERC20.receiver": + value := x.Receiver + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapFromERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapFromERC20 does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSwapFromERC20) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "irismod.token.v1.MsgSwapFromERC20.wanted_amount": + x.WantedAmount = value.Message().Interface().(*v1beta1.Coin) + case "irismod.token.v1.MsgSwapFromERC20.sender": + x.Sender = value.Interface().(string) + case "irismod.token.v1.MsgSwapFromERC20.receiver": + x.Receiver = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapFromERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapFromERC20 does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSwapFromERC20) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irismod.token.v1.MsgSwapFromERC20.wanted_amount": + if x.WantedAmount == nil { + x.WantedAmount = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.WantedAmount.ProtoReflect()) + case "irismod.token.v1.MsgSwapFromERC20.sender": + panic(fmt.Errorf("field sender of message irismod.token.v1.MsgSwapFromERC20 is not mutable")) + case "irismod.token.v1.MsgSwapFromERC20.receiver": + panic(fmt.Errorf("field receiver of message irismod.token.v1.MsgSwapFromERC20 is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapFromERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapFromERC20 does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSwapFromERC20) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irismod.token.v1.MsgSwapFromERC20.wanted_amount": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "irismod.token.v1.MsgSwapFromERC20.sender": + return protoreflect.ValueOfString("") + case "irismod.token.v1.MsgSwapFromERC20.receiver": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapFromERC20")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapFromERC20 does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSwapFromERC20) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in irismod.token.v1.MsgSwapFromERC20", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSwapFromERC20) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSwapFromERC20) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSwapFromERC20) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSwapFromERC20) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSwapFromERC20) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.WantedAmount != nil { + l = options.Size(x.WantedAmount) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Receiver) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSwapFromERC20) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Receiver) > 0 { + i -= len(x.Receiver) + copy(dAtA[i:], x.Receiver) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Receiver))) + i-- + dAtA[i] = 0x1a + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0x12 + } + if x.WantedAmount != nil { + encoded, err := options.Marshal(x.WantedAmount) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSwapFromERC20) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSwapFromERC20: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSwapFromERC20: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WantedAmount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.WantedAmount == nil { + x.WantedAmount = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.WantedAmount); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgSwapFromERC20Response protoreflect.MessageDescriptor +) + +func init() { + file_irismod_token_v1_tx_proto_init() + md_MsgSwapFromERC20Response = File_irismod_token_v1_tx_proto.Messages().ByName("MsgSwapFromERC20Response") +} + +var _ protoreflect.Message = (*fastReflection_MsgSwapFromERC20Response)(nil) + +type fastReflection_MsgSwapFromERC20Response MsgSwapFromERC20Response + +func (x *MsgSwapFromERC20Response) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSwapFromERC20Response)(x) +} + +func (x *MsgSwapFromERC20Response) slowProtoReflect() protoreflect.Message { + mi := &file_irismod_token_v1_tx_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgSwapFromERC20Response_messageType fastReflection_MsgSwapFromERC20Response_messageType +var _ protoreflect.MessageType = fastReflection_MsgSwapFromERC20Response_messageType{} + +type fastReflection_MsgSwapFromERC20Response_messageType struct{} + +func (x fastReflection_MsgSwapFromERC20Response_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSwapFromERC20Response)(nil) +} +func (x fastReflection_MsgSwapFromERC20Response_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSwapFromERC20Response) +} +func (x fastReflection_MsgSwapFromERC20Response_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSwapFromERC20Response +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSwapFromERC20Response) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSwapFromERC20Response +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSwapFromERC20Response) Type() protoreflect.MessageType { + return _fastReflection_MsgSwapFromERC20Response_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSwapFromERC20Response) New() protoreflect.Message { + return new(fastReflection_MsgSwapFromERC20Response) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSwapFromERC20Response) Interface() protoreflect.ProtoMessage { + return (*MsgSwapFromERC20Response)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSwapFromERC20Response) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSwapFromERC20Response) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapFromERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapFromERC20Response does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSwapFromERC20Response) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapFromERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapFromERC20Response does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSwapFromERC20Response) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapFromERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapFromERC20Response does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSwapFromERC20Response) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapFromERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapFromERC20Response does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSwapFromERC20Response) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapFromERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapFromERC20Response does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSwapFromERC20Response) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irismod.token.v1.MsgSwapFromERC20Response")) + } + panic(fmt.Errorf("message irismod.token.v1.MsgSwapFromERC20Response does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSwapFromERC20Response) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in irismod.token.v1.MsgSwapFromERC20Response", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSwapFromERC20Response) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSwapFromERC20Response) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSwapFromERC20Response) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSwapFromERC20Response) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSwapFromERC20Response) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSwapFromERC20Response) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSwapFromERC20Response) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSwapFromERC20Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSwapFromERC20Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -7355,6 +10209,259 @@ func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return file_irismod_token_v1_tx_proto_rawDescGZIP(), []int{13} } +// MsgDeployERC20 defines an SDK message for DeployERC20 +type MsgDeployERC20 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Scale uint32 `protobuf:"varint,3,opt,name=scale,proto3" json:"scale,omitempty"` + MinUnit string `protobuf:"bytes,4,opt,name=min_unit,json=minUnit,proto3" json:"min_unit,omitempty"` + Authority string `protobuf:"bytes,5,opt,name=authority,proto3" json:"authority,omitempty"` +} + +func (x *MsgDeployERC20) Reset() { + *x = MsgDeployERC20{} + if protoimpl.UnsafeEnabled { + mi := &file_irismod_token_v1_tx_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgDeployERC20) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgDeployERC20) ProtoMessage() {} + +// Deprecated: Use MsgDeployERC20.ProtoReflect.Descriptor instead. +func (*MsgDeployERC20) Descriptor() ([]byte, []int) { + return file_irismod_token_v1_tx_proto_rawDescGZIP(), []int{14} +} + +func (x *MsgDeployERC20) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *MsgDeployERC20) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *MsgDeployERC20) GetScale() uint32 { + if x != nil { + return x.Scale + } + return 0 +} + +func (x *MsgDeployERC20) GetMinUnit() string { + if x != nil { + return x.MinUnit + } + return "" +} + +func (x *MsgDeployERC20) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +// MsgDeployERC20Response defines the Msg/DeployERC20 response type +type MsgDeployERC20Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgDeployERC20Response) Reset() { + *x = MsgDeployERC20Response{} + if protoimpl.UnsafeEnabled { + mi := &file_irismod_token_v1_tx_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgDeployERC20Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgDeployERC20Response) ProtoMessage() {} + +// Deprecated: Use MsgDeployERC20Response.ProtoReflect.Descriptor instead. +func (*MsgDeployERC20Response) Descriptor() ([]byte, []int) { + return file_irismod_token_v1_tx_proto_rawDescGZIP(), []int{15} +} + +// MsgSwapToERC20 defines an SDK message for SwapToERC20 +type MsgSwapToERC20 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Amount *v1beta1.Coin `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` +} + +func (x *MsgSwapToERC20) Reset() { + *x = MsgSwapToERC20{} + if protoimpl.UnsafeEnabled { + mi := &file_irismod_token_v1_tx_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSwapToERC20) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSwapToERC20) ProtoMessage() {} + +// Deprecated: Use MsgSwapToERC20.ProtoReflect.Descriptor instead. +func (*MsgSwapToERC20) Descriptor() ([]byte, []int) { + return file_irismod_token_v1_tx_proto_rawDescGZIP(), []int{16} +} + +func (x *MsgSwapToERC20) GetAmount() *v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +func (x *MsgSwapToERC20) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *MsgSwapToERC20) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +// MsgSwapToERC20Response defines the Msg/SwapToERC20 response type +type MsgSwapToERC20Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgSwapToERC20Response) Reset() { + *x = MsgSwapToERC20Response{} + if protoimpl.UnsafeEnabled { + mi := &file_irismod_token_v1_tx_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSwapToERC20Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSwapToERC20Response) ProtoMessage() {} + +// Deprecated: Use MsgSwapToERC20Response.ProtoReflect.Descriptor instead. +func (*MsgSwapToERC20Response) Descriptor() ([]byte, []int) { + return file_irismod_token_v1_tx_proto_rawDescGZIP(), []int{17} +} + +// MsgSwapFromERC20 defines an SDK message for SwapFromERC20 +type MsgSwapFromERC20 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WantedAmount *v1beta1.Coin `protobuf:"bytes,1,opt,name=wanted_amount,json=wantedAmount,proto3" json:"wanted_amount,omitempty"` + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` +} + +func (x *MsgSwapFromERC20) Reset() { + *x = MsgSwapFromERC20{} + if protoimpl.UnsafeEnabled { + mi := &file_irismod_token_v1_tx_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSwapFromERC20) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSwapFromERC20) ProtoMessage() {} + +// Deprecated: Use MsgSwapFromERC20.ProtoReflect.Descriptor instead. +func (*MsgSwapFromERC20) Descriptor() ([]byte, []int) { + return file_irismod_token_v1_tx_proto_rawDescGZIP(), []int{18} +} + +func (x *MsgSwapFromERC20) GetWantedAmount() *v1beta1.Coin { + if x != nil { + return x.WantedAmount + } + return nil +} + +func (x *MsgSwapFromERC20) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *MsgSwapFromERC20) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +// MsgSwapFromERC20Response defines the Msg/SwapFromERC20 response type +type MsgSwapFromERC20Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgSwapFromERC20Response) Reset() { + *x = MsgSwapFromERC20Response{} + if protoimpl.UnsafeEnabled { + mi := &file_irismod_token_v1_tx_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSwapFromERC20Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSwapFromERC20Response) ProtoMessage() {} + +// Deprecated: Use MsgSwapFromERC20Response.ProtoReflect.Descriptor instead. +func (*MsgSwapFromERC20Response) Descriptor() ([]byte, []int) { + return file_irismod_token_v1_tx_proto_rawDescGZIP(), []int{19} +} + var File_irismod_token_v1_tx_proto protoreflect.FileDescriptor var file_irismod_token_v1_tx_proto_rawDesc = []byte{ @@ -7462,61 +10569,117 @@ var file_irismod_token_v1_tx_proto_rawDesc = []byte{ 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, - 0x8f, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x56, 0x0a, 0x0a, 0x49, 0x73, 0x73, 0x75, 0x65, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1f, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xa5, 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x45, 0x52, 0x43, + 0x32, 0x30, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x73, + 0x63, 0x61, 0x6c, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x69, 0x6e, 0x5f, 0x75, 0x6e, 0x69, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x55, 0x6e, 0x69, 0x74, 0x12, + 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x45, 0x52, 0x43, 0x32, 0x30, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x53, 0x77, 0x61, 0x70, 0x54, 0x6f, 0x45, + 0x52, 0x43, 0x32, 0x30, 0x12, 0x37, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, + 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, + 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, + 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x53, + 0x77, 0x61, 0x70, 0x54, 0x6f, 0x45, 0x52, 0x43, 0x32, 0x30, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xcd, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x53, 0x77, 0x61, 0x70, 0x46, 0x72, + 0x6f, 0x6d, 0x45, 0x52, 0x43, 0x32, 0x30, 0x12, 0x44, 0x0a, 0x0d, 0x77, 0x61, 0x6e, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, + 0x0c, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, + 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, + 0x34, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x53, 0x77, 0x61, 0x70, 0x46, 0x72, 0x6f, + 0x6d, 0x45, 0x52, 0x43, 0x32, 0x30, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa6, + 0x07, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x56, 0x0a, 0x0a, 0x49, 0x73, 0x73, 0x75, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1f, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x73, 0x73, 0x75, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x27, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x73, 0x73, 0x75, - 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x27, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, - 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x73, 0x73, - 0x75, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x53, 0x0a, 0x09, 0x45, 0x64, 0x69, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x69, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, + 0x0a, 0x09, 0x45, 0x64, 0x69, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x69, 0x72, + 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x26, 0x2e, 0x69, 0x72, + 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x09, 0x4d, 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x1e, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x1a, 0x26, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x09, 0x42, 0x75, 0x72, 0x6e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x26, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, 0x6e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, + 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4f, 0x77, + 0x6e, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x1a, 0x2f, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x26, 0x2e, 0x69, - 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x09, 0x4d, 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x12, 0x1e, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x1a, 0x26, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x09, 0x42, 0x75, 0x72, - 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, - 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, - 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x26, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, - 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x42, 0x75, 0x72, - 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, - 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4f, - 0x77, 0x6e, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x1a, 0x2f, 0x2e, + 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, + 0x0c, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x21, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, - 0x0a, 0x0c, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x21, - 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x1a, 0x29, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0c, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x69, + 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x1a, 0x29, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0b, 0x53, + 0x77, 0x61, 0x70, 0x54, 0x6f, 0x45, 0x52, 0x43, 0x32, 0x30, 0x12, 0x20, 0x2e, 0x69, 0x72, 0x69, + 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x53, 0x77, 0x61, 0x70, 0x54, 0x6f, 0x45, 0x52, 0x43, 0x32, 0x30, 0x1a, 0x28, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, - 0x29, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, - 0x01, 0x42, 0xbe, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, - 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, - 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x76, 0x31, 0xa2, 0x02, - 0x03, 0x49, 0x54, 0x58, 0xaa, 0x02, 0x10, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, - 0x64, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x49, 0x72, 0x69, - 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x49, 0x72, 0x69, 0x73, - 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0xc8, 0xe1, - 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4d, 0x73, 0x67, 0x53, 0x77, 0x61, 0x70, 0x54, 0x6f, 0x45, 0x52, 0x43, 0x32, 0x30, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x0d, 0x53, 0x77, 0x61, 0x70, 0x46, 0x72, + 0x6f, 0x6d, 0x45, 0x52, 0x43, 0x32, 0x30, 0x12, 0x22, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, + 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x77, + 0x61, 0x70, 0x46, 0x72, 0x6f, 0x6d, 0x45, 0x52, 0x43, 0x32, 0x30, 0x1a, 0x2a, 0x2e, 0x69, 0x72, + 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x53, 0x77, 0x61, 0x70, 0x46, 0x72, 0x6f, 0x6d, 0x45, 0x52, 0x43, 0x32, 0x30, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, + 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x29, 0x2e, 0x69, 0x72, 0x69, + 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0b, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x45, + 0x52, 0x43, 0x32, 0x30, 0x12, 0x20, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x45, 0x52, 0x43, 0x32, 0x30, 0x1a, 0x28, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, + 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x45, 0x52, 0x43, 0x32, 0x30, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xbe, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x14, + 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, + 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2f, 0x76, 0x31, + 0x3b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x54, 0x58, 0xaa, 0x02, + 0x10, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x10, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -7531,7 +10694,7 @@ func file_irismod_token_v1_tx_proto_rawDescGZIP() []byte { return file_irismod_token_v1_tx_proto_rawDescData } -var file_irismod_token_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_irismod_token_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_irismod_token_v1_tx_proto_goTypes = []interface{}{ (*MsgIssueToken)(nil), // 0: irismod.token.v1.MsgIssueToken (*MsgIssueTokenResponse)(nil), // 1: irismod.token.v1.MsgIssueTokenResponse @@ -7547,34 +10710,48 @@ var file_irismod_token_v1_tx_proto_goTypes = []interface{}{ (*MsgSwapFeeTokenResponse)(nil), // 11: irismod.token.v1.MsgSwapFeeTokenResponse (*MsgUpdateParams)(nil), // 12: irismod.token.v1.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 13: irismod.token.v1.MsgUpdateParamsResponse - (*v1beta1.Coin)(nil), // 14: cosmos.base.v1beta1.Coin - (*Params)(nil), // 15: irismod.token.v1.Params + (*MsgDeployERC20)(nil), // 14: irismod.token.v1.MsgDeployERC20 + (*MsgDeployERC20Response)(nil), // 15: irismod.token.v1.MsgDeployERC20Response + (*MsgSwapToERC20)(nil), // 16: irismod.token.v1.MsgSwapToERC20 + (*MsgSwapToERC20Response)(nil), // 17: irismod.token.v1.MsgSwapToERC20Response + (*MsgSwapFromERC20)(nil), // 18: irismod.token.v1.MsgSwapFromERC20 + (*MsgSwapFromERC20Response)(nil), // 19: irismod.token.v1.MsgSwapFromERC20Response + (*v1beta1.Coin)(nil), // 20: cosmos.base.v1beta1.Coin + (*Params)(nil), // 21: irismod.token.v1.Params } var file_irismod_token_v1_tx_proto_depIdxs = []int32{ - 14, // 0: irismod.token.v1.MsgMintToken.coin:type_name -> cosmos.base.v1beta1.Coin - 14, // 1: irismod.token.v1.MsgBurnToken.coin:type_name -> cosmos.base.v1beta1.Coin - 14, // 2: irismod.token.v1.MsgSwapFeeToken.fee_paid:type_name -> cosmos.base.v1beta1.Coin - 14, // 3: irismod.token.v1.MsgSwapFeeTokenResponse.fee_got:type_name -> cosmos.base.v1beta1.Coin - 15, // 4: irismod.token.v1.MsgUpdateParams.params:type_name -> irismod.token.v1.Params - 0, // 5: irismod.token.v1.Msg.IssueToken:input_type -> irismod.token.v1.MsgIssueToken - 4, // 6: irismod.token.v1.Msg.EditToken:input_type -> irismod.token.v1.MsgEditToken - 6, // 7: irismod.token.v1.Msg.MintToken:input_type -> irismod.token.v1.MsgMintToken - 8, // 8: irismod.token.v1.Msg.BurnToken:input_type -> irismod.token.v1.MsgBurnToken - 2, // 9: irismod.token.v1.Msg.TransferTokenOwner:input_type -> irismod.token.v1.MsgTransferTokenOwner - 10, // 10: irismod.token.v1.Msg.SwapFeeToken:input_type -> irismod.token.v1.MsgSwapFeeToken - 12, // 11: irismod.token.v1.Msg.UpdateParams:input_type -> irismod.token.v1.MsgUpdateParams - 1, // 12: irismod.token.v1.Msg.IssueToken:output_type -> irismod.token.v1.MsgIssueTokenResponse - 5, // 13: irismod.token.v1.Msg.EditToken:output_type -> irismod.token.v1.MsgEditTokenResponse - 7, // 14: irismod.token.v1.Msg.MintToken:output_type -> irismod.token.v1.MsgMintTokenResponse - 9, // 15: irismod.token.v1.Msg.BurnToken:output_type -> irismod.token.v1.MsgBurnTokenResponse - 3, // 16: irismod.token.v1.Msg.TransferTokenOwner:output_type -> irismod.token.v1.MsgTransferTokenOwnerResponse - 11, // 17: irismod.token.v1.Msg.SwapFeeToken:output_type -> irismod.token.v1.MsgSwapFeeTokenResponse - 13, // 18: irismod.token.v1.Msg.UpdateParams:output_type -> irismod.token.v1.MsgUpdateParamsResponse - 12, // [12:19] is the sub-list for method output_type - 5, // [5:12] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 20, // 0: irismod.token.v1.MsgMintToken.coin:type_name -> cosmos.base.v1beta1.Coin + 20, // 1: irismod.token.v1.MsgBurnToken.coin:type_name -> cosmos.base.v1beta1.Coin + 20, // 2: irismod.token.v1.MsgSwapFeeToken.fee_paid:type_name -> cosmos.base.v1beta1.Coin + 20, // 3: irismod.token.v1.MsgSwapFeeTokenResponse.fee_got:type_name -> cosmos.base.v1beta1.Coin + 21, // 4: irismod.token.v1.MsgUpdateParams.params:type_name -> irismod.token.v1.Params + 20, // 5: irismod.token.v1.MsgSwapToERC20.amount:type_name -> cosmos.base.v1beta1.Coin + 20, // 6: irismod.token.v1.MsgSwapFromERC20.wanted_amount:type_name -> cosmos.base.v1beta1.Coin + 0, // 7: irismod.token.v1.Msg.IssueToken:input_type -> irismod.token.v1.MsgIssueToken + 4, // 8: irismod.token.v1.Msg.EditToken:input_type -> irismod.token.v1.MsgEditToken + 6, // 9: irismod.token.v1.Msg.MintToken:input_type -> irismod.token.v1.MsgMintToken + 8, // 10: irismod.token.v1.Msg.BurnToken:input_type -> irismod.token.v1.MsgBurnToken + 2, // 11: irismod.token.v1.Msg.TransferTokenOwner:input_type -> irismod.token.v1.MsgTransferTokenOwner + 10, // 12: irismod.token.v1.Msg.SwapFeeToken:input_type -> irismod.token.v1.MsgSwapFeeToken + 16, // 13: irismod.token.v1.Msg.SwapToERC20:input_type -> irismod.token.v1.MsgSwapToERC20 + 18, // 14: irismod.token.v1.Msg.SwapFromERC20:input_type -> irismod.token.v1.MsgSwapFromERC20 + 12, // 15: irismod.token.v1.Msg.UpdateParams:input_type -> irismod.token.v1.MsgUpdateParams + 14, // 16: irismod.token.v1.Msg.DeployERC20:input_type -> irismod.token.v1.MsgDeployERC20 + 1, // 17: irismod.token.v1.Msg.IssueToken:output_type -> irismod.token.v1.MsgIssueTokenResponse + 5, // 18: irismod.token.v1.Msg.EditToken:output_type -> irismod.token.v1.MsgEditTokenResponse + 7, // 19: irismod.token.v1.Msg.MintToken:output_type -> irismod.token.v1.MsgMintTokenResponse + 9, // 20: irismod.token.v1.Msg.BurnToken:output_type -> irismod.token.v1.MsgBurnTokenResponse + 3, // 21: irismod.token.v1.Msg.TransferTokenOwner:output_type -> irismod.token.v1.MsgTransferTokenOwnerResponse + 11, // 22: irismod.token.v1.Msg.SwapFeeToken:output_type -> irismod.token.v1.MsgSwapFeeTokenResponse + 17, // 23: irismod.token.v1.Msg.SwapToERC20:output_type -> irismod.token.v1.MsgSwapToERC20Response + 19, // 24: irismod.token.v1.Msg.SwapFromERC20:output_type -> irismod.token.v1.MsgSwapFromERC20Response + 13, // 25: irismod.token.v1.Msg.UpdateParams:output_type -> irismod.token.v1.MsgUpdateParamsResponse + 15, // 26: irismod.token.v1.Msg.DeployERC20:output_type -> irismod.token.v1.MsgDeployERC20Response + 17, // [17:27] is the sub-list for method output_type + 7, // [7:17] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_irismod_token_v1_tx_proto_init() } @@ -7752,6 +10929,78 @@ func file_irismod_token_v1_tx_proto_init() { return nil } } + file_irismod_token_v1_tx_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDeployERC20); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_irismod_token_v1_tx_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDeployERC20Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_irismod_token_v1_tx_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSwapToERC20); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_irismod_token_v1_tx_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSwapToERC20Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_irismod_token_v1_tx_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSwapFromERC20); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_irismod_token_v1_tx_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSwapFromERC20Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -7759,7 +11008,7 @@ func file_irismod_token_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_irismod_token_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 20, NumExtensions: 0, NumServices: 1, }, diff --git a/api/irismod/token/v1/tx_grpc.pb.go b/api/irismod/token/v1/tx_grpc.pb.go index c5f859c6..3d9655fc 100644 --- a/api/irismod/token/v1/tx_grpc.pb.go +++ b/api/irismod/token/v1/tx_grpc.pb.go @@ -25,7 +25,10 @@ const ( Msg_BurnToken_FullMethodName = "/irismod.token.v1.Msg/BurnToken" Msg_TransferTokenOwner_FullMethodName = "/irismod.token.v1.Msg/TransferTokenOwner" Msg_SwapFeeToken_FullMethodName = "/irismod.token.v1.Msg/SwapFeeToken" + Msg_SwapToERC20_FullMethodName = "/irismod.token.v1.Msg/SwapToERC20" + Msg_SwapFromERC20_FullMethodName = "/irismod.token.v1.Msg/SwapFromERC20" Msg_UpdateParams_FullMethodName = "/irismod.token.v1.Msg/UpdateParams" + Msg_DeployERC20_FullMethodName = "/irismod.token.v1.Msg/DeployERC20" ) // MsgClient is the client API for Msg service. @@ -42,13 +45,19 @@ type MsgClient interface { BurnToken(ctx context.Context, in *MsgBurnToken, opts ...grpc.CallOption) (*MsgBurnTokenResponse, error) // TransferTokenOwner defines a method for transfering token owner TransferTokenOwner(ctx context.Context, in *MsgTransferTokenOwner, opts ...grpc.CallOption) (*MsgTransferTokenOwnerResponse, error) - // SwapFeeToken defines a method for swap some fee token + // SwapFeeToken defines a method for swapping between IRIS and ERIS SwapFeeToken(ctx context.Context, in *MsgSwapFeeToken, opts ...grpc.CallOption) (*MsgSwapFeeTokenResponse, error) + // SwapToERC20 defines a method for swapping some native token to its ERC20 counterpart + SwapToERC20(ctx context.Context, in *MsgSwapToERC20, opts ...grpc.CallOption) (*MsgSwapToERC20Response, error) + // SwapFromERC20 defines a method for swapping some ERC20 token to its native counterpart + SwapFromERC20(ctx context.Context, in *MsgSwapFromERC20, opts ...grpc.CallOption) (*MsgSwapFromERC20Response, error) // UpdateParams defines a governance operation for updating the token // module parameters. The authority is defined in the keeper. // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // DeployERC20 defines a governance operation for deploying an ERC20 contract that binds to a native token + DeployERC20(ctx context.Context, in *MsgDeployERC20, opts ...grpc.CallOption) (*MsgDeployERC20Response, error) } type msgClient struct { @@ -113,6 +122,24 @@ func (c *msgClient) SwapFeeToken(ctx context.Context, in *MsgSwapFeeToken, opts return out, nil } +func (c *msgClient) SwapToERC20(ctx context.Context, in *MsgSwapToERC20, opts ...grpc.CallOption) (*MsgSwapToERC20Response, error) { + out := new(MsgSwapToERC20Response) + err := c.cc.Invoke(ctx, Msg_SwapToERC20_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SwapFromERC20(ctx context.Context, in *MsgSwapFromERC20, opts ...grpc.CallOption) (*MsgSwapFromERC20Response, error) { + out := new(MsgSwapFromERC20Response) + err := c.cc.Invoke(ctx, Msg_SwapFromERC20_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { out := new(MsgUpdateParamsResponse) err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...) @@ -122,6 +149,15 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } +func (c *msgClient) DeployERC20(ctx context.Context, in *MsgDeployERC20, opts ...grpc.CallOption) (*MsgDeployERC20Response, error) { + out := new(MsgDeployERC20Response) + err := c.cc.Invoke(ctx, Msg_DeployERC20_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -136,13 +172,19 @@ type MsgServer interface { BurnToken(context.Context, *MsgBurnToken) (*MsgBurnTokenResponse, error) // TransferTokenOwner defines a method for transfering token owner TransferTokenOwner(context.Context, *MsgTransferTokenOwner) (*MsgTransferTokenOwnerResponse, error) - // SwapFeeToken defines a method for swap some fee token + // SwapFeeToken defines a method for swapping between IRIS and ERIS SwapFeeToken(context.Context, *MsgSwapFeeToken) (*MsgSwapFeeTokenResponse, error) + // SwapToERC20 defines a method for swapping some native token to its ERC20 counterpart + SwapToERC20(context.Context, *MsgSwapToERC20) (*MsgSwapToERC20Response, error) + // SwapFromERC20 defines a method for swapping some ERC20 token to its native counterpart + SwapFromERC20(context.Context, *MsgSwapFromERC20) (*MsgSwapFromERC20Response, error) // UpdateParams defines a governance operation for updating the token // module parameters. The authority is defined in the keeper. // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // DeployERC20 defines a governance operation for deploying an ERC20 contract that binds to a native token + DeployERC20(context.Context, *MsgDeployERC20) (*MsgDeployERC20Response, error) mustEmbedUnimplementedMsgServer() } @@ -168,9 +210,18 @@ func (UnimplementedMsgServer) TransferTokenOwner(context.Context, *MsgTransferTo func (UnimplementedMsgServer) SwapFeeToken(context.Context, *MsgSwapFeeToken) (*MsgSwapFeeTokenResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SwapFeeToken not implemented") } +func (UnimplementedMsgServer) SwapToERC20(context.Context, *MsgSwapToERC20) (*MsgSwapToERC20Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method SwapToERC20 not implemented") +} +func (UnimplementedMsgServer) SwapFromERC20(context.Context, *MsgSwapFromERC20) (*MsgSwapFromERC20Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method SwapFromERC20 not implemented") +} func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } +func (UnimplementedMsgServer) DeployERC20(context.Context, *MsgDeployERC20) (*MsgDeployERC20Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeployERC20 not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -292,6 +343,42 @@ func _Msg_SwapFeeToken_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_SwapToERC20_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSwapToERC20) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SwapToERC20(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_SwapToERC20_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SwapToERC20(ctx, req.(*MsgSwapToERC20)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SwapFromERC20_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSwapFromERC20) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SwapFromERC20(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_SwapFromERC20_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SwapFromERC20(ctx, req.(*MsgSwapFromERC20)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateParams) if err := dec(in); err != nil { @@ -310,6 +397,24 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_DeployERC20_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeployERC20) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DeployERC20(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_DeployERC20_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DeployERC20(ctx, req.(*MsgDeployERC20)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -341,10 +446,22 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "SwapFeeToken", Handler: _Msg_SwapFeeToken_Handler, }, + { + MethodName: "SwapToERC20", + Handler: _Msg_SwapToERC20_Handler, + }, + { + MethodName: "SwapFromERC20", + Handler: _Msg_SwapFromERC20_Handler, + }, { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "DeployERC20", + Handler: _Msg_DeployERC20_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "irismod/token/v1/tx.proto", diff --git a/api/irismod/token/v1beta1/token.pulsar.go b/api/irismod/token/v1beta1/token.pulsar.go index 340a78dd..4a9797eb 100644 --- a/api/irismod/token/v1beta1/token.pulsar.go +++ b/api/irismod/token/v1beta1/token.pulsar.go @@ -1596,17 +1596,17 @@ var file_irismod_token_v1beta1_token_proto_rawDesc = []byte{ 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x22, 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x65, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xae, 0x01, - 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x42, 0x0a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, - 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x54, 0x58, 0xaa, 0x02, 0x0d, - 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0xca, 0x02, 0x0d, - 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0xe2, 0x02, 0x19, - 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x49, 0x72, 0x69, 0x73, - 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, + 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, + 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x0a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, + 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x54, + 0x58, 0xaa, 0x02, 0x0d, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0xca, 0x02, 0x0d, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0xe2, 0x02, 0x19, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, + 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/api/irismod/token/v1beta1/tx.pulsar.go b/api/irismod/token/v1beta1/tx.pulsar.go index d8bbc676..adc895fe 100644 --- a/api/irismod/token/v1beta1/tx.pulsar.go +++ b/api/irismod/token/v1beta1/tx.pulsar.go @@ -5508,18 +5508,18 @@ var file_irismod_token_v1beta1_tx_proto_rawDesc = []byte{ 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x1a, 0x2c, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4f, 0x77, 0x6e, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xab, 0x01, 0x0a, 0x11, 0x63, - 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6e, 0x65, 0x74, 0x2f, - 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x73, - 0x6d, 0x6f, 0x64, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x49, 0x54, 0x58, 0xaa, 0x02, 0x0d, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, - 0x64, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0xca, 0x02, 0x0d, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, - 0x64, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0xe2, 0x02, 0x19, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, - 0x64, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x3a, 0x3a, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xab, 0x01, 0xc8, 0xe1, 0x1e, + 0x00, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x72, 0x69, 0x73, + 0x6e, 0x65, 0x74, 0x2f, 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x69, 0x72, 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x54, 0x58, 0xaa, 0x02, 0x0d, 0x49, 0x72, + 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0xca, 0x02, 0x0d, 0x49, 0x72, + 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0xe2, 0x02, 0x19, 0x49, 0x72, + 0x69, 0x73, 0x6d, 0x6f, 0x64, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x49, 0x72, 0x69, 0x73, 0x6d, 0x6f, + 0x64, 0x3a, 0x3a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/contracts/Token.sol b/contracts/Token.sol new file mode 100644 index 00000000..4b451ba6 --- /dev/null +++ b/contracts/Token.sol @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; +import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; + +contract Token is ERC20, ERC20Permit, Ownable, ReentrancyGuard { + event SwapToNative(string to, uint256 amount); + + uint8 private _scale; + + constructor( + string memory name_, + string memory symbol_, + uint8 scale_ + ) ERC20(name_, symbol_) ERC20Permit(name_) Ownable(msg.sender) { + _scale = scale_; + } + + /** + * @dev Returns the number of decimals used to get its user representation. + * For example, if `decimals` equals `2`, a balance of `505` tokens should + * be displayed to a user as `5.05` (`505 / 10 ** 2`). + * + * Tokens usually opt for a value of 18, imitating the relationship between + * Ether and Wei. This is the default value returned by this function, unless + * it's overridden. + * + * NOTE: This information is only used for _display_ purposes: it in + * no way affects any of the arithmetic of the contract, including + * {IERC20-balanceOf} and {IERC20-transfer}. + */ + function decimals() public view override returns (uint8) { + return _scale; + } + + /** + * @dev Creates a `amount` amount of tokens and assigns them to `account`, by transferring it from address(0). + * Relies on the `_update` mechanism + * + * Emits a {Transfer} event with `from` set to the zero address. + * + * NOTE: This function is not virtual, {_update} should be overridden instead. + */ + function mint(address account, uint256 amount) public onlyOwner { + _mint(account, amount); + } + + /** + * @dev Destroys a `amount` amount of tokens from `account`, lowering the total supply. + * Relies on the `_update` mechanism. + * + * Emits a {Transfer} event with `to` set to the zero address. + * + * NOTE: This function is not virtual, {_update} should be overridden instead + */ + function burn(address account, uint256 amount) public onlyOwner { + _burn(account, amount); + } + + /** + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `amount` caller must have a balance of at least `amount`. + */ + function swapToNative( + string memory to, + uint256 amount + ) public nonReentrant { + require(bytes(to).length > 0, "to must be a vaild iaa address"); + _burn(msg.sender, amount); + emit SwapToNative(to, amount); + } +} \ No newline at end of file diff --git a/contracts/compiled_contracts/Token.json b/contracts/compiled_contracts/Token.json new file mode 100644 index 00000000..ea02e486 --- /dev/null +++ b/contracts/compiled_contracts/Token.json @@ -0,0 +1,696 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "scale_", + "type": "uint8" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "ERC2612ExpiredSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC2612InvalidSigner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "to", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "SwapToNative", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "to", + "type": "string" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "swapToNative", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bin": "6101606040523480156200001257600080fd5b5060405162002f3238038062002f328339818101604052810190620000389190620005c0565b3383806040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525086868160039081620000849190620008a5565b508060049081620000969190620008a5565b505050620000af600583620001fd60201b90919060201c565b6101208181525050620000cd600682620001fd60201b90919060201c565b6101408181525050818051906020012060e08181525050808051906020012061010081815250504660a081815250506200010c6200025560201b60201c565b608081815250503073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1681525050505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620001bf5760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620001b69190620009d1565b60405180910390fd5b620001d081620002b260201b60201c565b50600160098190555080600a60006101000a81548160ff021916908360ff16021790555050505062000b8f565b600060208351101562000223576200021b836200037860201b60201c565b90506200024f565b826200023583620003e560201b60201c565b6000019081620002469190620008a5565b5060ff60001b90505b92915050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60e0516101005146306040516020016200029795949392919062000a1a565b60405160208183030381529060405280519060200120905090565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080829050601f81511115620003c857826040517f305a27a9000000000000000000000000000000000000000000000000000000008152600401620003bf919062000ac9565b60405180910390fd5b805181620003d69062000b1f565b60001c1760001b915050919050565b6000819050919050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b62000458826200040d565b810181811067ffffffffffffffff821117156200047a57620004796200041e565b5b80604052505050565b60006200048f620003ef565b90506200049d82826200044d565b919050565b600067ffffffffffffffff821115620004c057620004bf6200041e565b5b620004cb826200040d565b9050602081019050919050565b60005b83811015620004f8578082015181840152602081019050620004db565b60008484015250505050565b60006200051b6200051584620004a2565b62000483565b9050828152602081018484840111156200053a576200053962000408565b5b62000547848285620004d8565b509392505050565b600082601f83011262000567576200056662000403565b5b81516200057984826020860162000504565b91505092915050565b600060ff82169050919050565b6200059a8162000582565b8114620005a657600080fd5b50565b600081519050620005ba816200058f565b92915050565b600080600060608486031215620005dc57620005db620003f9565b5b600084015167ffffffffffffffff811115620005fd57620005fc620003fe565b5b6200060b868287016200054f565b935050602084015167ffffffffffffffff8111156200062f576200062e620003fe565b5b6200063d868287016200054f565b92505060406200065086828701620005a9565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620006ad57607f821691505b602082108103620006c357620006c262000665565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200072d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620006ee565b620007398683620006ee565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b600062000786620007806200077a8462000751565b6200075b565b62000751565b9050919050565b6000819050919050565b620007a28362000765565b620007ba620007b1826200078d565b848454620006fb565b825550505050565b600090565b620007d1620007c2565b620007de81848462000797565b505050565b5b818110156200080657620007fa600082620007c7565b600181019050620007e4565b5050565b601f82111562000855576200081f81620006c9565b6200082a84620006de565b810160208510156200083a578190505b620008526200084985620006de565b830182620007e3565b50505b505050565b600082821c905092915050565b60006200087a600019846008026200085a565b1980831691505092915050565b600062000895838362000867565b9150826002028217905092915050565b620008b0826200065a565b67ffffffffffffffff811115620008cc57620008cb6200041e565b5b620008d8825462000694565b620008e58282856200080a565b600060209050601f8311600181146200091d576000841562000908578287015190505b62000914858262000887565b86555062000984565b601f1984166200092d86620006c9565b60005b82811015620009575784890151825560018201915060208501945060208101905062000930565b8683101562000977578489015162000973601f89168262000867565b8355505b6001600288020188555050505b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620009b9826200098c565b9050919050565b620009cb81620009ac565b82525050565b6000602082019050620009e86000830184620009c0565b92915050565b6000819050919050565b62000a0381620009ee565b82525050565b62000a148162000751565b82525050565b600060a08201905062000a316000830188620009f8565b62000a406020830187620009f8565b62000a4f6040830186620009f8565b62000a5e606083018562000a09565b62000a6d6080830184620009c0565b9695505050505050565b600082825260208201905092915050565b600062000a95826200065a565b62000aa1818562000a77565b935062000ab3818560208601620004d8565b62000abe816200040d565b840191505092915050565b6000602082019050818103600083015262000ae5818462000a88565b905092915050565b600081519050919050565b6000819050602082019050919050565b600062000b168251620009ee565b80915050919050565b600062000b2c8262000aed565b8262000b388462000af8565b905062000b458162000b08565b9250602082101562000b885762000b837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83602003600802620006ee565b831692505b5050919050565b60805160a05160c05160e05161010051610120516101405161234862000bea6000396000610f6201526000610f27015260006114770152600061145601526000610b8101526000610bd701526000610c0001526123486000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c8063715018a6116100ad5780639dc29fac116100715780639dc29fac14610300578063a9059cbb1461031c578063d505accf1461034c578063dd62ed3e14610368578063f2fde38b1461039857610121565b8063715018a6146102665780637ecebe001461027057806384b0196e146102a05780638da5cb5b146102c457806395d89b41146102e257610121565b8063313ce567116100f4578063313ce567146101c25780633644e515146101e057806340c10f19146101fe57806354162c9c1461021a57806370a082311461023657610121565b806306fdde0314610126578063095ea7b31461014457806318160ddd1461017457806323b872dd14610192575b600080fd5b61012e6103b4565b60405161013b9190611964565b60405180910390f35b61015e60048036038101906101599190611a2e565b610446565b60405161016b9190611a89565b60405180910390f35b61017c610469565b6040516101899190611ab3565b60405180910390f35b6101ac60048036038101906101a79190611ace565b610473565b6040516101b99190611a89565b60405180910390f35b6101ca6104a2565b6040516101d79190611b3d565b60405180910390f35b6101e86104b9565b6040516101f59190611b71565b60405180910390f35b61021860048036038101906102139190611a2e565b6104c8565b005b610234600480360381019061022f9190611cc1565b6104de565b005b610250600480360381019061024b9190611d1d565b610579565b60405161025d9190611ab3565b60405180910390f35b61026e6105c1565b005b61028a60048036038101906102859190611d1d565b6105d5565b6040516102979190611ab3565b60405180910390f35b6102a86105e7565b6040516102bb9796959493929190611e52565b60405180910390f35b6102cc610691565b6040516102d99190611ed6565b60405180910390f35b6102ea6106bb565b6040516102f79190611964565b60405180910390f35b61031a60048036038101906103159190611a2e565b61074d565b005b61033660048036038101906103319190611a2e565b610763565b6040516103439190611a89565b60405180910390f35b61036660048036038101906103619190611f49565b610786565b005b610382600480360381019061037d9190611feb565b6108ce565b60405161038f9190611ab3565b60405180910390f35b6103b260048036038101906103ad9190611d1d565b610955565b005b6060600380546103c39061205a565b80601f01602080910402602001604051908101604052809291908181526020018280546103ef9061205a565b801561043c5780601f106104115761010080835404028352916020019161043c565b820191906000526020600020905b81548152906001019060200180831161041f57829003601f168201915b5050505050905090565b6000806104516109db565b905061045e8185856109e3565b600191505092915050565b6000600254905090565b60008061047e6109db565b905061048b8582856109f5565b610496858585610a89565b60019150509392505050565b6000600a60009054906101000a900460ff16905090565b60006104c3610b7d565b905090565b6104d0610c34565b6104da8282610cbb565b5050565b6104e6610d3d565b600082511161052a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610521906120d7565b60405180910390fd5b6105343382610d83565b7fdc8816a42330f36689bab19260b5da3dda186ae243971d08f90739246368ea6782826040516105659291906120f7565b60405180910390a1610575610e05565b5050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6105c9610c34565b6105d36000610e0f565b565b60006105e082610ed5565b9050919050565b6000606080600080600060606105fb610f1e565b610603610f59565b46306000801b600067ffffffffffffffff81111561062457610623611b96565b5b6040519080825280602002602001820160405280156106525781602001602082028036833780820191505090505b507f0f00000000000000000000000000000000000000000000000000000000000000959493929190965096509650965096509650965090919293949596565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600480546106ca9061205a565b80601f01602080910402602001604051908101604052809291908181526020018280546106f69061205a565b80156107435780601f1061071857610100808354040283529160200191610743565b820191906000526020600020905b81548152906001019060200180831161072657829003601f168201915b5050505050905090565b610755610c34565b61075f8282610d83565b5050565b60008061076e6109db565b905061077b818585610a89565b600191505092915050565b834211156107cb57836040517f627913020000000000000000000000000000000000000000000000000000000081526004016107c29190611ab3565b60405180910390fd5b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886107fa8c610f94565b8960405160200161081096959493929190612127565b604051602081830303815290604052805190602001209050600061083382610feb565b9050600061084382878787611005565b90508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146108b757808a6040517f4b800e460000000000000000000000000000000000000000000000000000000081526004016108ae929190612188565b60405180910390fd5b6108c28a8a8a6109e3565b50505050505050505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61095d610c34565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036109cf5760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016109c69190611ed6565b60405180910390fd5b6109d881610e0f565b50565b600033905090565b6109f08383836001611035565b505050565b6000610a0184846108ce565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610a835781811015610a73578281836040517ffb8f41b2000000000000000000000000000000000000000000000000000000008152600401610a6a939291906121b1565b60405180910390fd5b610a8284848484036000611035565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610afb5760006040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401610af29190611ed6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610b6d5760006040517fec442f05000000000000000000000000000000000000000000000000000000008152600401610b649190611ed6565b60405180910390fd5b610b7883838361120c565b505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16148015610bf957507f000000000000000000000000000000000000000000000000000000000000000046145b15610c26577f00000000000000000000000000000000000000000000000000000000000000009050610c31565b610c2e611431565b90505b90565b610c3c6109db565b73ffffffffffffffffffffffffffffffffffffffff16610c5a610691565b73ffffffffffffffffffffffffffffffffffffffff1614610cb957610c7d6109db565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610cb09190611ed6565b60405180910390fd5b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610d2d5760006040517fec442f05000000000000000000000000000000000000000000000000000000008152600401610d249190611ed6565b60405180910390fd5b610d396000838361120c565b5050565b600260095403610d79576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600981905550565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610df55760006040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401610dec9190611ed6565b60405180910390fd5b610e018260008361120c565b5050565b6001600981905550565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060610f5460057f00000000000000000000000000000000000000000000000000000000000000006114c790919063ffffffff16565b905090565b6060610f8f60067f00000000000000000000000000000000000000000000000000000000000000006114c790919063ffffffff16565b905090565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190600101919050559050919050565b6000610ffe610ff8610b7d565b83611577565b9050919050565b600080600080611017888888886115b8565b92509250925061102782826116ac565b829350505050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036110a75760006040517fe602df0500000000000000000000000000000000000000000000000000000000815260040161109e9190611ed6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036111195760006040517f94280d620000000000000000000000000000000000000000000000000000000081526004016111109190611ed6565b60405180910390fd5b81600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508015611206578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516111fd9190611ab3565b60405180910390a35b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361125e5780600260008282546112529190612217565b92505081905550611331565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156112ea578381836040517fe450d38c0000000000000000000000000000000000000000000000000000000081526004016112e1939291906121b1565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361137a57806002600082825403925050819055506113c7565b806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516114249190611ab3565b60405180910390a3505050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000046306040516020016114ac95949392919061224b565b60405160208183030381529060405280519060200120905090565b606060ff60001b83146114e4576114dd83611810565b9050611571565b8180546114f09061205a565b80601f016020809104026020016040519081016040528092919081815260200182805461151c9061205a565b80156115695780601f1061153e57610100808354040283529160200191611569565b820191906000526020600020905b81548152906001019060200180831161154c57829003601f168201915b505050505090505b92915050565b60006040517f190100000000000000000000000000000000000000000000000000000000000081528360028201528260228201526042812091505092915050565b60008060007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08460001c11156115f85760006003859250925092506116a2565b60006001888888886040516000815260200160405260405161161d949392919061229e565b6020604051602081039080840390855afa15801561163f573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361169357600060016000801b935093509350506116a2565b8060008060001b935093509350505b9450945094915050565b600060038111156116c0576116bf6122e3565b5b8260038111156116d3576116d26122e3565b5b031561180c57600160038111156116ed576116ec6122e3565b5b826003811115611700576116ff6122e3565b5b03611737576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600381111561174b5761174a6122e3565b5b82600381111561175e5761175d6122e3565b5b036117a3578060001c6040517ffce698f700000000000000000000000000000000000000000000000000000000815260040161179a9190611ab3565b60405180910390fd5b6003808111156117b6576117b56122e3565b5b8260038111156117c9576117c86122e3565b5b0361180b57806040517fd78bce0c0000000000000000000000000000000000000000000000000000000081526004016118029190611b71565b60405180910390fd5b5b5050565b6060600061181d83611884565b90506000602067ffffffffffffffff81111561183c5761183b611b96565b5b6040519080825280601f01601f19166020018201604052801561186e5781602001600182028036833780820191505090505b5090508181528360208201528092505050919050565b60008060ff8360001c169050601f8111156118cb576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80915050919050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561190e5780820151818401526020810190506118f3565b60008484015250505050565b6000601f19601f8301169050919050565b6000611936826118d4565b61194081856118df565b93506119508185602086016118f0565b6119598161191a565b840191505092915050565b6000602082019050818103600083015261197e818461192b565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006119c58261199a565b9050919050565b6119d5816119ba565b81146119e057600080fd5b50565b6000813590506119f2816119cc565b92915050565b6000819050919050565b611a0b816119f8565b8114611a1657600080fd5b50565b600081359050611a2881611a02565b92915050565b60008060408385031215611a4557611a44611990565b5b6000611a53858286016119e3565b9250506020611a6485828601611a19565b9150509250929050565b60008115159050919050565b611a8381611a6e565b82525050565b6000602082019050611a9e6000830184611a7a565b92915050565b611aad816119f8565b82525050565b6000602082019050611ac86000830184611aa4565b92915050565b600080600060608486031215611ae757611ae6611990565b5b6000611af5868287016119e3565b9350506020611b06868287016119e3565b9250506040611b1786828701611a19565b9150509250925092565b600060ff82169050919050565b611b3781611b21565b82525050565b6000602082019050611b526000830184611b2e565b92915050565b6000819050919050565b611b6b81611b58565b82525050565b6000602082019050611b866000830184611b62565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611bce8261191a565b810181811067ffffffffffffffff82111715611bed57611bec611b96565b5b80604052505050565b6000611c00611986565b9050611c0c8282611bc5565b919050565b600067ffffffffffffffff821115611c2c57611c2b611b96565b5b611c358261191a565b9050602081019050919050565b82818337600083830152505050565b6000611c64611c5f84611c11565b611bf6565b905082815260208101848484011115611c8057611c7f611b91565b5b611c8b848285611c42565b509392505050565b600082601f830112611ca857611ca7611b8c565b5b8135611cb8848260208601611c51565b91505092915050565b60008060408385031215611cd857611cd7611990565b5b600083013567ffffffffffffffff811115611cf657611cf5611995565b5b611d0285828601611c93565b9250506020611d1385828601611a19565b9150509250929050565b600060208284031215611d3357611d32611990565b5b6000611d41848285016119e3565b91505092915050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b611d7f81611d4a565b82525050565b611d8e816119ba565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611dc9816119f8565b82525050565b6000611ddb8383611dc0565b60208301905092915050565b6000602082019050919050565b6000611dff82611d94565b611e098185611d9f565b9350611e1483611db0565b8060005b83811015611e45578151611e2c8882611dcf565b9750611e3783611de7565b925050600181019050611e18565b5085935050505092915050565b600060e082019050611e67600083018a611d76565b8181036020830152611e79818961192b565b90508181036040830152611e8d818861192b565b9050611e9c6060830187611aa4565b611ea96080830186611d85565b611eb660a0830185611b62565b81810360c0830152611ec88184611df4565b905098975050505050505050565b6000602082019050611eeb6000830184611d85565b92915050565b611efa81611b21565b8114611f0557600080fd5b50565b600081359050611f1781611ef1565b92915050565b611f2681611b58565b8114611f3157600080fd5b50565b600081359050611f4381611f1d565b92915050565b600080600080600080600060e0888a031215611f6857611f67611990565b5b6000611f768a828b016119e3565b9750506020611f878a828b016119e3565b9650506040611f988a828b01611a19565b9550506060611fa98a828b01611a19565b9450506080611fba8a828b01611f08565b93505060a0611fcb8a828b01611f34565b92505060c0611fdc8a828b01611f34565b91505092959891949750929550565b6000806040838503121561200257612001611990565b5b6000612010858286016119e3565b9250506020612021858286016119e3565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061207257607f821691505b6020821081036120855761208461202b565b5b50919050565b7f746f206d757374206265207661696c6420696161206164647265737300000000600082015250565b60006120c1601c836118df565b91506120cc8261208b565b602082019050919050565b600060208201905081810360008301526120f0816120b4565b9050919050565b60006040820190508181036000830152612111818561192b565b90506121206020830184611aa4565b9392505050565b600060c08201905061213c6000830189611b62565b6121496020830188611d85565b6121566040830187611d85565b6121636060830186611aa4565b6121706080830185611aa4565b61217d60a0830184611aa4565b979650505050505050565b600060408201905061219d6000830185611d85565b6121aa6020830184611d85565b9392505050565b60006060820190506121c66000830186611d85565b6121d36020830185611aa4565b6121e06040830184611aa4565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612222826119f8565b915061222d836119f8565b9250828201905080821115612245576122446121e8565b5b92915050565b600060a0820190506122606000830188611b62565b61226d6020830187611b62565b61227a6040830186611b62565b6122876060830185611aa4565b6122946080830184611d85565b9695505050505050565b60006080820190506122b36000830187611b62565b6122c06020830186611b2e565b6122cd6040830185611b62565b6122da6060830184611b62565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea264697066735822122022afbe51f591a4cccbb58dddb6c34f0d06152f4414a4b9a91eb36dc9bd79eafe64736f6c63430008170033" +} diff --git a/contracts/erc20.go b/contracts/erc20.go new file mode 100644 index 00000000..a0b667ab --- /dev/null +++ b/contracts/erc20.go @@ -0,0 +1,31 @@ +package contracts + +import ( + _ "embed" + "encoding/json" + + "github.com/irisnet/irismod/types" +) + +const ( + EventSwapToNative = "SwapToNative" +) + +var ( + //go:embed compiled_contracts/Token.json + ERC20JSON []byte //nolint: golint + + // ERC20TokenContract is the compiled erc20 contract + ERC20TokenContract types.CompiledContract +) + +func init() { + err := json.Unmarshal(ERC20JSON, &ERC20TokenContract) + if err != nil { + panic(err) + } + + if len(ERC20TokenContract.Bin) == 0 { + panic("load contract failed") + } +} \ No newline at end of file diff --git a/contracts/erc20_test.go b/contracts/erc20_test.go new file mode 100644 index 00000000..dc222137 --- /dev/null +++ b/contracts/erc20_test.go @@ -0,0 +1,14 @@ +package contracts_test + +import ( + "testing" + + "github.com/irisnet/irismod/contracts" +) + + +func TestERC20(t *testing.T) { + for k,v := range contracts.ERC20TokenContract.ABI.Events { + t.Logf("event:%s ,id: %s", k,v.ID) + } +} \ No newline at end of file diff --git a/contracts/package-lock.json b/contracts/package-lock.json new file mode 100644 index 00000000..82e8428c --- /dev/null +++ b/contracts/package-lock.json @@ -0,0 +1,18 @@ +{ + "name": "irismod", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "irismod", + "dependencies": { + "@openzeppelin/contracts": "^5.0.2" + } + }, + "node_modules/@openzeppelin/contracts": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.0.2.tgz", + "integrity": "sha512-ytPc6eLGcHHnapAZ9S+5qsdomhjo6QBHTDRRBFfTxXIpsicMhVPouPgmUPebZZZGX7vt9USA+Z+0M0dSVtSUEA==" + } + } +} diff --git a/contracts/package.json b/contracts/package.json new file mode 100644 index 00000000..3da2449c --- /dev/null +++ b/contracts/package.json @@ -0,0 +1,6 @@ +{ + "name": "irismod", + "dependencies": { + "@openzeppelin/contracts": "^5.0.2" + } +} diff --git a/go.mod b/go.mod index 97d9485e..b841936f 100644 --- a/go.mod +++ b/go.mod @@ -13,6 +13,7 @@ require ( github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.47.9-ics-lsm github.com/cosmos/gogoproto v1.4.10 + github.com/ethereum/go-ethereum v1.10.26 github.com/golang/protobuf v1.5.3 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 @@ -82,6 +83,7 @@ require ( github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-stack/stack v1.8.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -110,6 +112,7 @@ require ( github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect + github.com/holiman/uint256 v1.2.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect diff --git a/go.sum b/go.sum index fdcf4755..18df2a5f 100644 --- a/go.sum +++ b/go.sum @@ -219,6 +219,8 @@ github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= +github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= @@ -394,6 +396,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ethereum/go-ethereum v1.10.26 h1:i/7d9RBBwiXCEuyduBQzJw/mKmnvzsN14jqBmytw72s= +github.com/ethereum/go-ethereum v1.10.26/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= @@ -437,6 +441,7 @@ github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= @@ -445,6 +450,7 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91 github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -650,6 +656,9 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= +github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= +github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= @@ -737,6 +746,7 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -785,6 +795,7 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= @@ -867,6 +878,7 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -894,6 +906,7 @@ github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0 github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -962,6 +975,8 @@ github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tklauser/go-sysconf v0.3.5 h1:uu3Xl4nkLzQfXNsWn15rPc/HQCJKObbt1dKJeWp3vU4= +github.com/tklauser/numcpus v0.2.2 h1:oyhllyrScuYI6g+h/zUvNXNp1wy7x8qQy3t/piefldA= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= diff --git a/modules/token/keeper/msg_server.go b/modules/token/keeper/msg_server.go index 67a3b681..51b26944 100644 --- a/modules/token/keeper/msg_server.go +++ b/modules/token/keeper/msg_server.go @@ -15,6 +15,7 @@ type msgServer struct { k Keeper } + var _ v1.MsgServer = msgServer{} // NewMsgServerImpl returns an implementation of the token MsgServer interface @@ -269,3 +270,19 @@ func (m msgServer) UpdateParams( } return &v1.MsgUpdateParamsResponse{}, nil } + +// DeployERC20 implements v1.MsgServer. +func (m msgServer) DeployERC20(context.Context, *v1.MsgDeployERC20) (*v1.MsgDeployERC20Response, error) { + panic("unimplemented") +} + +// SwapFromERC20 implements v1.MsgServer. +func (m msgServer) SwapFromERC20(context.Context, *v1.MsgSwapFromERC20) (*v1.MsgSwapFromERC20Response, error) { + panic("unimplemented") +} + +// SwapToERC20 implements v1.MsgServer. +func (m msgServer) SwapToERC20(context.Context, *v1.MsgSwapToERC20) (*v1.MsgSwapToERC20Response, error) { + panic("unimplemented") +} + diff --git a/modules/token/types/v1/event.pb.go b/modules/token/types/v1/event.pb.go new file mode 100644 index 00000000..aaac3530 --- /dev/null +++ b/modules/token/types/v1/event.pb.go @@ -0,0 +1,1094 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: irismod/token/v1/event.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// EventDeployERC20 is an event emitted when deploying ERC20. +type EventDeployERC20 struct { + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Scale uint32 `protobuf:"varint,3,opt,name=scale,proto3" json:"scale,omitempty"` + MinUnit string `protobuf:"bytes,4,opt,name=min_unit,json=minUnit,proto3" json:"min_unit,omitempty"` + Contract string `protobuf:"bytes,5,opt,name=contract,proto3" json:"contract,omitempty"` +} + +func (m *EventDeployERC20) Reset() { *m = EventDeployERC20{} } +func (m *EventDeployERC20) String() string { return proto.CompactTextString(m) } +func (*EventDeployERC20) ProtoMessage() {} +func (*EventDeployERC20) Descriptor() ([]byte, []int) { + return fileDescriptor_b15e65dad722cc70, []int{0} +} +func (m *EventDeployERC20) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventDeployERC20) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventDeployERC20.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventDeployERC20) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventDeployERC20.Merge(m, src) +} +func (m *EventDeployERC20) XXX_Size() int { + return m.Size() +} +func (m *EventDeployERC20) XXX_DiscardUnknown() { + xxx_messageInfo_EventDeployERC20.DiscardUnknown(m) +} + +var xxx_messageInfo_EventDeployERC20 proto.InternalMessageInfo + +// EventSwapToERC20 is an event emitted when swapping token from native token to +// ERC20. +type EventSwapToERC20 struct { + Amount types.Coin `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount"` + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` + ToContract string `protobuf:"bytes,4,opt,name=to_contract,json=toContract,proto3" json:"to_contract,omitempty"` +} + +func (m *EventSwapToERC20) Reset() { *m = EventSwapToERC20{} } +func (m *EventSwapToERC20) String() string { return proto.CompactTextString(m) } +func (*EventSwapToERC20) ProtoMessage() {} +func (*EventSwapToERC20) Descriptor() ([]byte, []int) { + return fileDescriptor_b15e65dad722cc70, []int{1} +} +func (m *EventSwapToERC20) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSwapToERC20) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSwapToERC20.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventSwapToERC20) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSwapToERC20.Merge(m, src) +} +func (m *EventSwapToERC20) XXX_Size() int { + return m.Size() +} +func (m *EventSwapToERC20) XXX_DiscardUnknown() { + xxx_messageInfo_EventSwapToERC20.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSwapToERC20 proto.InternalMessageInfo + +// EventSwapFromERC20 is an event emitted when swapping token from ERC20 to +// native token. +type EventSwapFromERC20 struct { + WantedAmount *types.Coin `protobuf:"bytes,1,opt,name=wanted_amount,json=wantedAmount,proto3" json:"wanted_amount,omitempty"` + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` + FromContract string `protobuf:"bytes,4,opt,name=from_contract,json=fromContract,proto3" json:"from_contract,omitempty"` +} + +func (m *EventSwapFromERC20) Reset() { *m = EventSwapFromERC20{} } +func (m *EventSwapFromERC20) String() string { return proto.CompactTextString(m) } +func (*EventSwapFromERC20) ProtoMessage() {} +func (*EventSwapFromERC20) Descriptor() ([]byte, []int) { + return fileDescriptor_b15e65dad722cc70, []int{2} +} +func (m *EventSwapFromERC20) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSwapFromERC20) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSwapFromERC20.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventSwapFromERC20) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSwapFromERC20.Merge(m, src) +} +func (m *EventSwapFromERC20) XXX_Size() int { + return m.Size() +} +func (m *EventSwapFromERC20) XXX_DiscardUnknown() { + xxx_messageInfo_EventSwapFromERC20.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSwapFromERC20 proto.InternalMessageInfo + +func init() { + proto.RegisterType((*EventDeployERC20)(nil), "irismod.token.v1.EventDeployERC20") + proto.RegisterType((*EventSwapToERC20)(nil), "irismod.token.v1.EventSwapToERC20") + proto.RegisterType((*EventSwapFromERC20)(nil), "irismod.token.v1.EventSwapFromERC20") +} + +func init() { proto.RegisterFile("irismod/token/v1/event.proto", fileDescriptor_b15e65dad722cc70) } + +var fileDescriptor_b15e65dad722cc70 = []byte{ + // 448 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x41, 0x6b, 0x13, 0x41, + 0x1c, 0xc5, 0x77, 0x35, 0x8d, 0xed, 0xb4, 0x81, 0x32, 0x04, 0xd9, 0x04, 0xd9, 0x96, 0x7a, 0xe9, + 0xc5, 0x9d, 0x6e, 0x15, 0xbc, 0x09, 0x4d, 0xac, 0x57, 0x61, 0xab, 0x17, 0x2f, 0x61, 0xb2, 0xfb, + 0x37, 0x0e, 0x66, 0xe6, 0x1f, 0x66, 0x26, 0x5b, 0xf2, 0x19, 0xbc, 0xf8, 0x61, 0x3c, 0xf9, 0x09, + 0x72, 0x2c, 0x9e, 0x3c, 0x89, 0x4d, 0xbe, 0x88, 0xec, 0xcc, 0x24, 0x42, 0x0f, 0x22, 0xbd, 0xed, + 0x9b, 0xf7, 0xfe, 0xec, 0xfb, 0xc1, 0x23, 0x4f, 0x84, 0x16, 0x46, 0x62, 0xc5, 0x2c, 0x7e, 0x06, + 0xc5, 0xea, 0x9c, 0x41, 0x0d, 0xca, 0x66, 0x33, 0x8d, 0x16, 0xe9, 0x61, 0x70, 0x33, 0xe7, 0x66, + 0x75, 0xde, 0xef, 0x4e, 0x70, 0x82, 0xce, 0x64, 0xcd, 0x97, 0xcf, 0xf5, 0xd3, 0x12, 0x8d, 0x44, + 0xc3, 0xc6, 0xdc, 0x00, 0xab, 0xf3, 0x31, 0x58, 0x9e, 0xb3, 0x12, 0x85, 0x0a, 0x7e, 0xcf, 0xfb, + 0x23, 0x7f, 0xe8, 0x85, 0xb7, 0x4e, 0xbe, 0xc4, 0xe4, 0xf0, 0xb2, 0xf9, 0xe5, 0x6b, 0x98, 0x4d, + 0x71, 0x71, 0x59, 0x0c, 0xcf, 0xcf, 0xe8, 0x63, 0xd2, 0x36, 0x0b, 0x39, 0xc6, 0x69, 0x12, 0x1f, + 0xc7, 0xa7, 0x7b, 0x45, 0x50, 0x94, 0x92, 0x96, 0xe2, 0x12, 0x92, 0x07, 0xee, 0xd5, 0x7d, 0xd3, + 0x2e, 0xd9, 0x31, 0x25, 0x9f, 0x42, 0xf2, 0xf0, 0x38, 0x3e, 0xed, 0x14, 0x5e, 0xd0, 0x1e, 0xd9, + 0x95, 0x42, 0x8d, 0xe6, 0x4a, 0xd8, 0xa4, 0xe5, 0xd2, 0x8f, 0xa4, 0x50, 0xef, 0x95, 0xb0, 0xb4, + 0x4f, 0x76, 0x4b, 0x54, 0x56, 0xf3, 0xd2, 0x26, 0x3b, 0xce, 0xda, 0xea, 0x93, 0xef, 0x9b, 0x36, + 0x57, 0xd7, 0x7c, 0xf6, 0x0e, 0x7d, 0x9b, 0x97, 0xa4, 0xcd, 0x25, 0xce, 0x95, 0x75, 0x6d, 0xf6, + 0xcf, 0x7b, 0x59, 0x20, 0x68, 0x70, 0xb3, 0x80, 0x9b, 0x0d, 0x51, 0xa8, 0x41, 0x6b, 0xf9, 0xeb, + 0x28, 0x2a, 0x42, 0x9c, 0x9e, 0x91, 0xb6, 0x01, 0x55, 0x81, 0xf6, 0x85, 0x07, 0xc9, 0x8f, 0x6f, + 0xcf, 0xba, 0xe1, 0xf6, 0xa2, 0xaa, 0x34, 0x18, 0x73, 0x65, 0xb5, 0x50, 0x93, 0x22, 0xe4, 0x9a, + 0x6e, 0x1a, 0x4a, 0x10, 0x35, 0x68, 0xc7, 0xb3, 0x57, 0x6c, 0x35, 0x3d, 0x22, 0xfb, 0x16, 0x47, + 0xdb, 0xea, 0x9e, 0x8a, 0x58, 0x1c, 0x6e, 0xca, 0xdf, 0xc6, 0x84, 0x6e, 0xcb, 0xbf, 0xd1, 0x28, + 0x7d, 0xfd, 0x57, 0xa4, 0x73, 0xcd, 0x95, 0x85, 0x6a, 0xf4, 0x9f, 0x14, 0xc5, 0x81, 0xcf, 0x5f, + 0xdc, 0x97, 0xe2, 0xc5, 0x5d, 0x8a, 0x7f, 0xdc, 0xfc, 0xe5, 0x7b, 0x4a, 0x3a, 0x1f, 0x35, 0xca, + 0xbb, 0x84, 0x07, 0xcd, 0xe3, 0x86, 0x71, 0xf0, 0x76, 0x79, 0x9b, 0x46, 0xcb, 0x55, 0x1a, 0xdf, + 0xac, 0xd2, 0xf8, 0xf7, 0x2a, 0x8d, 0xbf, 0xae, 0xd3, 0xe8, 0x66, 0x9d, 0x46, 0x3f, 0xd7, 0x69, + 0xf4, 0x21, 0x9f, 0x08, 0xfb, 0x69, 0x3e, 0xce, 0x4a, 0x94, 0xac, 0x99, 0xae, 0x02, 0xcb, 0x36, + 0x03, 0x97, 0x58, 0xcd, 0xa7, 0x60, 0xc2, 0xd0, 0xed, 0x62, 0x06, 0xa6, 0x99, 0x6a, 0xdb, 0xcd, + 0xf0, 0xf9, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x69, 0x98, 0x86, 0x71, 0x09, 0x03, 0x00, 0x00, +} + +func (m *EventDeployERC20) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventDeployERC20) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventDeployERC20) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Contract) > 0 { + i -= len(m.Contract) + copy(dAtA[i:], m.Contract) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Contract))) + i-- + dAtA[i] = 0x2a + } + if len(m.MinUnit) > 0 { + i -= len(m.MinUnit) + copy(dAtA[i:], m.MinUnit) + i = encodeVarintEvent(dAtA, i, uint64(len(m.MinUnit))) + i-- + dAtA[i] = 0x22 + } + if m.Scale != 0 { + i = encodeVarintEvent(dAtA, i, uint64(m.Scale)) + i-- + dAtA[i] = 0x18 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventSwapToERC20) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSwapToERC20) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSwapToERC20) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ToContract) > 0 { + i -= len(m.ToContract) + copy(dAtA[i:], m.ToContract) + i = encodeVarintEvent(dAtA, i, uint64(len(m.ToContract))) + i-- + dAtA[i] = 0x22 + } + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x1a + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventSwapFromERC20) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSwapFromERC20) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSwapFromERC20) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FromContract) > 0 { + i -= len(m.FromContract) + copy(dAtA[i:], m.FromContract) + i = encodeVarintEvent(dAtA, i, uint64(len(m.FromContract))) + i-- + dAtA[i] = 0x22 + } + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x1a + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x12 + } + if m.WantedAmount != nil { + { + size, err := m.WantedAmount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { + offset -= sovEvent(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventDeployERC20) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + if m.Scale != 0 { + n += 1 + sovEvent(uint64(m.Scale)) + } + l = len(m.MinUnit) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Contract) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventSwapToERC20) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Amount.Size() + n += 1 + l + sovEvent(uint64(l)) + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.ToContract) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventSwapFromERC20) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.WantedAmount != nil { + l = m.WantedAmount.Size() + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.FromContract) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func sovEvent(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvent(x uint64) (n int) { + return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventDeployERC20) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventDeployERC20: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventDeployERC20: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Scale", wireType) + } + m.Scale = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Scale |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinUnit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MinUnit = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Contract = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSwapToERC20) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSwapToERC20: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSwapToERC20: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ToContract", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ToContract = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSwapFromERC20) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSwapFromERC20: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSwapFromERC20: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WantedAmount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.WantedAmount == nil { + m.WantedAmount = &types.Coin{} + } + if err := m.WantedAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FromContract", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FromContract = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvent(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvent + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvent + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvent + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") +) diff --git a/modules/token/types/v1/msgs.go b/modules/token/types/v1/msgs.go index 9f61fe92..3e2378bb 100644 --- a/modules/token/types/v1/msgs.go +++ b/modules/token/types/v1/msgs.go @@ -30,6 +30,9 @@ var ( _ sdk.Msg = &MsgTransferTokenOwner{} _ sdk.Msg = &MsgSwapFeeToken{} _ sdk.Msg = &MsgUpdateParams{} + _ sdk.Msg = &MsgDeployERC20{} + _ sdk.Msg = &MsgSwapFromERC20{} + _ sdk.Msg = &MsgSwapToERC20{} ) // NewMsgIssueToken - construct token issue msg. @@ -352,3 +355,40 @@ func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { addr, _ := sdk.AccAddressFromBech32(m.Authority) return []sdk.AccAddress{addr} } + +// ValidateBasic implements Msg +func (m *MsgDeployERC20) ValidateBasic() error { + // TODO + return nil +} + +// GetSigners returns the expected signers for a MsgDeployERC20 message +func (m *MsgDeployERC20) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(m.Authority) + return []sdk.AccAddress{addr} +} + +// ValidateBasic implements Msg +func (m *MsgSwapFromERC20) ValidateBasic() error { + // TODO + return nil +} + +// GetSigners returns the expected signers for a MsgSwapFromERC20 message +func (m *MsgSwapFromERC20) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(m.Sender) + return []sdk.AccAddress{addr} +} + +// ValidateBasic implements Msg +func (m *MsgSwapToERC20) ValidateBasic() error { + // TODO + return nil +} + +// GetSigners returns the expected signers for a MsgSwapToERC20 message +func (m *MsgSwapToERC20) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(m.Sender) + return []sdk.AccAddress{addr} +} + diff --git a/modules/token/types/v1/token.pb.go b/modules/token/types/v1/token.pb.go index 2a28d5f5..6c5ada58 100644 --- a/modules/token/types/v1/token.pb.go +++ b/modules/token/types/v1/token.pb.go @@ -35,6 +35,7 @@ type Token struct { MaxSupply uint64 `protobuf:"varint,6,opt,name=max_supply,json=maxSupply,proto3" json:"max_supply,omitempty"` Mintable bool `protobuf:"varint,7,opt,name=mintable,proto3" json:"mintable,omitempty"` Owner string `protobuf:"bytes,8,opt,name=owner,proto3" json:"owner,omitempty"` + Contract string `protobuf:"bytes,9,opt,name=contract,proto3" json:"contract,omitempty"` } func (m *Token) Reset() { *m = Token{} } @@ -118,37 +119,37 @@ func init() { func init() { proto.RegisterFile("irismod/token/v1/token.proto", fileDescriptor_c5b3436d30fd508a) } var fileDescriptor_c5b3436d30fd508a = []byte{ - // 467 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xbd, 0x6e, 0x13, 0x41, - 0x10, 0xc7, 0x6f, 0xc3, 0xd9, 0x71, 0x16, 0x12, 0x91, 0x95, 0x85, 0x2e, 0x16, 0x9c, 0xad, 0x48, - 0x20, 0x37, 0xdc, 0xe9, 0xa0, 0x4b, 0x69, 0x50, 0x5a, 0xa2, 0xc3, 0x34, 0x34, 0xa7, 0xbd, 0xf3, - 0xc4, 0xac, 0x72, 0xbb, 0x6b, 0xdd, 0xee, 0x19, 0xfb, 0x0d, 0x28, 0xe9, 0x68, 0xf3, 0x38, 0x2e, - 0x53, 0x22, 0x8a, 0x08, 0xec, 0x86, 0xc7, 0x40, 0xfb, 0x61, 0x44, 0x4b, 0xb5, 0x33, 0xff, 0x9d, - 0xfd, 0xcd, 0xec, 0xcc, 0xe0, 0xa7, 0xac, 0x61, 0x8a, 0xcb, 0x59, 0xaa, 0xe5, 0x0d, 0x88, 0x74, - 0x99, 0x39, 0x23, 0x59, 0x34, 0x52, 0x4b, 0xf2, 0xd8, 0xdf, 0x26, 0x4e, 0x5c, 0x66, 0x83, 0xb8, - 0x92, 0x8a, 0x4b, 0x95, 0x96, 0x54, 0x41, 0xba, 0xcc, 0x4a, 0xd0, 0x34, 0x4b, 0x2b, 0xc9, 0xfc, - 0x8b, 0x41, 0x7f, 0x2e, 0xe7, 0xd2, 0x9a, 0xa9, 0xb1, 0x9c, 0x7a, 0xbe, 0x45, 0xb8, 0x33, 0x35, - 0x08, 0xf2, 0x04, 0x77, 0xd5, 0x9a, 0x97, 0xb2, 0x8e, 0xd0, 0x08, 0x8d, 0x8f, 0x72, 0xef, 0x11, - 0x82, 0x43, 0x41, 0x39, 0x44, 0x07, 0x56, 0xb5, 0x36, 0xe9, 0xe3, 0x8e, 0xaa, 0x68, 0x0d, 0xd1, - 0x83, 0x11, 0x1a, 0x1f, 0xe7, 0xce, 0x21, 0x67, 0xb8, 0xc7, 0x99, 0x28, 0x5a, 0xc1, 0x74, 0x14, - 0xda, 0xe8, 0x43, 0xce, 0xc4, 0x07, 0xc1, 0x34, 0x79, 0x8e, 0x4f, 0x98, 0x60, 0x9a, 0xd1, 0xba, - 0x50, 0xed, 0x62, 0x51, 0xaf, 0xa3, 0xce, 0x08, 0x8d, 0xc3, 0xfc, 0xd8, 0xab, 0xef, 0xad, 0x48, - 0x9e, 0x61, 0xcc, 0xe9, 0x6a, 0x1f, 0xd2, 0xb5, 0x21, 0x47, 0x9c, 0xae, 0xfc, 0xf5, 0xc0, 0x26, - 0xd0, 0xb4, 0xac, 0x21, 0x3a, 0x1c, 0xa1, 0x71, 0x2f, 0xff, 0xeb, 0x9b, 0x92, 0xe4, 0x67, 0x01, - 0x4d, 0xd4, 0xb3, 0x99, 0x9d, 0x73, 0x11, 0x7e, 0xb9, 0x1d, 0x06, 0xe7, 0xdf, 0x0e, 0x70, 0xf7, - 0x8a, 0x36, 0x94, 0x2b, 0x32, 0xc5, 0x27, 0xb6, 0x63, 0x85, 0xa6, 0xab, 0xa2, 0xa1, 0x1a, 0xdc, - 0x6f, 0x27, 0xc9, 0xe6, 0x7e, 0x18, 0xfc, 0xb8, 0x1f, 0xbe, 0x98, 0x33, 0xfd, 0xa9, 0x2d, 0x93, - 0x4a, 0xf2, 0xd4, 0x37, 0xd4, 0x1d, 0x2f, 0xd5, 0xec, 0x26, 0xd5, 0xeb, 0x05, 0xa8, 0xe4, 0x2d, - 0x54, 0xf9, 0x23, 0x4b, 0x99, 0xd2, 0x55, 0x4e, 0x35, 0x90, 0x2b, 0xdc, 0x67, 0x4a, 0xb5, 0x50, - 0x38, 0xb6, 0x19, 0x41, 0x71, 0x0d, 0xae, 0x67, 0x0f, 0x5f, 0x9d, 0x25, 0x0e, 0x91, 0x18, 0x3d, - 0xf1, 0xa3, 0x49, 0xde, 0x48, 0x26, 0x26, 0xa1, 0x49, 0x9b, 0x9f, 0xda, 0xc7, 0x76, 0x0c, 0x13, - 0xaa, 0xe0, 0x12, 0x80, 0x14, 0xb8, 0x6f, 0xbe, 0xe6, 0x81, 0xd7, 0x00, 0xa6, 0x58, 0x26, 0x6d, - 0xc3, 0xff, 0xbf, 0xda, 0x53, 0xc3, 0xb2, 0xfc, 0x4b, 0x80, 0xdc, 0x80, 0x2e, 0xc2, 0xdf, 0xb7, - 0x43, 0x34, 0x79, 0xb7, 0xf9, 0x15, 0x07, 0x9b, 0x6d, 0x8c, 0xee, 0xb6, 0x31, 0xfa, 0xb9, 0x8d, - 0xd1, 0xd7, 0x5d, 0x1c, 0xdc, 0xed, 0xe2, 0xe0, 0xfb, 0x2e, 0x0e, 0x3e, 0x66, 0xff, 0xe0, 0xcd, - 0xbe, 0x09, 0xd0, 0xe9, 0x7e, 0x2b, 0xb9, 0x9c, 0xb5, 0x35, 0x28, 0xbf, 0x9d, 0x36, 0x95, 0xd9, - 0xba, 0xae, 0x5d, 0xab, 0xd7, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x64, 0x54, 0x8b, 0x20, 0xbe, - 0x02, 0x00, 0x00, + // 479 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x4d, 0x6f, 0xd3, 0x40, + 0x10, 0xf5, 0x16, 0x37, 0x4d, 0x16, 0x5a, 0xd1, 0x55, 0x84, 0xdc, 0x08, 0x9c, 0xa8, 0x12, 0x28, + 0x17, 0x6c, 0x19, 0x6e, 0x3d, 0x06, 0xd4, 0x2b, 0x95, 0x09, 0x17, 0x2e, 0xd6, 0xda, 0x99, 0x86, + 0x55, 0xbd, 0xbb, 0x91, 0x77, 0x1d, 0x92, 0x7f, 0xc0, 0x91, 0x1b, 0xd7, 0xfe, 0x9c, 0x1c, 0x7b, + 0x44, 0x1c, 0x2a, 0x48, 0x2e, 0xfc, 0x0a, 0x84, 0xf6, 0xa3, 0x15, 0x57, 0x4e, 0x9e, 0xf7, 0x76, + 0xe6, 0xcd, 0x78, 0xe6, 0xe1, 0xa7, 0xac, 0x61, 0x8a, 0xcb, 0x59, 0xaa, 0xe5, 0x15, 0x88, 0x74, + 0x99, 0xb9, 0x20, 0x59, 0x34, 0x52, 0x4b, 0xf2, 0xd8, 0xbf, 0x26, 0x8e, 0x5c, 0x66, 0x83, 0xb8, + 0x92, 0x8a, 0x4b, 0x95, 0x96, 0x54, 0x41, 0xba, 0xcc, 0x4a, 0xd0, 0x34, 0x4b, 0x2b, 0xc9, 0x7c, + 0xc5, 0xa0, 0x3f, 0x97, 0x73, 0x69, 0xc3, 0xd4, 0x44, 0x8e, 0x3d, 0xfd, 0x83, 0xf0, 0xfe, 0xd4, + 0x48, 0x90, 0x27, 0xb8, 0xa3, 0xd6, 0xbc, 0x94, 0x75, 0x84, 0x46, 0x68, 0xdc, 0xcb, 0x3d, 0x22, + 0x04, 0x87, 0x82, 0x72, 0x88, 0xf6, 0x2c, 0x6b, 0x63, 0xd2, 0xc7, 0xfb, 0xaa, 0xa2, 0x35, 0x44, + 0x0f, 0x46, 0x68, 0x7c, 0x98, 0x3b, 0x40, 0x4e, 0x70, 0x97, 0x33, 0x51, 0xb4, 0x82, 0xe9, 0x28, + 0xb4, 0xd9, 0x07, 0x9c, 0x89, 0x0f, 0x82, 0x69, 0xf2, 0x1c, 0x1f, 0x31, 0xc1, 0x34, 0xa3, 0x75, + 0xa1, 0xda, 0xc5, 0xa2, 0x5e, 0x47, 0xfb, 0x23, 0x34, 0x0e, 0xf3, 0x43, 0xcf, 0xbe, 0xb7, 0x24, + 0x79, 0x86, 0x31, 0xa7, 0xab, 0xbb, 0x94, 0x8e, 0x4d, 0xe9, 0x71, 0xba, 0xf2, 0xcf, 0x03, 0xdb, + 0x40, 0xd3, 0xb2, 0x86, 0xe8, 0x60, 0x84, 0xc6, 0xdd, 0xfc, 0x1e, 0x9b, 0x91, 0xe4, 0x67, 0x01, + 0x4d, 0xd4, 0xb5, 0x9d, 0x1d, 0x30, 0x15, 0x95, 0x14, 0xba, 0xa1, 0x95, 0x8e, 0x7a, 0xf6, 0xe1, + 0x1e, 0x9f, 0x85, 0x5f, 0xae, 0x87, 0xc1, 0xe9, 0xb7, 0x3d, 0xdc, 0xb9, 0xa0, 0x0d, 0xe5, 0x8a, + 0x4c, 0xf1, 0x91, 0xdd, 0x66, 0xa1, 0xe9, 0xaa, 0x68, 0xa8, 0x06, 0xb7, 0x89, 0x49, 0xb2, 0xb9, + 0x1d, 0x06, 0x3f, 0x6e, 0x87, 0x2f, 0xe6, 0x4c, 0x7f, 0x6a, 0xcb, 0xa4, 0x92, 0x3c, 0xf5, 0xcb, + 0x76, 0x9f, 0x97, 0x6a, 0x76, 0x95, 0xea, 0xf5, 0x02, 0x54, 0xf2, 0x16, 0xaa, 0xfc, 0x91, 0x55, + 0x99, 0xd2, 0x55, 0x4e, 0x35, 0x90, 0x0b, 0xdc, 0x67, 0x4a, 0xb5, 0x50, 0x38, 0x6d, 0x73, 0x9e, + 0xe2, 0x12, 0xdc, 0x3e, 0x1f, 0xbe, 0x3a, 0x49, 0x9c, 0x44, 0x62, 0xf8, 0xc4, 0x9f, 0x2d, 0x79, + 0x23, 0x99, 0x98, 0x84, 0xa6, 0x6d, 0x7e, 0x6c, 0x8b, 0xed, 0x89, 0x26, 0x54, 0xc1, 0x39, 0x00, + 0x29, 0x70, 0xdf, 0xfc, 0xb6, 0x17, 0xbc, 0x04, 0x30, 0xc3, 0x32, 0x69, 0x8f, 0xf1, 0xff, 0xd3, + 0x1e, 0x1b, 0x2d, 0xab, 0x7f, 0x0e, 0x90, 0x1b, 0xa1, 0xb3, 0xf0, 0xf7, 0xf5, 0x10, 0x4d, 0xde, + 0x6d, 0x7e, 0xc5, 0xc1, 0x66, 0x1b, 0xa3, 0x9b, 0x6d, 0x8c, 0x7e, 0x6e, 0x63, 0xf4, 0x75, 0x17, + 0x07, 0x37, 0xbb, 0x38, 0xf8, 0xbe, 0x8b, 0x83, 0x8f, 0xd9, 0x3f, 0xf2, 0xc6, 0x8b, 0x02, 0x74, + 0x7a, 0xe7, 0x58, 0x2e, 0x67, 0x6d, 0x0d, 0xca, 0x3b, 0xd7, 0xb6, 0x32, 0x8e, 0xec, 0x58, 0xcb, + 0xbd, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x8d, 0xfc, 0xc1, 0xda, 0x02, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -201,6 +202,13 @@ func (m *Token) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Contract) > 0 { + i -= len(m.Contract) + copy(dAtA[i:], m.Contract) + i = encodeVarintToken(dAtA, i, uint64(len(m.Contract))) + i-- + dAtA[i] = 0x4a + } if len(m.Owner) > 0 { i -= len(m.Owner) copy(dAtA[i:], m.Owner) @@ -355,6 +363,10 @@ func (m *Token) Size() (n int) { if l > 0 { n += 1 + l + sovToken(uint64(l)) } + l = len(m.Contract) + if l > 0 { + n += 1 + l + sovToken(uint64(l)) + } return n } @@ -613,6 +625,38 @@ func (m *Token) Unmarshal(dAtA []byte) error { } m.Owner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Contract = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipToken(dAtA[iNdEx:]) diff --git a/modules/token/types/v1/tx.pb.go b/modules/token/types/v1/tx.pb.go index 02b40f1d..64cf093e 100644 --- a/modules/token/types/v1/tx.pb.go +++ b/modules/token/types/v1/tx.pb.go @@ -588,6 +588,239 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo +// MsgDeployERC20 defines an SDK message for DeployERC20 +type MsgDeployERC20 struct { + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Scale uint32 `protobuf:"varint,3,opt,name=scale,proto3" json:"scale,omitempty"` + MinUnit string `protobuf:"bytes,4,opt,name=min_unit,json=minUnit,proto3" json:"min_unit,omitempty"` + Authority string `protobuf:"bytes,5,opt,name=authority,proto3" json:"authority,omitempty"` +} + +func (m *MsgDeployERC20) Reset() { *m = MsgDeployERC20{} } +func (m *MsgDeployERC20) String() string { return proto.CompactTextString(m) } +func (*MsgDeployERC20) ProtoMessage() {} +func (*MsgDeployERC20) Descriptor() ([]byte, []int) { + return fileDescriptor_f5fa171367154e01, []int{14} +} +func (m *MsgDeployERC20) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeployERC20) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeployERC20.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDeployERC20) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeployERC20.Merge(m, src) +} +func (m *MsgDeployERC20) XXX_Size() int { + return m.Size() +} +func (m *MsgDeployERC20) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeployERC20.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeployERC20 proto.InternalMessageInfo + +// MsgDeployERC20Response defines the Msg/DeployERC20 response type +type MsgDeployERC20Response struct { +} + +func (m *MsgDeployERC20Response) Reset() { *m = MsgDeployERC20Response{} } +func (m *MsgDeployERC20Response) String() string { return proto.CompactTextString(m) } +func (*MsgDeployERC20Response) ProtoMessage() {} +func (*MsgDeployERC20Response) Descriptor() ([]byte, []int) { + return fileDescriptor_f5fa171367154e01, []int{15} +} +func (m *MsgDeployERC20Response) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeployERC20Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeployERC20Response.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDeployERC20Response) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeployERC20Response.Merge(m, src) +} +func (m *MsgDeployERC20Response) XXX_Size() int { + return m.Size() +} +func (m *MsgDeployERC20Response) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeployERC20Response.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeployERC20Response proto.InternalMessageInfo + +// MsgSwapToERC20 defines an SDK message for SwapToERC20 +type MsgSwapToERC20 struct { + Amount types.Coin `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount"` + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` +} + +func (m *MsgSwapToERC20) Reset() { *m = MsgSwapToERC20{} } +func (m *MsgSwapToERC20) String() string { return proto.CompactTextString(m) } +func (*MsgSwapToERC20) ProtoMessage() {} +func (*MsgSwapToERC20) Descriptor() ([]byte, []int) { + return fileDescriptor_f5fa171367154e01, []int{16} +} +func (m *MsgSwapToERC20) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSwapToERC20) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSwapToERC20.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSwapToERC20) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSwapToERC20.Merge(m, src) +} +func (m *MsgSwapToERC20) XXX_Size() int { + return m.Size() +} +func (m *MsgSwapToERC20) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSwapToERC20.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSwapToERC20 proto.InternalMessageInfo + +// MsgSwapToERC20Response defines the Msg/SwapToERC20 response type +type MsgSwapToERC20Response struct { +} + +func (m *MsgSwapToERC20Response) Reset() { *m = MsgSwapToERC20Response{} } +func (m *MsgSwapToERC20Response) String() string { return proto.CompactTextString(m) } +func (*MsgSwapToERC20Response) ProtoMessage() {} +func (*MsgSwapToERC20Response) Descriptor() ([]byte, []int) { + return fileDescriptor_f5fa171367154e01, []int{17} +} +func (m *MsgSwapToERC20Response) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSwapToERC20Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSwapToERC20Response.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSwapToERC20Response) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSwapToERC20Response.Merge(m, src) +} +func (m *MsgSwapToERC20Response) XXX_Size() int { + return m.Size() +} +func (m *MsgSwapToERC20Response) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSwapToERC20Response.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSwapToERC20Response proto.InternalMessageInfo + +// MsgSwapFromERC20 defines an SDK message for SwapFromERC20 +type MsgSwapFromERC20 struct { + WantedAmount types.Coin `protobuf:"bytes,1,opt,name=wanted_amount,json=wantedAmount,proto3" json:"wanted_amount"` + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` +} + +func (m *MsgSwapFromERC20) Reset() { *m = MsgSwapFromERC20{} } +func (m *MsgSwapFromERC20) String() string { return proto.CompactTextString(m) } +func (*MsgSwapFromERC20) ProtoMessage() {} +func (*MsgSwapFromERC20) Descriptor() ([]byte, []int) { + return fileDescriptor_f5fa171367154e01, []int{18} +} +func (m *MsgSwapFromERC20) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSwapFromERC20) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSwapFromERC20.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSwapFromERC20) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSwapFromERC20.Merge(m, src) +} +func (m *MsgSwapFromERC20) XXX_Size() int { + return m.Size() +} +func (m *MsgSwapFromERC20) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSwapFromERC20.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSwapFromERC20 proto.InternalMessageInfo + +// MsgSwapFromERC20Response defines the Msg/SwapFromERC20 response type +type MsgSwapFromERC20Response struct { +} + +func (m *MsgSwapFromERC20Response) Reset() { *m = MsgSwapFromERC20Response{} } +func (m *MsgSwapFromERC20Response) String() string { return proto.CompactTextString(m) } +func (*MsgSwapFromERC20Response) ProtoMessage() {} +func (*MsgSwapFromERC20Response) Descriptor() ([]byte, []int) { + return fileDescriptor_f5fa171367154e01, []int{19} +} +func (m *MsgSwapFromERC20Response) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSwapFromERC20Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSwapFromERC20Response.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSwapFromERC20Response) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSwapFromERC20Response.Merge(m, src) +} +func (m *MsgSwapFromERC20Response) XXX_Size() int { + return m.Size() +} +func (m *MsgSwapFromERC20Response) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSwapFromERC20Response.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSwapFromERC20Response proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgIssueToken)(nil), "irismod.token.v1.MsgIssueToken") proto.RegisterType((*MsgIssueTokenResponse)(nil), "irismod.token.v1.MsgIssueTokenResponse") @@ -603,67 +836,84 @@ func init() { proto.RegisterType((*MsgSwapFeeTokenResponse)(nil), "irismod.token.v1.MsgSwapFeeTokenResponse") proto.RegisterType((*MsgUpdateParams)(nil), "irismod.token.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "irismod.token.v1.MsgUpdateParamsResponse") + proto.RegisterType((*MsgDeployERC20)(nil), "irismod.token.v1.MsgDeployERC20") + proto.RegisterType((*MsgDeployERC20Response)(nil), "irismod.token.v1.MsgDeployERC20Response") + proto.RegisterType((*MsgSwapToERC20)(nil), "irismod.token.v1.MsgSwapToERC20") + proto.RegisterType((*MsgSwapToERC20Response)(nil), "irismod.token.v1.MsgSwapToERC20Response") + proto.RegisterType((*MsgSwapFromERC20)(nil), "irismod.token.v1.MsgSwapFromERC20") + proto.RegisterType((*MsgSwapFromERC20Response)(nil), "irismod.token.v1.MsgSwapFromERC20Response") } func init() { proto.RegisterFile("irismod/token/v1/tx.proto", fileDescriptor_f5fa171367154e01) } var fileDescriptor_f5fa171367154e01 = []byte{ - // 875 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcf, 0x8f, 0xdb, 0x44, - 0x14, 0x8e, 0xf3, 0x6b, 0x93, 0xd9, 0xee, 0x82, 0x46, 0xa1, 0xeb, 0x98, 0xd6, 0x09, 0x91, 0x80, - 0x50, 0x09, 0x9b, 0xec, 0x4a, 0x05, 0xe5, 0x46, 0x10, 0x20, 0x0e, 0x51, 0xab, 0xa4, 0xe5, 0x80, - 0x90, 0xa2, 0x49, 0x3c, 0x71, 0x47, 0xc4, 0x33, 0x96, 0x67, 0xb2, 0xdd, 0xdc, 0x50, 0x8f, 0x5c, - 0x0a, 0xe2, 0xbf, 0xe0, 0xd4, 0x03, 0x7f, 0xc4, 0x1e, 0x2b, 0x4e, 0x9c, 0x2a, 0xd8, 0x3d, 0xac, - 0xc4, 0x9f, 0xc0, 0x09, 0x79, 0x66, 0xe2, 0x38, 0x1b, 0xef, 0x4f, 0x6e, 0x9e, 0xf9, 0x3e, 0xbf, - 0xf7, 0xcd, 0xf7, 0xde, 0x1b, 0x1b, 0xd4, 0x49, 0x44, 0x78, 0xc0, 0x3c, 0x57, 0xb0, 0x1f, 0x30, - 0x75, 0x0f, 0x3b, 0xae, 0x38, 0x72, 0xc2, 0x88, 0x09, 0x06, 0xdf, 0xd6, 0x90, 0x23, 0x21, 0xe7, - 0xb0, 0x63, 0xd5, 0x7c, 0xe6, 0x33, 0x09, 0xba, 0xf1, 0x93, 0xe2, 0x59, 0xf6, 0x84, 0xf1, 0x80, - 0x71, 0x77, 0x8c, 0x38, 0x76, 0x0f, 0x3b, 0x63, 0x2c, 0x50, 0xc7, 0x9d, 0x30, 0x42, 0x35, 0xbe, - 0xa7, 0xf1, 0x80, 0xfb, 0x71, 0xfc, 0x80, 0xfb, 0x1a, 0xa8, 0x2b, 0x60, 0xa4, 0x22, 0xaa, 0x85, - 0x86, 0xee, 0x6d, 0xca, 0x92, 0x22, 0x24, 0xda, 0xfa, 0x29, 0x0f, 0x76, 0xfa, 0xdc, 0xff, 0x86, - 0xf3, 0x39, 0x7e, 0x12, 0xef, 0xc3, 0xbb, 0xa0, 0xcc, 0x17, 0xc1, 0x98, 0xcd, 0x4c, 0xa3, 0x69, - 0xb4, 0xab, 0x03, 0xbd, 0x82, 0x10, 0x14, 0x29, 0x0a, 0xb0, 0x99, 0x97, 0xbb, 0xf2, 0x19, 0xd6, - 0x40, 0x89, 0x4f, 0xd0, 0x0c, 0x9b, 0x85, 0xa6, 0xd1, 0xde, 0x19, 0xa8, 0x05, 0xac, 0x83, 0x4a, - 0x40, 0xe8, 0x68, 0x4e, 0x89, 0x30, 0x8b, 0x92, 0xbd, 0x15, 0x10, 0xfa, 0x94, 0x12, 0x01, 0xdf, - 0x07, 0xbb, 0x84, 0x12, 0x41, 0xd0, 0x6c, 0xc4, 0xe7, 0x61, 0x38, 0x5b, 0x98, 0xa5, 0xa6, 0xd1, - 0x2e, 0x0e, 0x76, 0xf4, 0xee, 0x50, 0x6e, 0xc2, 0xfb, 0x00, 0x04, 0xe8, 0x68, 0x49, 0x29, 0x4b, - 0x4a, 0x35, 0x40, 0x47, 0x1a, 0xb6, 0x64, 0x02, 0x81, 0xc6, 0x33, 0x6c, 0x6e, 0x35, 0x8d, 0x76, - 0x65, 0x90, 0xac, 0xa1, 0x03, 0x4a, 0xec, 0x39, 0xc5, 0x91, 0x59, 0x89, 0x33, 0xf7, 0xcc, 0x3f, - 0x7e, 0xff, 0xb8, 0xa6, 0xfd, 0xf8, 0xdc, 0xf3, 0x22, 0xcc, 0xf9, 0x50, 0x44, 0x84, 0xfa, 0x03, - 0x45, 0xeb, 0x82, 0x17, 0x67, 0xaf, 0x1e, 0xa8, 0xe7, 0xd6, 0x1e, 0x78, 0x67, 0xcd, 0x8b, 0x01, - 0xe6, 0x21, 0xa3, 0x1c, 0xb7, 0x7e, 0x35, 0x24, 0xf2, 0x24, 0x42, 0x94, 0x4f, 0x71, 0x24, 0xc1, - 0x47, 0xf1, 0x2b, 0xf0, 0x5d, 0x50, 0xe5, 0xd1, 0x64, 0xa4, 0x52, 0x2a, 0xc3, 0x2a, 0x3c, 0x9a, - 0x24, 0xa0, 0xc7, 0x85, 0x06, 0x95, 0x6f, 0x15, 0x8f, 0x0b, 0x05, 0x7e, 0x92, 0xf8, 0x5c, 0xb8, - 0x42, 0xa9, 0xe6, 0x75, 0x77, 0x63, 0xa9, 0xab, 0x74, 0xad, 0x06, 0xb8, 0x9f, 0x29, 0x2a, 0x91, - 0xfd, 0x8f, 0x01, 0xee, 0xf4, 0xb9, 0xff, 0xa5, 0x47, 0xc4, 0xcd, 0x6b, 0xbb, 0x5e, 0x83, 0xc2, - 0xf9, 0x1a, 0x0c, 0x53, 0x35, 0x90, 0x45, 0xee, 0x7d, 0xfa, 0xef, 0x9b, 0xc6, 0x81, 0x4f, 0xc4, - 0xb3, 0xf9, 0xd8, 0x99, 0xb0, 0xc0, 0x8d, 0xfb, 0x8e, 0x62, 0xe1, 0x2e, 0xfb, 0x2f, 0x60, 0xde, - 0x7c, 0x86, 0xb9, 0xee, 0x43, 0xb1, 0x08, 0x31, 0x77, 0x7a, 0x8c, 0xcd, 0xb2, 0x8a, 0x57, 0xba, - 0x79, 0xf1, 0xee, 0x82, 0x5a, 0xfa, 0xac, 0x89, 0x09, 0x2f, 0x95, 0x09, 0x7d, 0x42, 0xb5, 0x09, - 0x07, 0xa0, 0x18, 0x8f, 0x94, 0xb4, 0x60, 0x7b, 0xbf, 0xee, 0xe8, 0x04, 0xf1, 0xcc, 0x39, 0x7a, - 0xe6, 0x9c, 0x2f, 0x18, 0xa1, 0xbd, 0xe2, 0xf1, 0x9b, 0x46, 0x6e, 0x20, 0xc9, 0x70, 0x17, 0xe4, - 0x05, 0xd3, 0xfe, 0xe4, 0x05, 0x5b, 0x29, 0x2d, 0xdc, 0x56, 0x69, 0x22, 0x28, 0x51, 0xfa, 0x42, - 0x29, 0xed, 0xcd, 0x23, 0xfa, 0x3f, 0x94, 0xc6, 0x7d, 0x85, 0xa9, 0xb7, 0xec, 0xb8, 0x4b, 0xfb, - 0x4a, 0xf2, 0xba, 0xdb, 0xb1, 0x36, 0xbd, 0xd0, 0xe2, 0x12, 0x0d, 0x89, 0xb8, 0xdf, 0x0c, 0xf0, - 0x56, 0x9f, 0xfb, 0xc3, 0xe7, 0x28, 0xfc, 0x0a, 0xeb, 0xab, 0xa2, 0x0b, 0x2a, 0x53, 0x8c, 0x47, - 0x21, 0x22, 0xde, 0x75, 0x35, 0x6e, 0x4d, 0x31, 0x7e, 0x8c, 0x88, 0x07, 0xef, 0x81, 0x6a, 0x84, - 0x27, 0x24, 0x24, 0x98, 0x0a, 0xed, 0xeb, 0x6a, 0x23, 0x75, 0x88, 0xc2, 0x6d, 0x0e, 0x31, 0x04, - 0x7b, 0xe7, 0xb4, 0x2e, 0xcf, 0x01, 0x3f, 0x03, 0xb1, 0x84, 0x91, 0xcf, 0xc4, 0x75, 0x25, 0x97, - 0xa7, 0x18, 0x7f, 0xcd, 0x44, 0xeb, 0x17, 0xe5, 0xc0, 0xd3, 0xd0, 0x43, 0x02, 0x3f, 0x46, 0x11, - 0x0a, 0x38, 0x7c, 0x08, 0xaa, 0x68, 0x2e, 0x9e, 0xb1, 0x88, 0x88, 0x85, 0x9a, 0xa9, 0x4b, 0xa4, - 0xae, 0xa8, 0xf0, 0x21, 0x28, 0x87, 0x32, 0x82, 0x3c, 0xfa, 0xf6, 0xbe, 0xe9, 0x9c, 0xff, 0x42, - 0x38, 0x2a, 0xc3, 0x52, 0x83, 0x62, 0xeb, 0x2b, 0x20, 0x89, 0xd3, 0xaa, 0xcb, 0x83, 0xa6, 0x25, - 0x2d, 0x0f, 0xba, 0xff, 0xb2, 0x04, 0x0a, 0x7d, 0xee, 0xc3, 0x6f, 0x01, 0x48, 0xdd, 0xee, 0x8d, - 0xcd, 0x44, 0x6b, 0x57, 0x9e, 0xf5, 0xe1, 0x15, 0x84, 0xc4, 0xc8, 0x21, 0xa8, 0xae, 0x2e, 0x16, - 0x3b, 0xf3, 0xad, 0x04, 0xb7, 0x3e, 0xb8, 0x1c, 0x4f, 0x07, 0x5d, 0x0d, 0x6a, 0x76, 0xd0, 0x04, - 0xbf, 0x20, 0xe8, 0xc6, 0x5c, 0xc5, 0x41, 0x57, 0x33, 0x95, 0x1d, 0x34, 0xc1, 0x2f, 0x08, 0xba, - 0x31, 0x0f, 0x90, 0x02, 0x98, 0xf1, 0x39, 0xc8, 0x76, 0x6f, 0x93, 0x68, 0xb9, 0xd7, 0x24, 0x26, - 0xf9, 0xbe, 0x07, 0x77, 0xd6, 0x66, 0xef, 0xbd, 0xcc, 0x00, 0x69, 0x8a, 0xf5, 0xd1, 0x95, 0x94, - 0x74, 0xf4, 0xb5, 0xbe, 0xce, 0x8e, 0x9e, 0xa6, 0x5c, 0x10, 0x3d, 0xab, 0x15, 0xad, 0xd2, 0x8f, - 0x67, 0xaf, 0x1e, 0x18, 0xbd, 0x47, 0xc7, 0x7f, 0xdb, 0xb9, 0xe3, 0x13, 0xdb, 0x78, 0x7d, 0x62, - 0x1b, 0x7f, 0x9d, 0xd8, 0xc6, 0xcf, 0xa7, 0x76, 0xee, 0xf5, 0xa9, 0x9d, 0xfb, 0xf3, 0xd4, 0xce, - 0x7d, 0xd7, 0xb9, 0xd9, 0xa7, 0x23, 0xfe, 0x3d, 0x2a, 0xcb, 0x7f, 0x98, 0x83, 0xff, 0x02, 0x00, - 0x00, 0xff, 0xff, 0xfe, 0x30, 0x29, 0xcb, 0x7a, 0x09, 0x00, 0x00, + // 1048 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0xc6, 0x3f, 0x62, 0x4f, 0xea, 0x50, 0xad, 0x42, 0xb2, 0x5e, 0x5a, 0xc7, 0x58, 0x02, + 0x4c, 0x24, 0x76, 0xeb, 0x04, 0xb5, 0x28, 0xb7, 0xba, 0x2d, 0x88, 0x83, 0xd5, 0xca, 0x4e, 0x91, + 0x40, 0x48, 0xd6, 0xda, 0x3b, 0xd9, 0x8e, 0xf0, 0xce, 0xac, 0x76, 0xc6, 0x49, 0x7c, 0x43, 0x3d, + 0x72, 0x01, 0xc4, 0xbf, 0x00, 0x1c, 0x38, 0xf5, 0xc0, 0x1f, 0x91, 0x0b, 0x52, 0xc5, 0x89, 0x53, + 0x05, 0xc9, 0xa1, 0x12, 0x7f, 0x02, 0x27, 0xb4, 0x33, 0xe3, 0xf1, 0xda, 0x5e, 0xc7, 0x76, 0x10, + 0x37, 0xcf, 0x7e, 0xdf, 0xbe, 0xf9, 0xde, 0xf7, 0xde, 0xbc, 0x59, 0x83, 0x12, 0x0a, 0x11, 0xf5, + 0x89, 0x6b, 0x33, 0xf2, 0x15, 0xc4, 0xf6, 0x49, 0xdd, 0x66, 0x67, 0x56, 0x10, 0x12, 0x46, 0xf4, + 0x9b, 0x12, 0xb2, 0x38, 0x64, 0x9d, 0xd4, 0xcd, 0x2d, 0x8f, 0x78, 0x84, 0x83, 0x76, 0xf4, 0x4b, + 0xf0, 0xcc, 0x72, 0x8f, 0x50, 0x9f, 0x50, 0xbb, 0xeb, 0x50, 0x68, 0x9f, 0xd4, 0xbb, 0x90, 0x39, + 0x75, 0xbb, 0x47, 0x10, 0x96, 0xf8, 0x8e, 0xc4, 0x7d, 0xea, 0x45, 0xf1, 0x7d, 0xea, 0x49, 0xa0, + 0x24, 0x80, 0x8e, 0x88, 0x28, 0x16, 0x12, 0xba, 0x35, 0x2b, 0x8b, 0x8b, 0xe0, 0x68, 0xf5, 0x9b, + 0x35, 0x50, 0x6c, 0x52, 0xef, 0x53, 0x4a, 0x07, 0xf0, 0x28, 0x7a, 0xae, 0x6f, 0x83, 0x1c, 0x1d, + 0xfa, 0x5d, 0xd2, 0x37, 0xb4, 0x8a, 0x56, 0x2b, 0xb4, 0xe4, 0x4a, 0xd7, 0x41, 0x06, 0x3b, 0x3e, + 0x34, 0xd6, 0xf8, 0x53, 0xfe, 0x5b, 0xdf, 0x02, 0x59, 0xda, 0x73, 0xfa, 0xd0, 0x48, 0x57, 0xb4, + 0x5a, 0xb1, 0x25, 0x16, 0x7a, 0x09, 0xe4, 0x7d, 0x84, 0x3b, 0x03, 0x8c, 0x98, 0x91, 0xe1, 0xec, + 0x75, 0x1f, 0xe1, 0xa7, 0x18, 0x31, 0xfd, 0x1d, 0xb0, 0x89, 0x30, 0x62, 0xc8, 0xe9, 0x77, 0xe8, + 0x20, 0x08, 0xfa, 0x43, 0x23, 0x5b, 0xd1, 0x6a, 0x99, 0x56, 0x51, 0x3e, 0x6d, 0xf3, 0x87, 0xfa, + 0x6d, 0x00, 0x7c, 0xe7, 0x6c, 0x44, 0xc9, 0x71, 0x4a, 0xc1, 0x77, 0xce, 0x24, 0x6c, 0xf2, 0x0d, + 0x98, 0xd3, 0xed, 0x43, 0x63, 0xbd, 0xa2, 0xd5, 0xf2, 0x2d, 0xb5, 0xd6, 0x2d, 0x90, 0x25, 0xa7, + 0x18, 0x86, 0x46, 0x3e, 0xda, 0xb9, 0x61, 0xfc, 0xfe, 0xeb, 0x07, 0x5b, 0xd2, 0x8f, 0xfb, 0xae, + 0x1b, 0x42, 0x4a, 0xdb, 0x2c, 0x44, 0xd8, 0x6b, 0x09, 0xda, 0x21, 0x78, 0xfe, 0xfa, 0xc5, 0x9e, + 0xf8, 0x5d, 0xdd, 0x01, 0x6f, 0x4e, 0x78, 0xd1, 0x82, 0x34, 0x20, 0x98, 0xc2, 0xea, 0x0f, 0x1a, + 0x47, 0x8e, 0x42, 0x07, 0xd3, 0x63, 0x18, 0x72, 0xf0, 0x71, 0xf4, 0x8a, 0xfe, 0x16, 0x28, 0xd0, + 0xb0, 0xd7, 0x11, 0x5b, 0x0a, 0xc3, 0xf2, 0x34, 0xec, 0x29, 0xd0, 0xa5, 0x4c, 0x82, 0xc2, 0xb7, + 0xbc, 0x4b, 0x99, 0x00, 0xef, 0x28, 0x9f, 0xd3, 0x0b, 0x94, 0x4a, 0xde, 0xe1, 0x66, 0x24, 0x75, + 0xbc, 0x5d, 0x75, 0x17, 0xdc, 0x4e, 0x14, 0xa5, 0x64, 0xff, 0xad, 0x81, 0x1b, 0x4d, 0xea, 0x3d, + 0x72, 0x11, 0x5b, 0xbd, 0xb6, 0x93, 0x35, 0x48, 0x4f, 0xd7, 0xa0, 0x1d, 0xab, 0x01, 0x2f, 0x72, + 0xe3, 0xde, 0x3f, 0xaf, 0x76, 0x0f, 0x3c, 0xc4, 0x9e, 0x0d, 0xba, 0x56, 0x8f, 0xf8, 0x76, 0xd4, + 0x77, 0x18, 0x32, 0x7b, 0xd4, 0x7f, 0x3e, 0x71, 0x07, 0x7d, 0x48, 0x65, 0x1f, 0xb2, 0x61, 0x00, + 0xa9, 0xd5, 0x20, 0xa4, 0x9f, 0x54, 0xbc, 0xec, 0xea, 0xc5, 0xdb, 0x06, 0x5b, 0xf1, 0x5c, 0x95, + 0x09, 0xdf, 0x0a, 0x13, 0x9a, 0x08, 0x4b, 0x13, 0x0e, 0x40, 0x26, 0x3a, 0x52, 0xdc, 0x82, 0x8d, + 0xfd, 0x92, 0x25, 0x37, 0x88, 0xce, 0x9c, 0x25, 0xcf, 0x9c, 0xf5, 0x80, 0x20, 0xdc, 0xc8, 0x9c, + 0xbf, 0xda, 0x4d, 0xb5, 0x38, 0x59, 0xdf, 0x04, 0x6b, 0x8c, 0x48, 0x7f, 0xd6, 0x18, 0x19, 0x2b, + 0x4d, 0x5f, 0x57, 0xa9, 0x12, 0xa4, 0x94, 0x3e, 0x17, 0x4a, 0x1b, 0x83, 0x10, 0xff, 0x07, 0xa5, + 0x51, 0x5f, 0x41, 0xec, 0x8e, 0x3a, 0xee, 0xca, 0xbe, 0xe2, 0xbc, 0xc3, 0x8d, 0x48, 0x9b, 0x5c, + 0x48, 0x71, 0x4a, 0x83, 0x12, 0xf7, 0x8b, 0x06, 0xde, 0x68, 0x52, 0xaf, 0x7d, 0xea, 0x04, 0x1f, + 0x43, 0x39, 0x2a, 0x0e, 0x41, 0xfe, 0x18, 0xc2, 0x4e, 0xe0, 0x20, 0x77, 0x59, 0x8d, 0xeb, 0xc7, + 0x10, 0x3e, 0x71, 0x90, 0xab, 0xdf, 0x02, 0x85, 0x10, 0xf6, 0x50, 0x80, 0x20, 0x66, 0xd2, 0xd7, + 0xf1, 0x83, 0x58, 0x12, 0xe9, 0xeb, 0x24, 0xd1, 0x06, 0x3b, 0x53, 0x5a, 0x47, 0x79, 0xe8, 0x1f, + 0x81, 0x48, 0x42, 0xc7, 0x23, 0x6c, 0x59, 0xc9, 0xb9, 0x63, 0x08, 0x3f, 0x21, 0xac, 0xfa, 0xbd, + 0x70, 0xe0, 0x69, 0xe0, 0x3a, 0x0c, 0x3e, 0x71, 0x42, 0xc7, 0xa7, 0xfa, 0x5d, 0x50, 0x70, 0x06, + 0xec, 0x19, 0x09, 0x11, 0x1b, 0x8a, 0x33, 0x75, 0x85, 0xd4, 0x31, 0x55, 0xbf, 0x0b, 0x72, 0x01, + 0x8f, 0xc0, 0x53, 0xdf, 0xd8, 0x37, 0xac, 0xe9, 0x1b, 0xc2, 0x12, 0x3b, 0x8c, 0x34, 0x08, 0xb6, + 0x1c, 0x01, 0x2a, 0x4e, 0xb5, 0xc4, 0x13, 0x8d, 0x4b, 0x52, 0x05, 0xfb, 0x49, 0x03, 0x9b, 0x4d, + 0xea, 0x3d, 0x84, 0x41, 0x9f, 0x0c, 0x1f, 0xb5, 0x1e, 0xec, 0xdf, 0xf9, 0x7f, 0x47, 0xfb, 0x84, + 0x15, 0xd9, 0xa5, 0xad, 0xa8, 0x1a, 0x60, 0x7b, 0x52, 0xa6, 0xca, 0xe0, 0x47, 0x91, 0x41, 0x54, + 0xc6, 0x23, 0x22, 0x32, 0xb8, 0x07, 0x72, 0x8e, 0x4f, 0x06, 0x78, 0xf9, 0xe2, 0x09, 0xfa, 0xea, + 0xa7, 0x22, 0xba, 0x64, 0x42, 0xd8, 0x83, 0xe8, 0x64, 0xd4, 0x84, 0x2d, 0xb5, 0x9e, 0x6c, 0x36, + 0x91, 0x40, 0x4c, 0xa5, 0x4a, 0xe0, 0x37, 0x0d, 0xdc, 0x1c, 0xf5, 0x61, 0x48, 0x7c, 0x91, 0xc2, + 0x43, 0x50, 0x3c, 0x75, 0x30, 0x83, 0x6e, 0x67, 0xb5, 0x4c, 0x6e, 0x88, 0xb7, 0xee, 0x5f, 0x37, + 0x9f, 0x0f, 0xa7, 0xf3, 0xb9, 0xe2, 0x9d, 0x39, 0x99, 0x9a, 0xc0, 0x98, 0x4e, 0x67, 0x94, 0xeb, + 0xfe, 0xcf, 0xeb, 0x20, 0xdd, 0xa4, 0x9e, 0xfe, 0x19, 0x00, 0xb1, 0x8f, 0x89, 0xdd, 0xd9, 0xbe, + 0x9e, 0xb8, 0x61, 0xcd, 0xf7, 0x16, 0x10, 0xd4, 0xb9, 0x6d, 0x83, 0xc2, 0xf8, 0x1e, 0x2b, 0x27, + 0xbe, 0xa5, 0x70, 0xf3, 0xdd, 0xab, 0xf1, 0x78, 0xd0, 0xf1, 0xbd, 0x90, 0x1c, 0x54, 0xe1, 0x73, + 0x82, 0xce, 0x8c, 0xf1, 0x28, 0xe8, 0x78, 0x84, 0x27, 0x07, 0x55, 0xf8, 0x9c, 0xa0, 0x33, 0xe3, + 0x57, 0xc7, 0x40, 0x4f, 0xf8, 0xfa, 0x48, 0x76, 0x6f, 0x96, 0x68, 0xda, 0x4b, 0x12, 0xd5, 0x7e, + 0x5f, 0x82, 0x1b, 0x13, 0xa3, 0xfe, 0xed, 0xc4, 0x00, 0x71, 0x8a, 0xf9, 0xfe, 0x42, 0x8a, 0x8a, + 0xfe, 0x39, 0xd8, 0x88, 0x9f, 0xea, 0xca, 0xdc, 0x37, 0x25, 0xc3, 0xac, 0x2d, 0x62, 0xa8, 0xd0, + 0x1d, 0x50, 0x9c, 0x3c, 0x6f, 0xd5, 0xf9, 0xb2, 0x46, 0x1c, 0x73, 0x6f, 0x31, 0x27, 0xee, 0xcc, + 0xc4, 0x15, 0x90, 0xec, 0x4c, 0x9c, 0x32, 0xc7, 0x99, 0xa4, 0xa9, 0x1d, 0x39, 0x13, 0x9f, 0xd8, + 0xc9, 0xce, 0xc4, 0x18, 0x73, 0x9c, 0x49, 0x18, 0xa7, 0x66, 0xf6, 0xeb, 0xd7, 0x2f, 0xf6, 0xb4, + 0xc6, 0xe3, 0xf3, 0xbf, 0xca, 0xa9, 0xf3, 0x8b, 0xb2, 0xf6, 0xf2, 0xa2, 0xac, 0xfd, 0x79, 0x51, + 0xd6, 0xbe, 0xbb, 0x2c, 0xa7, 0x5e, 0x5e, 0x96, 0x53, 0x7f, 0x5c, 0x96, 0x53, 0x5f, 0xd4, 0x57, + 0xfb, 0x80, 0x8b, 0xfe, 0xa4, 0xe4, 0xf8, 0x3f, 0x89, 0x83, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, + 0x3e, 0xac, 0xed, 0x43, 0x00, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -688,13 +938,19 @@ type MsgClient interface { BurnToken(ctx context.Context, in *MsgBurnToken, opts ...grpc.CallOption) (*MsgBurnTokenResponse, error) // TransferTokenOwner defines a method for transfering token owner TransferTokenOwner(ctx context.Context, in *MsgTransferTokenOwner, opts ...grpc.CallOption) (*MsgTransferTokenOwnerResponse, error) - // SwapFeeToken defines a method for swap some fee token + // SwapFeeToken defines a method for swapping between IRIS and ERIS SwapFeeToken(ctx context.Context, in *MsgSwapFeeToken, opts ...grpc.CallOption) (*MsgSwapFeeTokenResponse, error) + // SwapToERC20 defines a method for swapping some native token to its ERC20 counterpart + SwapToERC20(ctx context.Context, in *MsgSwapToERC20, opts ...grpc.CallOption) (*MsgSwapToERC20Response, error) + // SwapFromERC20 defines a method for swapping some ERC20 token to its native counterpart + SwapFromERC20(ctx context.Context, in *MsgSwapFromERC20, opts ...grpc.CallOption) (*MsgSwapFromERC20Response, error) // UpdateParams defines a governance operation for updating the token // module parameters. The authority is defined in the keeper. // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // DeployERC20 defines a governance operation for deploying an ERC20 contract that binds to a native token + DeployERC20(ctx context.Context, in *MsgDeployERC20, opts ...grpc.CallOption) (*MsgDeployERC20Response, error) } type msgClient struct { @@ -759,6 +1015,24 @@ func (c *msgClient) SwapFeeToken(ctx context.Context, in *MsgSwapFeeToken, opts return out, nil } +func (c *msgClient) SwapToERC20(ctx context.Context, in *MsgSwapToERC20, opts ...grpc.CallOption) (*MsgSwapToERC20Response, error) { + out := new(MsgSwapToERC20Response) + err := c.cc.Invoke(ctx, "/irismod.token.v1.Msg/SwapToERC20", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SwapFromERC20(ctx context.Context, in *MsgSwapFromERC20, opts ...grpc.CallOption) (*MsgSwapFromERC20Response, error) { + out := new(MsgSwapFromERC20Response) + err := c.cc.Invoke(ctx, "/irismod.token.v1.Msg/SwapFromERC20", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { out := new(MsgUpdateParamsResponse) err := c.cc.Invoke(ctx, "/irismod.token.v1.Msg/UpdateParams", in, out, opts...) @@ -768,6 +1042,15 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } +func (c *msgClient) DeployERC20(ctx context.Context, in *MsgDeployERC20, opts ...grpc.CallOption) (*MsgDeployERC20Response, error) { + out := new(MsgDeployERC20Response) + err := c.cc.Invoke(ctx, "/irismod.token.v1.Msg/DeployERC20", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // IssueToken defines a method for issuing a new token @@ -780,13 +1063,19 @@ type MsgServer interface { BurnToken(context.Context, *MsgBurnToken) (*MsgBurnTokenResponse, error) // TransferTokenOwner defines a method for transfering token owner TransferTokenOwner(context.Context, *MsgTransferTokenOwner) (*MsgTransferTokenOwnerResponse, error) - // SwapFeeToken defines a method for swap some fee token + // SwapFeeToken defines a method for swapping between IRIS and ERIS SwapFeeToken(context.Context, *MsgSwapFeeToken) (*MsgSwapFeeTokenResponse, error) + // SwapToERC20 defines a method for swapping some native token to its ERC20 counterpart + SwapToERC20(context.Context, *MsgSwapToERC20) (*MsgSwapToERC20Response, error) + // SwapFromERC20 defines a method for swapping some ERC20 token to its native counterpart + SwapFromERC20(context.Context, *MsgSwapFromERC20) (*MsgSwapFromERC20Response, error) // UpdateParams defines a governance operation for updating the token // module parameters. The authority is defined in the keeper. // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // DeployERC20 defines a governance operation for deploying an ERC20 contract that binds to a native token + DeployERC20(context.Context, *MsgDeployERC20) (*MsgDeployERC20Response, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -811,9 +1100,18 @@ func (*UnimplementedMsgServer) TransferTokenOwner(ctx context.Context, req *MsgT func (*UnimplementedMsgServer) SwapFeeToken(ctx context.Context, req *MsgSwapFeeToken) (*MsgSwapFeeTokenResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SwapFeeToken not implemented") } +func (*UnimplementedMsgServer) SwapToERC20(ctx context.Context, req *MsgSwapToERC20) (*MsgSwapToERC20Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method SwapToERC20 not implemented") +} +func (*UnimplementedMsgServer) SwapFromERC20(ctx context.Context, req *MsgSwapFromERC20) (*MsgSwapFromERC20Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method SwapFromERC20 not implemented") +} func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } +func (*UnimplementedMsgServer) DeployERC20(ctx context.Context, req *MsgDeployERC20) (*MsgDeployERC20Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeployERC20 not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -927,6 +1225,42 @@ func _Msg_SwapFeeToken_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_SwapToERC20_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSwapToERC20) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SwapToERC20(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/irismod.token.v1.Msg/SwapToERC20", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SwapToERC20(ctx, req.(*MsgSwapToERC20)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SwapFromERC20_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSwapFromERC20) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SwapFromERC20(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/irismod.token.v1.Msg/SwapFromERC20", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SwapFromERC20(ctx, req.(*MsgSwapFromERC20)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateParams) if err := dec(in); err != nil { @@ -945,6 +1279,24 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_DeployERC20_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeployERC20) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DeployERC20(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/irismod.token.v1.Msg/DeployERC20", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DeployERC20(ctx, req.(*MsgDeployERC20)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "irismod.token.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -973,10 +1325,22 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "SwapFeeToken", Handler: _Msg_SwapFeeToken_Handler, }, + { + MethodName: "SwapToERC20", + Handler: _Msg_SwapToERC20_Handler, + }, + { + MethodName: "SwapFromERC20", + Handler: _Msg_SwapFromERC20_Handler, + }, { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "DeployERC20", + Handler: _Msg_DeployERC20_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "irismod/token/v1/tx.proto", @@ -1503,43 +1867,262 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *MsgDeployERC20) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *MsgIssueToken) Size() (n int) { - if m == nil { - return 0 - } + +func (m *MsgDeployERC20) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeployERC20) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Symbol) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0x2a } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.MinUnit) > 0 { + i -= len(m.MinUnit) + copy(dAtA[i:], m.MinUnit) + i = encodeVarintTx(dAtA, i, uint64(len(m.MinUnit))) + i-- + dAtA[i] = 0x22 } if m.Scale != 0 { - n += 1 + sovTx(uint64(m.Scale)) + i = encodeVarintTx(dAtA, i, uint64(m.Scale)) + i-- + dAtA[i] = 0x18 } - l = len(m.MinUnit) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 } - if m.InitialSupply != 0 { - n += 1 + sovTx(uint64(m.InitialSupply)) + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintTx(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0xa } - if m.MaxSupply != 0 { - n += 1 + sovTx(uint64(m.MaxSupply)) + return len(dAtA) - i, nil +} + +func (m *MsgDeployERC20Response) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDeployERC20Response) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeployERC20Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgSwapToERC20) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSwapToERC20) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSwapToERC20) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintTx(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x1a + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgSwapToERC20Response) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSwapToERC20Response) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSwapToERC20Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgSwapFromERC20) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSwapFromERC20) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSwapFromERC20) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintTx(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x1a + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.WantedAmount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgSwapFromERC20Response) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSwapFromERC20Response) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSwapFromERC20Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgIssueToken) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Scale != 0 { + n += 1 + sovTx(uint64(m.Scale)) + } + l = len(m.MinUnit) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.InitialSupply != 0 { + n += 1 + sovTx(uint64(m.InitialSupply)) + } + if m.MaxSupply != 0 { + n += 1 + sovTx(uint64(m.MaxSupply)) } if m.Mintable { n += 2 @@ -1733,54 +2316,147 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { return n } -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 +func (m *MsgDeployERC20) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Scale != 0 { + n += 1 + sovTx(uint64(m.Scale)) + } + l = len(m.MinUnit) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n } -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + +func (m *MsgDeployERC20Response) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n } -func (m *MsgIssueToken) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgIssueToken: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgIssueToken: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] + +func (m *MsgSwapToERC20) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgSwapToERC20Response) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSwapFromERC20) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.WantedAmount.Size() + n += 1 + l + sovTx(uint64(l)) + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgSwapFromERC20Response) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgIssueToken) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgIssueToken: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgIssueToken: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { @@ -1935,13 +2611,653 @@ func (m *MsgIssueToken) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Mintable = bool(v != 0) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgIssueTokenResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgIssueTokenResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgIssueTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgTransferTokenOwner) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgTransferTokenOwner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgTransferTokenOwner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SrcOwner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SrcOwner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DstOwner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DstOwner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgTransferTokenOwnerResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgTransferTokenOwnerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgTransferTokenOwnerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgEditToken) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgEditToken: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEditToken: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxSupply", wireType) + } + m.MaxSupply = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxSupply |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mintable", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mintable = github_com_irisnet_irismod_modules_token_types.Bool(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgEditTokenResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgEditTokenResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEditTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgMintToken) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgMintToken: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgMintToken: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Coin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.Mintable = bool(v != 0) - case 8: + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.To = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) } @@ -1994,7 +3310,7 @@ func (m *MsgIssueToken) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgIssueTokenResponse) Unmarshal(dAtA []byte) error { +func (m *MsgMintTokenResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2017,10 +3333,10 @@ func (m *MsgIssueTokenResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgIssueTokenResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgMintTokenResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgIssueTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgMintTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2044,7 +3360,7 @@ func (m *MsgIssueTokenResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgTransferTokenOwner) Unmarshal(dAtA []byte) error { +func (m *MsgBurnToken) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2067,17 +3383,17 @@ func (m *MsgTransferTokenOwner) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgTransferTokenOwner: wiretype end group for non-group") + return fmt.Errorf("proto: MsgBurnToken: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgTransferTokenOwner: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgBurnToken: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SrcOwner", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Coin", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2087,59 +3403,28 @@ func (m *MsgTransferTokenOwner) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.SrcOwner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DstOwner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.Coin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.DstOwner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2167,7 +3452,7 @@ func (m *MsgTransferTokenOwner) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Symbol = string(dAtA[iNdEx:postIndex]) + m.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2190,7 +3475,7 @@ func (m *MsgTransferTokenOwner) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgTransferTokenOwnerResponse) Unmarshal(dAtA []byte) error { +func (m *MsgBurnTokenResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2213,10 +3498,10 @@ func (m *MsgTransferTokenOwnerResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgTransferTokenOwnerResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgBurnTokenResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgTransferTokenOwnerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgBurnTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2240,7 +3525,7 @@ func (m *MsgTransferTokenOwnerResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgEditToken) Unmarshal(dAtA []byte) error { +func (m *MsgSwapFeeToken) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2263,17 +3548,17 @@ func (m *MsgEditToken) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgEditToken: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSwapFeeToken: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgEditToken: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSwapFeeToken: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FeePaid", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2283,27 +3568,28 @@ func (m *MsgEditToken) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Symbol = string(dAtA[iNdEx:postIndex]) + if err := m.FeePaid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2331,62 +3617,11 @@ func (m *MsgEditToken) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Recipient = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxSupply", wireType) - } - m.MaxSupply = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxSupply |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mintable", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Mintable = github_com_irisnet_irismod_modules_token_types.Bool(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2414,7 +3649,7 @@ func (m *MsgEditToken) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Owner = string(dAtA[iNdEx:postIndex]) + m.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2437,7 +3672,7 @@ func (m *MsgEditToken) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgEditTokenResponse) Unmarshal(dAtA []byte) error { +func (m *MsgSwapFeeTokenResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2460,12 +3695,45 @@ func (m *MsgEditTokenResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgEditTokenResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSwapFeeTokenResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgEditTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSwapFeeTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeGot", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.FeeGot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -2487,7 +3755,7 @@ func (m *MsgEditTokenResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgMintToken) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2500,58 +3768,25 @@ func (m *MsgMintToken) Unmarshal(dAtA []byte) error { if iNdEx >= l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgMintToken: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgMintToken: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coin", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Coin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 2: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2579,13 +3814,13 @@ func (m *MsgMintToken) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.To = string(dAtA[iNdEx:postIndex]) + m.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2595,23 +3830,24 @@ func (m *MsgMintToken) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Owner = string(dAtA[iNdEx:postIndex]) + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -2634,7 +3870,7 @@ func (m *MsgMintToken) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgMintTokenResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2657,10 +3893,10 @@ func (m *MsgMintTokenResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgMintTokenResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgMintTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2684,7 +3920,7 @@ func (m *MsgMintTokenResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgBurnToken) Unmarshal(dAtA []byte) error { +func (m *MsgDeployERC20) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2707,17 +3943,17 @@ func (m *MsgBurnToken) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgBurnToken: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDeployERC20: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBurnToken: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDeployERC20: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coin", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2727,28 +3963,27 @@ func (m *MsgBurnToken) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Coin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Symbol = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2776,7 +4011,90 @@ func (m *MsgBurnToken) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Sender = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Scale", wireType) + } + m.Scale = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Scale |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinUnit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MinUnit = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2799,7 +4117,7 @@ func (m *MsgBurnToken) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgBurnTokenResponse) Unmarshal(dAtA []byte) error { +func (m *MsgDeployERC20Response) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2822,10 +4140,10 @@ func (m *MsgBurnTokenResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgBurnTokenResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDeployERC20Response: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBurnTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDeployERC20Response: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2849,7 +4167,7 @@ func (m *MsgBurnTokenResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSwapFeeToken) Unmarshal(dAtA []byte) error { +func (m *MsgSwapToERC20) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2872,15 +4190,15 @@ func (m *MsgSwapFeeToken) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSwapFeeToken: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSwapToERC20: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSwapFeeToken: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSwapToERC20: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeePaid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2907,13 +4225,13 @@ func (m *MsgSwapFeeToken) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.FeePaid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2941,11 +4259,11 @@ func (m *MsgSwapFeeToken) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Recipient = string(dAtA[iNdEx:postIndex]) + m.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2973,7 +4291,7 @@ func (m *MsgSwapFeeToken) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Sender = string(dAtA[iNdEx:postIndex]) + m.Receiver = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2996,7 +4314,7 @@ func (m *MsgSwapFeeToken) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSwapFeeTokenResponse) Unmarshal(dAtA []byte) error { +func (m *MsgSwapToERC20Response) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3019,45 +4337,12 @@ func (m *MsgSwapFeeTokenResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSwapFeeTokenResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSwapToERC20Response: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSwapFeeTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSwapToERC20Response: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeGot", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.FeeGot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -3079,7 +4364,7 @@ func (m *MsgSwapFeeTokenResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { +func (m *MsgSwapFromERC20) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3102,15 +4387,48 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSwapFromERC20: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSwapFromERC20: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field WantedAmount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.WantedAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3138,13 +4456,13 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Authority = string(dAtA[iNdEx:postIndex]) + m.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3154,24 +4472,23 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Receiver = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3194,7 +4511,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { +func (m *MsgSwapFromERC20Response) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3217,10 +4534,10 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSwapFromERC20Response: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSwapFromERC20Response: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: diff --git a/proto/irismod/token/v1/event.proto b/proto/irismod/token/v1/event.proto new file mode 100644 index 00000000..5d7416c0 --- /dev/null +++ b/proto/irismod/token/v1/event.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; +package irismod.token.v1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/irisnet/irismod/modules/token/types/v1"; +option (gogoproto.goproto_getters_all) = false; + +// EventDeployERC20 is an event emitted when deploying ERC20. +message EventDeployERC20 { + string symbol = 1; + string name = 2; + uint32 scale = 3; + string min_unit = 4; + string contract = 5; +} + +// EventSwapToERC20 is an event emitted when swapping token from native token to +// ERC20. +message EventSwapToERC20 { + cosmos.base.v1beta1.Coin amount = 1 [ (gogoproto.nullable) = false ]; + string sender = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string receiver = 3; + string to_contract = 4; +} + +// EventSwapFromERC20 is an event emitted when swapping token from ERC20 to +// native token. +message EventSwapFromERC20 { + cosmos.base.v1beta1.Coin wanted_amount = 1; + string sender = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string receiver = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string from_contract = 4; +} diff --git a/proto/irismod/token/v1/token.proto b/proto/irismod/token/v1/token.proto index 64c993f2..7f3abb08 100644 --- a/proto/irismod/token/v1/token.proto +++ b/proto/irismod/token/v1/token.proto @@ -19,6 +19,7 @@ message Token { uint64 max_supply = 6; bool mintable = 7; string owner = 8; + string contract = 9; } // Params defines token module's parameters diff --git a/proto/irismod/token/v1/tx.proto b/proto/irismod/token/v1/tx.proto index 4dab87a7..291afd75 100644 --- a/proto/irismod/token/v1/tx.proto +++ b/proto/irismod/token/v1/tx.proto @@ -30,14 +30,23 @@ service Msg { rpc TransferTokenOwner(MsgTransferTokenOwner) returns (MsgTransferTokenOwnerResponse); - // SwapFeeToken defines a method for swap some fee token + // SwapFeeToken defines a method for swapping between IRIS and ERIS rpc SwapFeeToken(MsgSwapFeeToken) returns (MsgSwapFeeTokenResponse); + // SwapToERC20 defines a method for swapping some native token to its ERC20 counterpart + rpc SwapToERC20(MsgSwapToERC20) returns (MsgSwapToERC20Response); + + // SwapFromERC20 defines a method for swapping some ERC20 token to its native counterpart + rpc SwapFromERC20(MsgSwapFromERC20) returns (MsgSwapFromERC20Response); + // UpdateParams defines a governance operation for updating the token // module parameters. The authority is defined in the keeper. // // Since: cosmos-sdk 0.47 rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); + + // DeployERC20 defines a governance operation for deploying an ERC20 contract that binds to a native token + rpc DeployERC20(MsgDeployERC20) returns (MsgDeployERC20Response); } // MsgIssueToken defines an SDK message for issuing a new token @@ -143,4 +152,40 @@ message MsgUpdateParams { // MsgUpdateParams message. // // Since: cosmos-sdk 0.47 -message MsgUpdateParamsResponse {} \ No newline at end of file +message MsgUpdateParamsResponse {} + +// MsgDeployERC20 defines an SDK message for DeployERC20 +message MsgDeployERC20 { + string symbol = 1; + string name = 2; + uint32 scale = 3; + string min_unit = 4; + string authority = 5 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; +} + +// MsgDeployERC20Response defines the Msg/DeployERC20 response type +message MsgDeployERC20Response {} + +// MsgSwapToERC20 defines an SDK message for SwapToERC20 +message MsgSwapToERC20 { + option (cosmos.msg.v1.signer) = "sender"; + + cosmos.base.v1beta1.Coin amount = 1 [ (gogoproto.nullable) = false ]; + string sender = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string receiver = 3; +} + +// MsgSwapToERC20Response defines the Msg/SwapToERC20 response type +message MsgSwapToERC20Response {} + +// MsgSwapFromERC20 defines an SDK message for SwapFromERC20 +message MsgSwapFromERC20 { + option (cosmos.msg.v1.signer) = "sender"; + + cosmos.base.v1beta1.Coin wanted_amount = 1 [ (gogoproto.nullable) = false ]; + string sender = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string receiver = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; +} + +// MsgSwapFromERC20Response defines the Msg/SwapFromERC20 response type +message MsgSwapFromERC20Response {} \ No newline at end of file diff --git a/types/evm.go b/types/evm.go new file mode 100644 index 00000000..4811dd4e --- /dev/null +++ b/types/evm.go @@ -0,0 +1,169 @@ +package types + +import ( + "encoding/hex" + "encoding/json" + "fmt" + "math/big" + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" +) + +const ( + // DefaultGasCap is the default gas cap for eth_call + DefaultGasCap uint64 = 25000000 +) + +// TransactionArgs represents the arguments to construct a new transaction +// or a message call using JSON-RPC. +type TransactionArgs struct { + From *common.Address `json:"from"` + To *common.Address `json:"to"` + Gas *hexutil.Uint64 `json:"gas"` + GasPrice *hexutil.Big `json:"gasPrice"` + MaxFeePerGas *hexutil.Big `json:"maxFeePerGas"` + MaxPriorityFeePerGas *hexutil.Big `json:"maxPriorityFeePerGas"` + Value *hexutil.Big `json:"value"` + Nonce *hexutil.Uint64 `json:"nonce"` + + // We accept "data" and "input" for backwards-compatibility reasons. + // "input" is the newer name and should be preferred by clients. + Data *hexutil.Bytes `json:"data"` + Input *hexutil.Bytes `json:"input"` + + // Introduced by AccessListTxType transaction. + AccessList *ethtypes.AccessList `json:"accessList,omitempty"` + ChainID *hexutil.Big `json:"chainId,omitempty"` +} + +// EthCallRequest represents the arguments to the eth_call RPC +type EthCallRequest struct { + // args uses the same json format as the json rpc api. + Args []byte `json:"args,omitempty"` + // gas_cap defines the default gas cap to be used + GasCap uint64 `json:"gas_cap,omitempty"` + // proposer_address of the requested block in hex format + ProposerAddress sdk.ConsAddress `json:"proposer_address,omitempty"` + // chain_id is the eip155 chain id parsed from the requested block header + ChainID int64 `json:"chain_id,omitempty"` +} + +// Result represents the result of a contract execution +type Result struct { + // hash of the ethereum transaction in hex format. This hash differs from the + // Tendermint sha256 hash of the transaction bytes. See + // https://github.com/tendermint/tendermint/issues/6539 for reference + Hash string + // logs contains the transaction hash and the proto-compatible ethereum + // logs. + Logs []*ethtypes.Log + // ret is the returned data from evm function (result or data supplied with revert + // opcode) + Ret []byte + // vm_error is the error returned by vm execution + VMError string + // gas_used specifies how much gas was consumed by the transaction + GasUsed uint64 +} + +// Failed returns if the contract execution failed in vm errors +func (r *Result) Failed() bool { + return len(r.VMError) > 0 +} + +// Return is a helper function to help caller distinguish between revert reason +// and function return. Return returns the data after execution if no error occurs. +func (r *Result) Return() []byte { + if r.Failed() { + return nil + } + return common.CopyBytes(r.Ret) +} + +// Revert returns the concrete revert reason if the execution is aborted by `REVERT` +// opcode. Note the reason can be nil if no data supplied with revert opcode. +func (r *Result) Revert() []byte { + if r.VMError != vm.ErrExecutionReverted.Error() { + return nil + } + return common.CopyBytes(r.Ret) +} + +var _ vm.EVMLogger = &NoOpTracer{} + +// NoOpTracer is an empty implementation of vm.Tracer interface +type NoOpTracer struct{} + +// NewNoOpTracer creates a no-op vm.Tracer +func NewNoOpTracer() *NoOpTracer { + return &NoOpTracer{} +} + +// CaptureStart implements vm.Tracer interface +func (dt NoOpTracer) CaptureStart(env *vm.EVM, + from common.Address, + to common.Address, + create bool, + input []byte, + gas uint64, + value *big.Int) { +} + +// CaptureState implements vm.Tracer interface +func (dt NoOpTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { +} + +// CaptureFault implements vm.Tracer interface +func (dt NoOpTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) { +} + +// CaptureEnd implements vm.Tracer interface +func (dt NoOpTracer) CaptureEnd(output []byte, gasUsed uint64, tm time.Duration, err error) {} + +// CaptureEnter implements vm.Tracer interface +func (dt NoOpTracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +} + +// CaptureExit implements vm.Tracer interface +func (dt NoOpTracer) CaptureExit(output []byte, gasUsed uint64, err error) {} + +// CaptureTxStart implements vm.Tracer interface +func (dt NoOpTracer) CaptureTxStart(gasLimit uint64) {} + +// CaptureTxEnd implements vm.Tracer interface +func (dt NoOpTracer) CaptureTxEnd(restGas uint64) {} + +// HexString is a byte array that serializes to hex +type HexString []byte + +// MarshalJSON serializes ByteArray to hex +func (s HexString) MarshalJSON() ([]byte, error) { + return json.Marshal(fmt.Sprintf("%x", string(s))) +} + +// UnmarshalJSON deserializes ByteArray to hex +func (s *HexString) UnmarshalJSON(data []byte) error { + var x string + if err := json.Unmarshal(data, &x); err != nil { + return err + } + str, err := hex.DecodeString(x) + if err != nil { + return err + } + *s = str + return nil +} + +// CompiledContract contains compiled bytecode and abi +type CompiledContract struct { + ABI abi.ABI + Bin HexString +} +