From 95dd46b7223dd388d3d1523ddd912db6924f4af8 Mon Sep 17 00:00:00 2001 From: vincentysc Date: Fri, 16 Sep 2022 14:07:27 +0800 Subject: [PATCH 01/15] add ExtensionOptionDynamicFeeTx to msg type --- usecase/parser/msg.go | 62 +- ...sg_extension_option_dynamic_fee_tx_test.go | 57 + .../parser/msg_fund_community_pool_test.go | 4 +- usecase/parser/register.go | 1 + .../tx_msg_extension_option_dynamic_fee_tx.go | 1085 +++++++++++++++++ 5 files changed, 1205 insertions(+), 4 deletions(-) create mode 100644 usecase/parser/msg_extension_option_dynamic_fee_tx_test.go create mode 100644 usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go diff --git a/usecase/parser/msg.go b/usecase/parser/msg.go index 952650009..723bc2c2c 100644 --- a/usecase/parser/msg.go +++ b/usecase/parser/msg.go @@ -127,7 +127,8 @@ func ParseBlockTxsMsgToCommands( "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", // ethermint evm - "/ethermint.evm.v1.MsgEthereumTx": + "/ethermint.evm.v1.MsgEthereumTx", + "/ethermint.types.v1.ExtensionOptionDynamicFeeTx": parser := parserManager.GetParser(utils.CosmosParserKey(msgType.(string)), utils.ParserBlockHeight(blockHeight)) msgCommands, possibleSignerAddresses = parser(utils.CosmosParserParams{ @@ -2167,3 +2168,62 @@ func ParseMsgEthereumTx( msgEthereumTxParams, )}, possibleSignerAddresses } + +func ParseExtensionOptionDynamicFeeTx( + parserParams utils.CosmosParserParams, +) ([]command.Command, []string) { + var rawMsg model.RawMsgEthereumTx + decoderConfig := &mapstructure.DecoderConfig{ + WeaklyTypedInput: true, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToTimeHookFunc(time.RFC3339), + mapstructure_utils.StringToDurationHookFunc(), + mapstructure_utils.StringToByteSliceHookFunc(), + ), + Result: &rawMsg, + } + decoder, decoderErr := mapstructure.NewDecoder(decoderConfig) + + if decoderErr != nil { + panic(fmt.Errorf("error creating RawMsgEthereumTx decoder: %v", decoderErr)) + } + if err := decoder.Decode(parserParams.Msg); err != nil { + panic(fmt.Errorf("error decoding RawMsgEthereumTx: %v", err)) + } + + // if !parserParams.MsgCommonParams.TxSuccess { + // // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 + // msgEthereumTxParams := model.MsgEthereumTxParams{ + // RawMsgEthereumTx: rawMsg, + // } + + // // Getting possible signer address from Msg + // var possibleSignerAddresses []string + // // FIXME: https://github.com/crypto-com/chain-indexing/issues/729 + // // possibleSignerAddresses = append(possibleSignerAddresses, msgEthereumTxParams.From) + + // return []command.Command{command_usecase.NewCreateMsgEthereumTx( + // parserParams.MsgCommonParams, + + // msgEthereumTxParams, + // )}, possibleSignerAddresses + // } + + // // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 + // msgEthereumTxParams := model.MsgEthereumTxParams{ + // RawMsgEthereumTx: rawMsg, + // } + + // // Getting possible signer address from Msg + // var possibleSignerAddresses []string + // // FIXME: https://github.com/crypto-com/chain-indexing/issues/729 + // // possibleSignerAddresses = append(possibleSignerAddresses, msgEthereumTxParams.From) + + // return []command.Command{command_usecase.NewCreateMsgEthereumTx( + // parserParams.MsgCommonParams, + + // msgEthereumTxParams, + // )}, possibleSignerAddresses + return nil, nil +} diff --git a/usecase/parser/msg_extension_option_dynamic_fee_tx_test.go b/usecase/parser/msg_extension_option_dynamic_fee_tx_test.go new file mode 100644 index 000000000..5fca9a902 --- /dev/null +++ b/usecase/parser/msg_extension_option_dynamic_fee_tx_test.go @@ -0,0 +1,57 @@ +package parser_test + +import ( + "github.com/crypto-com/chain-indexing/usecase/model" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + + "github.com/crypto-com/chain-indexing/entity/command" + "github.com/crypto-com/chain-indexing/usecase/coin" + command_usecase "github.com/crypto-com/chain-indexing/usecase/command" + "github.com/crypto-com/chain-indexing/usecase/event" + "github.com/crypto-com/chain-indexing/usecase/parser" + usecase_parser_test "github.com/crypto-com/chain-indexing/usecase/parser/test" +) + +var _ = Describe("ParseMsgCommands", func() { + Describe("ExtensionOptionDynamicFeeTx", func() { + It("should parse Msg commands when there is ethermint.ExtensionOptionDynamicFeeTx in the transaction", func() { + block, _ := mustParseBlockResp(usecase_parser_test.TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESP) + blockResults := mustParseBlockResultsResp( + usecase_parser_test.TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP, + ) + + tx := mustParseTxsResp(usecase_parser_test.TX_MSG_FUND_COMMUNITY_POOL_TXS_RESP) + txs := []model.Tx{*tx} + + accountAddressPrefix := "tcro" + bondingDenom := "basetcro" + + pm := usecase_parser_test.InitParserManager() + + cmds, possibleSignerAddresses, err := parser.ParseBlockTxsMsgToCommands( + pm, + block.Height, + blockResults, + txs, + accountAddressPrefix, + bondingDenom, + ) + Expect(err).To(BeNil()) + Expect(cmds).To(HaveLen(1)) + Expect(cmds).To(Equal([]command.Command{command_usecase.NewCreateMsgFundCommunityPool( + event.MsgCommonParams{ + BlockHeight: int64(460662), + TxHash: "933052FD68B10549312F3CBA9AF4F4CC77536BE5ECD335638DD36ECCE681201E", + TxSuccess: true, + MsgIndex: 0, + }, + model.MsgFundCommunityPoolParams{ + Depositor: "tcro1fmprm0sjy6lz9llv7rltn0v2azzwcwzvk2lsyn", + Amount: coin.MustParseCoinsNormalized("1basetcro"), + }, + )})) + Expect(possibleSignerAddresses).To(Equal([]string{"tcro1fmprm0sjy6lz9llv7rltn0v2azzwcwzvk2lsyn"})) + }) + }) +}) diff --git a/usecase/parser/msg_fund_community_pool_test.go b/usecase/parser/msg_fund_community_pool_test.go index 498382b14..c3985a4e2 100644 --- a/usecase/parser/msg_fund_community_pool_test.go +++ b/usecase/parser/msg_fund_community_pool_test.go @@ -17,9 +17,7 @@ var _ = Describe("ParseMsgCommands", func() { Describe("MsgFundCommunityPool", func() { It("should parse Msg commands when there is distribution.MsgFundCommunityPool in the transaction", func() { block, _ := mustParseBlockResp(usecase_parser_test.TX_MSG_FUND_COMMUNITY_POOL_BLOCK_RESP) - blockResults := mustParseBlockResultsResp( - usecase_parser_test.TX_MSG_FUND_COMMUNITY_POOL_BLOCK_RESULTS_RESP, - ) + blockResults := mustParseBlockResultsResp(usecase_parser_test.TX_MSG_FUND_COMMUNITY_POOL_BLOCK_RESULTS_RESP) tx := mustParseTxsResp(usecase_parser_test.TX_MSG_FUND_COMMUNITY_POOL_TXS_RESP) txs := []model.Tx{*tx} diff --git a/usecase/parser/register.go b/usecase/parser/register.go index 89ddcd6c6..67e8be439 100644 --- a/usecase/parser/register.go +++ b/usecase/parser/register.go @@ -81,6 +81,7 @@ func InitParsers(manager *utils.CosmosParserManager) { // ethermint evm manager.RegisterParser("/ethermint.evm.v1.MsgEthereumTx", BEGIN_BLOCK_HEIGHT, ParseMsgEthereumTx) + manager.RegisterParser("/ethermint.types.v1.ExtensionOptionDynamicFeeTx", BEGIN_BLOCK_HEIGHT, ParseExtensionOptionDynamicFeeTx) } func RegisterBreakingVersionParsers(manager *utils.CosmosParserManager) { diff --git a/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go b/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go new file mode 100644 index 000000000..8f7667df4 --- /dev/null +++ b/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go @@ -0,0 +1,1085 @@ +package usecase_parser_test + +const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESP = ` +{ + "jsonrpc": "2.0", + "id": -1, + "result": { + "block_id": { + "hash": "18AE8D867BA011BE28AA3972AF39BE09DB8A9B9E50B4B260B316A701B460EEF0", + "parts": { + "total": 1, + "hash": "4BB6C29EB6A40435312DB1D0950733399EDA6B92045B715276FD48D00209BD05" + } + }, + "block": { + "header": { + "version": { + "block": "11" + }, + "chain_id": "cronostestnet_338-3", + "height": "5168277", + "time": "2022-09-16T03:11:51.138098162Z", + "last_block_id": { + "hash": "5CAF9746C8E5EB070A91FA0D96F78800F93AB84C5E9A18C38A49AE12928877DC", + "parts": { + "total": 1, + "hash": "090F905B91A0D364418D137D5A911F022143CE54F91B005E8CBAC6074D10ABBF" + } + }, + "last_commit_hash": "E1B7475DF8F17F8F4C0E26DA9E2555E352F008B96083E70F730DA825BCF5DE92", + "data_hash": "D88C1DCD4A2244BF6F183B2CC748FC819C79EDE3685D9705B7A23803FEC9FB0F", + "validators_hash": "133A3E0C61E2C3F64BB5A8541A03359C99F7CD9567521922ED9DD03E428940E4", + "next_validators_hash": "133A3E0C61E2C3F64BB5A8541A03359C99F7CD9567521922ED9DD03E428940E4", + "consensus_hash": "5B1778CC6A8A0D4443986BB557A8AB5231AA1DE78E4748B9731C8647D5616985", + "app_hash": "5C9F993A3FAB180EEEB8BBB497D7CE7E1E312A2C24119F5C84CB03E2F125CAEB", + "last_results_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855", + "evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855", + "proposer_address": "A3F7397F81D4CC82D566633F9728DFB50A35D965" + }, + "data": { + "txs": [ + "Co0eCpcSCiMvaWJjLmNvcmUuY2xpZW50LnYxLk1zZ1VwZGF0ZUNsaWVudBLvEQoPMDctdGVuZGVybWludC0wEq4RCiYvaWJjLmxpZ2h0Y2xpZW50cy50ZW5kZXJtaW50LnYxLkhlYWRlchKDEQrDBgqbAwoCCAsSEnRlc3RuZXQtY3JvZXNlaWQtNBjw2/ECIgwI89KPmQYQ+sKdsQIqSAogArpLz6kXoV/Yuyr+co4SasuuQITggIx+GUqdTYfXDrUSJAgBEiAqW22SR8CbBBC5VWpGfwDlH3sOkmgsNzLF+bVwQVIWiDIgUtHcAB/CZETMw6cfWYXCiSPc6ulNV27bGfZ/TJEsdcs6IOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVQiAiFwjoC+1aiMo2eWd65jKf84ZELV0B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5NQ3Ga4K1DcSDBrKIL7too7IafXy4XOxp+vJSInCAESAQEaIN2+/oy+r7GBmUfOQMGkMw+Q2z+e0eWr4ZXW1497hwMkGgcIBBDw2/ECIit0Y3JjMWo2eGhudG1mcWF1d24wcnFocWM4OXlyOWEyeHFlOHZ4dGhlZGhwEktjcnlwdG8ub3JnIHJlbGF5ZXIgfCBoZXJtZXMgMS4wLjArMTlkZjBjNSAoaHR0cHM6Ly9oZXJtZXMuaW5mb3JtYWwuc3lzdGVtcyn6P0EKLy9ldGhlcm1pbnQudHlwZXMudjEuRXh0ZW5zaW9uT3B0aW9uRHluYW1pY0ZlZVR4Eg4KDDUwMDAwMDAwMDAwMBKwAQpaCk8KKC9ldGhlcm1pbnQuY3J5cHRvLnYxLmV0aHNlY3AyNTZrMS5QdWJLZXkSIwohA+b+HIDoSHnEjrvKWB7Z7yHCtfzXr1nHI1Ldls5G0uMaEgQKAggBGIwQElIKHwoIYmFzZXRjcm8SEzE4NTcxNTYwMDAwMDAwMDAwMDAQlvISIit0Y3JjMWNudXd4NWR3endmeXBza3ZwN2thOHlsbHd5cGtkamd6MzZzbXpkGkAZgFIcSP995H+GBp/SbWjqS9iOI+c9eo68wgu9C4+xmnI12CvHDH0m5BHYatrxWhpG52EYd6GrgqdZjMLdbl+Z" + ] + }, + "evidence": { + "evidence": [] + }, + "last_commit": { + "height": "5168276", + "round": 0, + "block_id": { + "hash": "5CAF9746C8E5EB070A91FA0D96F78800F93AB84C5E9A18C38A49AE12928877DC", + "parts": { + "total": 1, + "hash": "090F905B91A0D364418D137D5A911F022143CE54F91B005E8CBAC6074D10ABBF" + } + }, + "signatures": [ + { + "block_id_flag": 2, + "validator_address": "0421821D46C46F86F1EAD79EEB31CFA88A5578CB", + "timestamp": "2022-09-16T03:11:51.138098162Z", + "signature": "3cY3A+m3NP39QKR5yhOUndHtlOe/6WuDA2ZAvWow2sRfVuW6h+orzIXidk2BoZ/2DY9nBsxVbZdp+6Ii1LasBQ==" + }, + { + "block_id_flag": 2, + "validator_address": "A3F7397F81D4CC82D566633F9728DFB50A35D965", + "timestamp": "2022-09-16T03:11:51.125576597Z", + "signature": "4fUTqq7dZsdyZT8VySXLETWstipeDwmbj2jum/BQ57At+MTcGWIWyoSLuY/Qo8f0er4pw9fdXeH6kMyGJmgKAg==" + }, + { + "block_id_flag": 2, + "validator_address": "739109BF2993601BEF624283C9A572DF3175CBA8", + "timestamp": "2022-09-16T03:11:51.43064565Z", + "signature": "uZbUzxBIA5dKAqLe9os+WoUjz1JZDAaUkcxKIx0rxMu9GglLxqf8DzR60/a67bexgezwVYT/iRXS8HMpm2YYCg==" + }, + { + "block_id_flag": 3, + "validator_address": "A7E012CB6FFABA17C6C98600F3F7402DC1A06C8C", + "timestamp": "2022-09-16T03:11:51.586743853Z", + "signature": "8oUW/BJUsRuum84BPXaRjD5aeEULgBKd95xDOaPfhz9RlNrEluR23IC4J7g0B097ZYDSBlOa68dgtLl/UgljBQ==" + }, + { + "block_id_flag": 2, + "validator_address": "B8735B4BBA3AD413B7DBB3A74ABC75A5907BE7A5", + "timestamp": "2022-09-16T03:11:51.381065082Z", + "signature": "R7vL//SDw5vXD1nGqX0h3tUzDM36Z/lbIiFu2wxH0Rfp1A8flyVb3oKZRqp2V9oyoDXx+lI/FOFpnETvgYHNDA==" + }, + { + "block_id_flag": 2, + "validator_address": "09D283BB0AC4B6A8BA05F6600E018E1D4DD25C12", + "timestamp": "2022-09-16T03:11:51.3426131Z", + "signature": "9uTQwAStZeKdZDR5RXYpoF95XxGPt7MocsfUA8kmtK24QU7cTjidKZ/gO3TyVgabhdT741bZhs2G/tLIqt1KBA==" + }, + { + "block_id_flag": 2, + "validator_address": "3ECB552B1E6651DD70CE27923099F96408A7703D", + "timestamp": "2022-09-16T03:11:51.398239188Z", + "signature": "L25yH/2U0+E2jCbvhIpCJ43JQjWhi81xBaIxH/hTqNiZkpxwLDkFNwzl+2fjCQ+KBjtlk9DnlO5CU+oSwy4LDw==" + }, + { + "block_id_flag": 2, + "validator_address": "B359B56836AF6117E780045985D45F988065B746", + "timestamp": "2022-09-16T03:11:51.4162306Z", + "signature": "1+75553/pvXNxab0GhZgjA37ahT9ub5hERD3v83GllEi+bkjNv0frPpgBTbqkOFQmsvtoMqBW2uCmPzQq3WDDQ==" + } + ] + } + } + } +}` + +const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` +{ + "jsonrpc": "2.0", + "id": -1, + "result": { + "height": "5168277", + "txs_results": [ + { + "code": 0, + "data": "Ei0KKy9pYmMuY29yZS5jbGllbnQudjEuTXNnVXBkYXRlQ2xpZW50UmVzcG9uc2USMAoqL2liYy5jb3JlLmNoYW5uZWwudjEuTXNnUmVjdlBhY2tldFJlc3BvbnNlEgIIAg==", + "log": "[{\"msg_index\":0,\"events\":[{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/ibc.core.client.v1.MsgUpdateClient\"},{\"key\":\"module\",\"value\":\"ibc_client\"}]},{\"type\":\"update_client\",\"attributes\":[{\"key\":\"client_id\",\"value\":\"07-tendermint-0\"},{\"key\":\"client_type\",\"value\":\"07-tendermint\"},{\"key\":\"consensus_height\",\"value\":\"4-6057456\"},{\"key\":\"header\",\"value\":\"0a262f6962632e6c69676874636c69656e74732e74656e6465726d696e742e76312e48656164657212d1110a91070a9b030a02080b1212746573746e65742d63726f65736569642d3418f0dbf102220c08f3d28f990610fac29db1022a480a2002ba4bcfa917a15fd8bb2afe728e126acbae4084e0808c7e194a9d4d87d70eb51224080112202a5b6d9247c09b0410b9556a467f00e51f7b0e92682c3732c5f9b57041521688322052d1dc001fc26444ccc3a71f5985c28923dceae94d576edb19f67f4c912c75cb3a20e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b8554220221708e80bed5a88ca3679677ae6329ff386442d5d01a3e65443da5b49df7b884a20221708e80bed5a88ca3679677ae6329ff386442d5d01a3e65443da5b49df7b885220372b4ae845086c837efef79a189b085b1fd6610c53f3beb17ee0e27b347c06de5a201a6f8fdbcc1850950f8b7ed3043f496890c667ad6de09b53d0e9d61cf5aadd36622014e1eac42537d613e3aac9be46f3d3656be9e0df78d497192efb3c1af3a974566a20e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b85572147e2b455523a35ae8f4064c00af01515fef67307912f00308f0dbf1021a480a20bcd3089d06e1ff67dc331a26f199b8e671e0cdb4eac8569fd2bdf9b8e1eefc3d122408011220f3b8254faa3e8d9b6d69a75a7c7a944eec3462d6a36804678033cf0378768607226708021214f9a4582896e5f2692beddd7c251755e33d2de0131a0b08f9d28f990610d29ec4292240bc28c6b0ef2d31c6bcfd98dde2b67e2e1d7be0624358736bfc1b323093c0d1c721bf20b29b9f2a550c1595c76e88a4a363d2b61e1ac0f0444292f33c0fc89e0d22670802121471da178ae52b2d0654102a86166ce91ac5121cb21a0b08f9d28f990610cbf1a1592240241258bb9087f0b8e5e71143d6a495dd1ad43965d6871b928e7d0c91cf4eaa82205b9137e54b3d24634f462be24b11a355b7eb4c98c828b0a94192a4d380e7062267080212147e2b455523a35ae8f4064c00af01515fef6730791a0b08f9d28f990610a5ebbc6522402dc21b41175619dd8e624fb0bd7731f2bc3f01ddcee40e3ecd73d2b1720103832c67e11e0b4fef3e93768c9b95f2796235e0e0f24d7ba652a9177a5db0697f0b220f08011a0b088092b8c398feffffff01220f08011a0b088092b8c398feffffff01220f08011a0b088092b8c398feffffff01220f08011a0b088092b8c398feffffff01220f08011a0b088092b8c398feffffff01220f08011a0b088092b8c398feffffff011297050a400a14f9a4582896e5f2692beddd7c251755e33d2de01312220a20a6ac24f74f9e57dc91a5f9943987c705f734cf5ee02392c729aa92341b8dbe2e18f487f3ee2c0a400a1471da178ae52b2d0654102a86166ce91ac5121cb212220a20df5b36442416b1c22d50fb4f1f4b60182e2449a66f08a1b630a73241d90b8eff18ddb29dee2c0a400a147e2b455523a35ae8f4064c00af01515fef67307912220a2062d5030d9a1bb3750c97c772ce4f88531c7e9e01216332dad48ae41b0fb61c8318c7e598ed2c0a400a14de0339827b43593f50097d63f7ea6d6f53d8a5fd12220a20cf000f2dfff1deb21b605910d9cbb48eb91eba47797c1931b4838ae8028d7d3618ece3c2960b0a400a14cf237edc88cbff3fe95b8077fdf1f1e6cba5bb1b12220a20bb736fd8b4c4720fec9818ed4f5d6b4810fb23e0dd85ff002488c4310524979a18dce694b2060a400a14cf43715fb7706185e1656766684e4a0f87bb156212220a205cd5ca6e6371250601156a65708d7c49799ff007dde639295e616b8c9d7a908418e6d48fa7040a3f0a142b1f2eb1bab6a7eaf7b05cdafa31827528b570ea12220a2076f94108639c8064b073036619870672db0dd37bea8c2ed023ead9e643fc7a4718cedfa9330a3f0a14131e5631082b355b3230fe51dc3f6305fc03728d12220a2056f2155f8da634bda0880ee376422b9689d96d07ffc8a2086ec4f7706516dfab188f8eae010a3e0a14f04886fac41dfaabec6a4bac6b483f743c42147812220a202fa3197455a6de637cc2721f69d398f15b95e116ad5f2ce0fc5200b108d15b2618c4db0112400a147e2b455523a35ae8f4064c00af01515fef67307912220a2062d5030d9a1bb3750c97c772ce4f88531c7e9e01216332dad48ae41b0fb61c8318c7e598ed2c18e788eaee9c011a07080410ffefeb022297050a400a14f9a4582896e5f2692beddd7c251755e33d2de01312220a20a6ac24f74f9e57dc91a5f9943987c705f734cf5ee02392c729aa92341b8dbe2e18f487f3ee2c0a400a1471da178ae52b2d0654102a86166ce91ac5121cb212220a20df5b36442416b1c22d50fb4f1f4b60182e2449a66f08a1b630a73241d90b8eff18ddb29dee2c0a400a147e2b455523a35ae8f4064c00af01515fef67307912220a2062d5030d9a1bb3750c97c772ce4f88531c7e9e01216332dad48ae41b0fb61c8318a48a91ed2c0a400a14de0339827b43593f50097d63f7ea6d6f53d8a5fd12220a20cf000f2dfff1deb21b605910d9cbb48eb91eba47797c1931b4838ae8028d7d3618ece3c2960b0a400a14cf237edc88cbff3fe95b8077fdf1f1e6cba5bb1b12220a20bb736fd8b4c4720fec9818ed4f5d6b4810fb23e0dd85ff002488c4310524979a18e78ae7a5060a400a14cf43715fb7706185e1656766684e4a0f87bb156212220a205cd5ca6e6371250601156a65708d7c49799ff007dde639295e616b8c9d7a908418c4cba0a0040a3f0a142b1f2eb1bab6a7eaf7b05cdafa31827528b570ea12220a2076f94108639c8064b073036619870672db0dd37bea8c2ed023ead9e643fc7a4718cedfa9330a3f0a14131e5631082b355b3230fe51dc3f6305fc03728d12220a2056f2155f8da634bda0880ee376422b9689d96d07ffc8a2086ec4f7706516dfab188f8eae010a3e0a14f04886fac41dfaabec6a4bac6b483f743c42147812220a202fa3197455a6de637cc2721f69d398f15b95e116ad5f2ce0fc5200b108d15b2618c4db0112400a14de0339827b43593f50097d63f7ea6d6f53d8a5fd12220a20cf000f2dfff1deb21b605910d9cbb48eb91eba47797c1931b4838ae8028d7d3618ece3c2960b18adc8c5db9c01\"}]}]},{\"msg_index\":1,\"events\":[{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"tcrc1yl6hdjhmkf37639730gffanpzndzdpmhh59m9v\"},{\"key\":\"amount\",\"value\":\"983ibc/DC0415924F42CE86E9937EBCC9A92CE5B520D1E33DAB766BB1E62DA6C9E9F6F0\"},{\"key\":\"receiver\",\"value\":\"tcrc1dsuzelz8jvk6gncmhtj7p4xs33kpt5fqyhf3qk\"},{\"key\":\"amount\",\"value\":\"983ibc/DC0415924F42CE86E9937EBCC9A92CE5B520D1E33DAB766BB1E62DA6C9E9F6F0\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"tcrc1yl6hdjhmkf37639730gffanpzndzdpmhh59m9v\"},{\"key\":\"amount\",\"value\":\"983ibc/DC0415924F42CE86E9937EBCC9A92CE5B520D1E33DAB766BB1E62DA6C9E9F6F0\"}]},{\"type\":\"coinbase\",\"attributes\":[{\"key\":\"minter\",\"value\":\"tcrc1yl6hdjhmkf37639730gffanpzndzdpmhh59m9v\"},{\"key\":\"amount\",\"value\":\"983ibc/DC0415924F42CE86E9937EBCC9A92CE5B520D1E33DAB766BB1E62DA6C9E9F6F0\"}]},{\"type\":\"denomination_trace\",\"attributes\":[{\"key\":\"trace_hash\",\"value\":\"DC0415924F42CE86E9937EBCC9A92CE5B520D1E33DAB766BB1E62DA6C9E9F6F0\"},{\"key\":\"denom\",\"value\":\"ibc/DC0415924F42CE86E9937EBCC9A92CE5B520D1E33DAB766BB1E62DA6C9E9F6F0\"}]},{\"type\":\"fungible_token_packet\",\"attributes\":[{\"key\":\"module\",\"value\":\"transfer\"},{\"key\":\"sender\",\"value\":\"tcro1pdn2nsn9wesz6px3lcjsgmp8pefednzp3gmp3q\"},{\"key\":\"receiver\",\"value\":\"tcrc1dsuzelz8jvk6gncmhtj7p4xs33kpt5fqyhf3qk\"},{\"key\":\"denom\",\"value\":\"transfer/channel-2/TEST\"},{\"key\":\"amount\",\"value\":\"983\"},{\"key\":\"success\",\"value\":\"true\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/ibc.core.channel.v1.MsgRecvPacket\"},{\"key\":\"module\",\"value\":\"ibc_channel\"},{\"key\":\"sender\",\"value\":\"tcrc1yl6hdjhmkf37639730gffanpzndzdpmhh59m9v\"},{\"key\":\"module\",\"value\":\"ibc_channel\"}]},{\"type\":\"recv_packet\",\"attributes\":[{\"key\":\"packet_data\",\"value\":\"{\\\"amount\\\":\\\"983\\\",\\\"denom\\\":\\\"transfer/channel-2/TEST\\\",\\\"receiver\\\":\\\"tcrc1dsuzelz8jvk6gncmhtj7p4xs33kpt5fqyhf3qk\\\",\\\"sender\\\":\\\"tcro1pdn2nsn9wesz6px3lcjsgmp8pefednzp3gmp3q\\\"}\"},{\"key\":\"packet_data_hex\",\"value\":\"7b22616d6f756e74223a22393833222c2264656e6f6d223a227472616e736665722f6368616e6e656c2d322f54455354222c227265636569766572223a2274637263316473757a656c7a386a766b36676e636d68746a377034787333336b707435667179686633716b222c2273656e646572223a227463726f3170646e326e736e397765737a367078336c636a73676d703870656665646e7a7033676d703371227d\"},{\"key\":\"packet_timeout_height\",\"value\":\"3-5169249\"},{\"key\":\"packet_timeout_timestamp\",\"value\":\"1663298359268152280\"},{\"key\":\"packet_sequence\",\"value\":\"1458\"},{\"key\":\"packet_src_port\",\"value\":\"transfer\"},{\"key\":\"packet_src_channel\",\"value\":\"channel-131\"},{\"key\":\"packet_dst_port\",\"value\":\"transfer\"},{\"key\":\"packet_dst_channel\",\"value\":\"channel-0\"},{\"key\":\"packet_channel_ordering\",\"value\":\"ORDER_UNORDERED\"},{\"key\":\"packet_connection\",\"value\":\"connection-0\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcrc1dsuzelz8jvk6gncmhtj7p4xs33kpt5fqyhf3qk\"},{\"key\":\"sender\",\"value\":\"tcrc1yl6hdjhmkf37639730gffanpzndzdpmhh59m9v\"},{\"key\":\"amount\",\"value\":\"983ibc/DC0415924F42CE86E9937EBCC9A92CE5B520D1E33DAB766BB1E62DA6C9E9F6F0\"}]},{\"type\":\"write_acknowledgement\",\"attributes\":[{\"key\":\"packet_data\",\"value\":\"{\\\"amount\\\":\\\"983\\\",\\\"denom\\\":\\\"transfer/channel-2/TEST\\\",\\\"receiver\\\":\\\"tcrc1dsuzelz8jvk6gncmhtj7p4xs33kpt5fqyhf3qk\\\",\\\"sender\\\":\\\"tcro1pdn2nsn9wesz6px3lcjsgmp8pefednzp3gmp3q\\\"}\"},{\"key\":\"packet_data_hex\",\"value\":\"7b22616d6f756e74223a22393833222c2264656e6f6d223a227472616e736665722f6368616e6e656c2d322f54455354222c227265636569766572223a2274637263316473757a656c7a386a766b36676e636d68746a377034787333336b707435667179686633716b222c2273656e646572223a227463726f3170646e326e736e397765737a367078336c636a73676d703870656665646e7a7033676d703371227d\"},{\"key\":\"packet_timeout_height\",\"value\":\"3-5169249\"},{\"key\":\"packet_timeout_timestamp\",\"value\":\"1663298359268152280\"},{\"key\":\"packet_sequence\",\"value\":\"1458\"},{\"key\":\"packet_src_port\",\"value\":\"transfer\"},{\"key\":\"packet_src_channel\",\"value\":\"channel-131\"},{\"key\":\"packet_dst_port\",\"value\":\"transfer\"},{\"key\":\"packet_dst_channel\",\"value\":\"channel-0\"},{\"key\":\"packet_ack\",\"value\":\"{\\\"result\\\":\\\"AQ==\\\"}\"},{\"key\":\"packet_ack_hex\",\"value\":\"7b22726573756c74223a2241513d3d227d\"},{\"key\":\"packet_connection\",\"value\":\"connection-0\"}]}]}]", + "info": "", + "gas_wanted": "309526", + "gas_used": "296783", + "events": [ + { + "type": "use_feegrant", + "attributes": [ + { + "key": "Z3JhbnRlcg==", + "value": "dGNyYzFjbnV3eDVkd3p3Znlwc2t2cDdrYTh5bGx3eXBrZGpnejM2c216ZA==", + "index": true + }, + { + "key": "Z3JhbnRlZQ==", + "value": "dGNyYzFqNnhobnRtZnFhdXduMHJxaHFjODl5cjlhMnhxZTh2eHRoZWRocA==", + "index": true + } + ] + }, + { + "type": "update_feegrant", + "attributes": [ + { + "key": "Z3JhbnRlcg==", + "value": "dGNyYzFjbnV3eDVkd3p3Znlwc2t2cDdrYTh5bGx3eXBrZGpnejM2c216ZA==", + "index": true + }, + { + "key": "Z3JhbnRlZQ==", + "value": "dGNyYzFqNnhobnRtZnFhdXduMHJxaHFjODl5cjlhMnhxZTh2eHRoZWRocA==", + "index": true + } + ] + }, + { + "type": "coin_spent", + "attributes": [ + { + "key": "c3BlbmRlcg==", + "value": "dGNyYzFjbnV3eDVkd3p3Znlwc2t2cDdrYTh5bGx3eXBrZGpnejM2c216ZA==", + "index": true + }, + { + "key": "YW1vdW50", + "value": "NzU5OTk0MDc2MDI1NjcxNjA2YmFzZXRjcm8=", + "index": true + } + ] + }, + { + "type": "coin_received", + "attributes": [ + { + "key": "cmVjZWl2ZXI=", + "value": "dGNyYzE3eHBmdmFrbTJhbWc5NjJ5bHM2Zjg0ejNrZWxsOGM1bGZqc2plag==", + "index": true + }, + { + "key": "YW1vdW50", + "value": "NzU5OTk0MDc2MDI1NjcxNjA2YmFzZXRjcm8=", + "index": true + } + ] + }, + { + "type": "transfer", + "attributes": [ + { + "key": "cmVjaXBpZW50", + "value": "dGNyYzE3eHBmdmFrbTJhbWc5NjJ5bHM2Zjg0ejNrZWxsOGM1bGZqc2plag==", + "index": true + }, + { + "key": "c2VuZGVy", + "value": "dGNyYzFjbnV3eDVkd3p3Znlwc2t2cDdrYTh5bGx3eXBrZGpnejM2c216ZA==", + "index": true + }, + { + "key": "YW1vdW50", + "value": "NzU5OTk0MDc2MDI1NjcxNjA2YmFzZXRjcm8=", + "index": true + } + ] + }, + { + "type": "message", + "attributes": [ + { + "key": "c2VuZGVy", + "value": "dGNyYzFjbnV3eDVkd3p3Znlwc2t2cDdrYTh5bGx3eXBrZGpnejM2c216ZA==", + "index": true + } + ] + }, + { + "type": "tx", + "attributes": [ + { + "key": "ZmVl", + "value": "NzU5OTk0MDc2MDI1NjcxNjA2YmFzZXRjcm8=", + "index": true + }, + { + "key": "ZmVlX3BheWVy", + "value": "dGNyYzFjbnV3eDVkd3p3Znlwc2t2cDdrYTh5bGx3eXBrZGpnejM2c216ZA==", + "index": true + } + ] + }, + { + "type": "tx", + "attributes": [ + { + "key": "YWNjX3NlcQ==", + "value": "dGNyYzFqNnhobnRtZnFhdXduMHJxaHFjODl5cjlhMnhxZTh2eHRoZWRocC8yMDYw", + "index": true + } + ] + }, + { + "type": "tx", + "attributes": [ + { + "key": "c2lnbmF0dXJl", + "value": "R1lCU0hFai9mZVIvaGdhZjBtMW82a3ZZamlQblBYcU92TUlMdlF1UHNacHlOZGdyeHd4OUp1UVIyR3JhOFZvYVJ1ZGhHSGVocTRLbldZekMzVzVmbVE9PQ==", + "index": true + } + ] + }, + { + "type": "message", + "attributes": [ + { + "key": "YWN0aW9u", + "value": "L2liYy5jb3JlLmNsaWVudC52MS5Nc2dVcGRhdGVDbGllbnQ=", + "index": true + } + ] + }, + { + "type": "update_client", + "attributes": [ + { + "key": "Y2xpZW50X2lk", + "value": "MD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YzUyMDBiMTA4ZDE1YjI2MThjNGRiMDExMjQwMGExNGRlMDMzOTgyN2I0MzU5M2Y1MDA5N2Q2M2Y3ZWE2ZDZmNTNkOGE1ZmQxMjIyMGEyMGNmMDAwZjJkZmZmMWRlYjIxYjYwNTkxMGQ5Y2JiNDhlYjkxZWJhNDc3OTdjMTkzMWI0ODM4YWU4MDI4ZDdkMzYxOGVjZTNjMjk2MGIxOGFkYzhjNWRiOWMwMQ==", + "index": true + } + ] + }, + { + "type": "message", + "attributes": [ + { + "key": "bW9kdWxl", + "value": "aWJjX2NsaWVudA==", + "index": true + } + ] + }, + { + "type": "message", + "attributes": [ + { + "key": "YWN0aW9u", + "value": "L2liYy5jb3JlLmNoYW5uZWwudjEuTXNnUmVjdlBhY2tldA==", + "index": true + } + ] + }, + { + "type": "recv_packet", + "attributes": [ + { + "key": "cGFja2V0X2RhdGE=", + "value": "eyJhbW91bnQiOiI5ODMiLCJkZW5vbSI6InRyYW5zZmVyL2NoYW5uZWwtMi9URVNUIiwicmVjZWl2ZXIiOiJ0Y3JjMWRzdXplbHo4anZrNmduY21odGo3cDR4czMza3B0NWZxeWhmM3FrIiwic2VuZGVyIjoidGNybzFwZG4ybnNuOXdlc3o2cHgzbGNqc2dtcDhwZWZlZG56cDNnbXAzcSJ9", + "index": true + }, + { + "key": "cGFja2V0X2RhdGFfaGV4", + "value": "N2IyMjYxNmQ2Zjc1NmU3NDIyM2EyMjM5MzgzMzIyMmMyMjY0NjU2ZTZmNmQyMjNhMjI3NDcyNjE2ZTczNjY2NTcyMmY2MzY4NjE2ZTZlNjU2YzJkMzIyZjU0NDU1MzU0MjIyYzIyNzI2NTYzNjU2OTc2NjU3MjIyM2EyMjc0NjM3MjYzMzE2NDczNzU3YTY1NmM3YTM4NmE3NjZiMzY2NzZlNjM2ZDY4NzQ2YTM3NzAzNDc4NzMzMzMzNmI3MDc0MzU2NjcxNzk2ODY2MzM3MTZiMjIyYzIyNzM2NTZlNjQ2NTcyMjIzYTIyNzQ2MzcyNmYzMTcwNjQ2ZTMyNmU3MzZlMzk3NzY1NzM3YTM2NzA3ODMzNmM2MzZhNzM2NzZkNzAzODcwNjU2NjY1NjQ2ZTdhNzAzMzY3NmQ3MDMzNzEyMjdk", + "index": true + }, + { + "key": "cGFja2V0X3RpbWVvdXRfaGVpZ2h0", + "value": "My01MTY5MjQ5", + "index": true + }, + { + "key": "cGFja2V0X3RpbWVvdXRfdGltZXN0YW1w", + "value": "MTY2MzI5ODM1OTI2ODE1MjI4MA==", + "index": true + }, + { + "key": "cGFja2V0X3NlcXVlbmNl", + "value": "MTQ1OA==", + "index": true + }, + { + "key": "cGFja2V0X3NyY19wb3J0", + "value": "dHJhbnNmZXI=", + "index": true + }, + { + "key": "cGFja2V0X3NyY19jaGFubmVs", + "value": "Y2hhbm5lbC0xMzE=", + "index": true + }, + { + "key": "cGFja2V0X2RzdF9wb3J0", + "value": "dHJhbnNmZXI=", + "index": true + }, + { + "key": "cGFja2V0X2RzdF9jaGFubmVs", + "value": "Y2hhbm5lbC0w", + "index": true + }, + { + "key": "cGFja2V0X2NoYW5uZWxfb3JkZXJpbmc=", + "value": "T1JERVJfVU5PUkRFUkVE", + "index": true + }, + { + "key": "cGFja2V0X2Nvbm5lY3Rpb24=", + "value": "Y29ubmVjdGlvbi0w", + "index": true + } + ] + }, + { + "type": "message", + "attributes": [ + { + "key": "bW9kdWxl", + "value": "aWJjX2NoYW5uZWw=", + "index": true + } + ] + }, + { + "type": "denomination_trace", + "attributes": [ + { + "key": "dHJhY2VfaGFzaA==", + "value": "REMwNDE1OTI0RjQyQ0U4NkU5OTM3RUJDQzlBOTJDRTVCNTIwRDFFMzNEQUI3NjZCQjFFNjJEQTZDOUU5RjZGMA==", + "index": true + }, + { + "key": "ZGVub20=", + "value": "aWJjL0RDMDQxNTkyNEY0MkNFODZFOTkzN0VCQ0M5QTkyQ0U1QjUyMEQxRTMzREFCNzY2QkIxRTYyREE2QzlFOUY2RjA=", + "index": true + } + ] + }, + { + "type": "coin_received", + "attributes": [ + { + "key": "cmVjZWl2ZXI=", + "value": "dGNyYzF5bDZoZGpobWtmMzc2Mzk3MzBnZmZhbnB6bmR6ZHBtaGg1OW05dg==", + "index": true + }, + { + "key": "YW1vdW50", + "value": "OTgzaWJjL0RDMDQxNTkyNEY0MkNFODZFOTkzN0VCQ0M5QTkyQ0U1QjUyMEQxRTMzREFCNzY2QkIxRTYyREE2QzlFOUY2RjA=", + "index": true + } + ] + }, + { + "type": "coinbase", + "attributes": [ + { + "key": "bWludGVy", + "value": "dGNyYzF5bDZoZGpobWtmMzc2Mzk3MzBnZmZhbnB6bmR6ZHBtaGg1OW05dg==", + "index": true + }, + { + "key": "YW1vdW50", + "value": "OTgzaWJjL0RDMDQxNTkyNEY0MkNFODZFOTkzN0VCQ0M5QTkyQ0U1QjUyMEQxRTMzREFCNzY2QkIxRTYyREE2QzlFOUY2RjA=", + "index": true + } + ] + }, + { + "type": "coin_spent", + "attributes": [ + { + "key": "c3BlbmRlcg==", + "value": "dGNyYzF5bDZoZGpobWtmMzc2Mzk3MzBnZmZhbnB6bmR6ZHBtaGg1OW05dg==", + "index": true + }, + { + "key": "YW1vdW50", + "value": "OTgzaWJjL0RDMDQxNTkyNEY0MkNFODZFOTkzN0VCQ0M5QTkyQ0U1QjUyMEQxRTMzREFCNzY2QkIxRTYyREE2QzlFOUY2RjA=", + "index": true + } + ] + }, + { + "type": "coin_received", + "attributes": [ + { + "key": "cmVjZWl2ZXI=", + "value": "dGNyYzFkc3V6ZWx6OGp2azZnbmNtaHRqN3A0eHMzM2twdDVmcXloZjNxaw==", + "index": true + }, + { + "key": "YW1vdW50", + "value": "OTgzaWJjL0RDMDQxNTkyNEY0MkNFODZFOTkzN0VCQ0M5QTkyQ0U1QjUyMEQxRTMzREFCNzY2QkIxRTYyREE2QzlFOUY2RjA=", + "index": true + } + ] + }, + { + "type": "transfer", + "attributes": [ + { + "key": "cmVjaXBpZW50", + "value": "dGNyYzFkc3V6ZWx6OGp2azZnbmNtaHRqN3A0eHMzM2twdDVmcXloZjNxaw==", + "index": true + }, + { + "key": "c2VuZGVy", + "value": "dGNyYzF5bDZoZGpobWtmMzc2Mzk3MzBnZmZhbnB6bmR6ZHBtaGg1OW05dg==", + "index": true + }, + { + "key": "YW1vdW50", + "value": "OTgzaWJjL0RDMDQxNTkyNEY0MkNFODZFOTkzN0VCQ0M5QTkyQ0U1QjUyMEQxRTMzREFCNzY2QkIxRTYyREE2QzlFOUY2RjA=", + "index": true + } + ] + }, + { + "type": "message", + "attributes": [ + { + "key": "c2VuZGVy", + "value": "dGNyYzF5bDZoZGpobWtmMzc2Mzk3MzBnZmZhbnB6bmR6ZHBtaGg1OW05dg==", + "index": true + } + ] + }, + { + "type": "fungible_token_packet", + "attributes": [ + { + "key": "bW9kdWxl", + "value": "dHJhbnNmZXI=", + "index": true + }, + { + "key": "c2VuZGVy", + "value": "dGNybzFwZG4ybnNuOXdlc3o2cHgzbGNqc2dtcDhwZWZlZG56cDNnbXAzcQ==", + "index": true + }, + { + "key": "cmVjZWl2ZXI=", + "value": "dGNyYzFkc3V6ZWx6OGp2azZnbmNtaHRqN3A0eHMzM2twdDVmcXloZjNxaw==", + "index": true + }, + { + "key": "ZGVub20=", + "value": "dHJhbnNmZXIvY2hhbm5lbC0yL1RFU1Q=", + "index": true + }, + { + "key": "YW1vdW50", + "value": "OTgz", + "index": true + }, + { + "key": "c3VjY2Vzcw==", + "value": "dHJ1ZQ==", + "index": true + } + ] + }, + { + "type": "write_acknowledgement", + "attributes": [ + { + "key": "cGFja2V0X2RhdGE=", + "value": "eyJhbW91bnQiOiI5ODMiLCJkZW5vbSI6InRyYW5zZmVyL2NoYW5uZWwtMi9URVNUIiwicmVjZWl2ZXIiOiJ0Y3JjMWRzdXplbHo4anZrNmduY21odGo3cDR4czMza3B0NWZxeWhmM3FrIiwic2VuZGVyIjoidGNybzFwZG4ybnNuOXdlc3o2cHgzbGNqc2dtcDhwZWZlZG56cDNnbXAzcSJ9", + "index": true + }, + { + "key": "cGFja2V0X2RhdGFfaGV4", + "value": "N2IyMjYxNmQ2Zjc1NmU3NDIyM2EyMjM5MzgzMzIyMmMyMjY0NjU2ZTZmNmQyMjNhMjI3NDcyNjE2ZTczNjY2NTcyMmY2MzY4NjE2ZTZlNjU2YzJkMzIyZjU0NDU1MzU0MjIyYzIyNzI2NTYzNjU2OTc2NjU3MjIyM2EyMjc0NjM3MjYzMzE2NDczNzU3YTY1NmM3YTM4NmE3NjZiMzY2NzZlNjM2ZDY4NzQ2YTM3NzAzNDc4NzMzMzMzNmI3MDc0MzU2NjcxNzk2ODY2MzM3MTZiMjIyYzIyNzM2NTZlNjQ2NTcyMjIzYTIyNzQ2MzcyNmYzMTcwNjQ2ZTMyNmU3MzZlMzk3NzY1NzM3YTM2NzA3ODMzNmM2MzZhNzM2NzZkNzAzODcwNjU2NjY1NjQ2ZTdhNzAzMzY3NmQ3MDMzNzEyMjdk", + "index": true + }, + { + "key": "cGFja2V0X3RpbWVvdXRfaGVpZ2h0", + "value": "My01MTY5MjQ5", + "index": true + }, + { + "key": "cGFja2V0X3RpbWVvdXRfdGltZXN0YW1w", + "value": "MTY2MzI5ODM1OTI2ODE1MjI4MA==", + "index": true + }, + { + "key": "cGFja2V0X3NlcXVlbmNl", + "value": "MTQ1OA==", + "index": true + }, + { + "key": "cGFja2V0X3NyY19wb3J0", + "value": "dHJhbnNmZXI=", + "index": true + }, + { + "key": "cGFja2V0X3NyY19jaGFubmVs", + "value": "Y2hhbm5lbC0xMzE=", + "index": true + }, + { + "key": "cGFja2V0X2RzdF9wb3J0", + "value": "dHJhbnNmZXI=", + "index": true + }, + { + "key": "cGFja2V0X2RzdF9jaGFubmVs", + "value": "Y2hhbm5lbC0w", + "index": true + }, + { + "key": "cGFja2V0X2Fjaw==", + "value": "eyJyZXN1bHQiOiJBUT09In0=", + "index": true + }, + { + "key": "cGFja2V0X2Fja19oZXg=", + "value": "N2IyMjcyNjU3Mzc1NmM3NDIyM2EyMjQxNTEzZDNkMjI3ZA==", + "index": true + }, + { + "key": "cGFja2V0X2Nvbm5lY3Rpb24=", + "value": "Y29ubmVjdGlvbi0w", + "index": true + } + ] + }, + { + "type": "message", + "attributes": [ + { + "key": "bW9kdWxl", + "value": "aWJjX2NoYW5uZWw=", + "index": true + } + ] + } + ], + "codespace": "" + } + ], + "begin_block_events": [ + { + "type": "coin_spent", + "attributes": [ + { + "key": "c3BlbmRlcg==", + "value": "dGNyYzFtM2gzMHdsdnNmOGxscnV4dHB1a2R2c3kwa20ya3VtODM2NTI0MA==", + "index": true + }, + { + "key": "YW1vdW50", + "value": null, + "index": true + } + ] + }, + { + "type": "coin_received", + "attributes": [ + { + "key": "cmVjZWl2ZXI=", + "value": "dGNyYzE3eHBmdmFrbTJhbWc5NjJ5bHM2Zjg0ejNrZWxsOGM1bGZqc2plag==", + "index": true + }, + { + "key": "YW1vdW50", + "value": null, + "index": true + } + ] + }, + { + "type": "transfer", + "attributes": [ + { + "key": "cmVjaXBpZW50", + "value": "dGNyYzE3eHBmdmFrbTJhbWc5NjJ5bHM2Zjg0ejNrZWxsOGM1bGZqc2plag==", + "index": true + }, + { + "key": "c2VuZGVy", + "value": "dGNyYzFtM2gzMHdsdnNmOGxscnV4dHB1a2R2c3kwa20ya3VtODM2NTI0MA==", + "index": true + }, + { + "key": "YW1vdW50", + "value": null, + "index": true + } + ] + }, + { + "type": "message", + "attributes": [ + { + "key": "c2VuZGVy", + "value": "dGNyYzFtM2gzMHdsdnNmOGxscnV4dHB1a2R2c3kwa20ya3VtODM2NTI0MA==", + "index": true + } + ] + }, + { + "type": "mint", + "attributes": [ + { + "key": "Ym9uZGVkX3JhdGlv", + "value": "MC4wMDAwMDAwMDAwMTE4NTQ5OTk=", + "index": true + }, + { + "key": "aW5mbGF0aW9u", + "value": "MC4wMDAwMDAwMDAwMDAwMDAwMDA=", + "index": true + }, + { + "key": "YW5udWFsX3Byb3Zpc2lvbnM=", + "value": "MC4wMDAwMDAwMDAwMDAwMDAwMDA=", + "index": true + }, + { + "key": "YW1vdW50", + "value": "MA==", + "index": true + } + ] + }, + { + "type": "coin_spent", + "attributes": [ + { + "key": "c3BlbmRlcg==", + "value": "dGNyYzE3eHBmdmFrbTJhbWc5NjJ5bHM2Zjg0ejNrZWxsOGM1bGZqc2plag==", + "index": true + }, + { + "key": "YW1vdW50", + "value": null, + "index": true + } + ] + }, + { + "type": "coin_received", + "attributes": [ + { + "key": "cmVjZWl2ZXI=", + "value": "dGNyYzFqdjY1czNncnFmNnY2amwzZHA0dDZjOXQ5cms5OWNkODc1aHdtcw==", + "index": true + }, + { + "key": "YW1vdW50", + "value": null, + "index": true + } + ] + }, + { + "type": "transfer", + "attributes": [ + { + "key": "cmVjaXBpZW50", + "value": "dGNyYzFqdjY1czNncnFmNnY2amwzZHA0dDZjOXQ5cms5OWNkODc1aHdtcw==", + "index": true + }, + { + "key": "c2VuZGVy", + "value": "dGNyYzE3eHBmdmFrbTJhbWc5NjJ5bHM2Zjg0ejNrZWxsOGM1bGZqc2plag==", + "index": true + }, + { + "key": "YW1vdW50", + "value": null, + "index": true + } + ] + }, + { + "type": "message", + "attributes": [ + { + "key": "c2VuZGVy", + "value": "dGNyYzE3eHBmdmFrbTJhbWc5NjJ5bHM2Zjg0ejNrZWxsOGM1bGZqc2plag==", + "index": true + } + ] + }, + { + "type": "proposer_reward", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxaDBqY2cwM3hqZnE0bjl3NmwybHh1dHA4bDU1bm1jejl3enkwMHY=", + "index": true + } + ] + }, + { + "type": "commission", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxaDBqY2cwM3hqZnE0bjl3NmwybHh1dHA4bDU1bm1jejl3enkwMHY=", + "index": true + } + ] + }, + { + "type": "rewards", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxaDBqY2cwM3hqZnE0bjl3NmwybHh1dHA4bDU1bm1jejl3enkwMHY=", + "index": true + } + ] + }, + { + "type": "commission", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxdjc2cjd1NHV5cjNld2RrczhjcW11dzdjYTRsZWp2Yzh1bmFnMm0=", + "index": true + } + ] + }, + { + "type": "rewards", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxdjc2cjd1NHV5cjNld2RrczhjcW11dzdjYTRsZWp2Yzh1bmFnMm0=", + "index": true + } + ] + }, + { + "type": "commission", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxczllM2Y1eTR0dDRma3ozanlqODY1cWF1ZDJjcWhzNjZ5bm1qNGY=", + "index": true + } + ] + }, + { + "type": "rewards", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxczllM2Y1eTR0dDRma3ozanlqODY1cWF1ZDJjcWhzNjZ5bm1qNGY=", + "index": true + } + ] + }, + { + "type": "commission", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxNXE4Zmx2bTVxZnp0dDV6dHY5bXkyaHQyeGwyeGFra3g5c2F4eDc=", + "index": true + } + ] + }, + { + "type": "rewards", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxNXE4Zmx2bTVxZnp0dDV6dHY5bXkyaHQyeGwyeGFra3g5c2F4eDc=", + "index": true + } + ] + }, + { + "type": "commission", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxcTBnY3EwMjVqeHM4ZnJzNnZhZGc4cnphNjUwNzI0MzU2eWFzYXU=", + "index": true + } + ] + }, + { + "type": "rewards", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxcTBnY3EwMjVqeHM4ZnJzNnZhZGc4cnphNjUwNzI0MzU2eWFzYXU=", + "index": true + } + ] + }, + { + "type": "commission", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxa2Q3bGRoZHh6cjM4ZWt5bnFranJwM3A5bHhwZGN6eHhzeWFqYXE=", + "index": true + } + ] + }, + { + "type": "rewards", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxa2Q3bGRoZHh6cjM4ZWt5bnFranJwM3A5bHhwZGN6eHhzeWFqYXE=", + "index": true + } + ] + }, + { + "type": "commission", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxaDBqY2cwM3hqZnE0bjl3NmwybHh1dHA4bDU1bm1jejl3enkwMHY=", + "index": true + } + ] + }, + { + "type": "rewards", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxaDBqY2cwM3hqZnE0bjl3NmwybHh1dHA4bDU1bm1jejl3enkwMHY=", + "index": true + } + ] + }, + { + "type": "commission", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxMjc3dGpmMnB3MmtkNmsyNXgzc3loZms3NXltdmV1NWgzcHJtd3M=", + "index": true + } + ] + }, + { + "type": "rewards", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxMjc3dGpmMnB3MmtkNmsyNXgzc3loZms3NXltdmV1NWgzcHJtd3M=", + "index": true + } + ] + }, + { + "type": "commission", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxOWE2cjc0ZHZmeGp5dmp6ZjNwZzl5M3k1cmhrNnJkczJwaDM5OHk=", + "index": true + } + ] + }, + { + "type": "rewards", + "attributes": [ + { + "key": "YW1vdW50", + "value": null, + "index": true + }, + { + "key": "dmFsaWRhdG9y", + "value": "dGNyY3ZhbG9wZXIxOWE2cjc0ZHZmeGp5dmp6ZjNwZzl5M3k1cmhrNnJkczJwaDM5OHk=", + "index": true + } + ] + }, + { + "type": "fee_market", + "attributes": [ + { + "key": "YmFzZV9mZWU=", + "value": "MTk1NTM0ODEwMDA4MQ==", + "index": true + } + ] + } + ], + "end_block_events": [ + { + "type": "block_bloom", + "attributes": [ + { + "key": "Ymxvb20=", + "value": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "index": true + } + ] + }, + { + "type": "block_gas", + "attributes": [ + { + "key": "aGVpZ2h0", + "value": "NTE2ODI3Nw==", + "index": true + }, + { + "key": "YW1vdW50", + "value": "Mjk2Nzgz", + "index": true + } + ] + } + ], + "validator_updates": null, + "consensus_param_updates": { + "block": { + "max_bytes": "1048576", + "max_gas": "40000000" + }, + "evidence": { + "max_age_num_blocks": "403200", + "max_age_duration": "2419200000000000", + "max_bytes": "150000" + }, + "validator": { + "pub_key_types": [ + "ed25519" + ] + } + } + } +} +` From 3bba2ff644aeabd54038061ef417e6d563c96633 Mon Sep 17 00:00:00 2001 From: vincentysc Date: Fri, 16 Sep 2022 16:45:57 +0800 Subject: [PATCH 02/15] update ethermint dynamic fee model --- usecase/model/msg_ethereum_tx.go | 26 + usecase/parser/msg.go | 59 +- usecase/parser/msg_ethereum_tx_test.go | 1 - ...sg_extension_option_dynamic_fee_tx_test.go | 36 +- usecase/parser/register.go | 2 +- .../tx_msg_extension_option_dynamic_fee_tx.go | 891 +++++++++++------- 6 files changed, 633 insertions(+), 382 deletions(-) diff --git a/usecase/model/msg_ethereum_tx.go b/usecase/model/msg_ethereum_tx.go index cc91210ae..e722f7897 100644 --- a/usecase/model/msg_ethereum_tx.go +++ b/usecase/model/msg_ethereum_tx.go @@ -31,3 +31,29 @@ type LegacyTx struct { R string `mapstructure:"r" json:"r"` S string `mapstructure:"s" json:"s"` } + +type DynamicFeeTxParams struct { + RawDynamicFeeTx +} +type RawDynamicFeeTx struct { + Type string `mapstructure:"@type" json:"@type"` + Size int `mapstructure:"size" json:"size"` + // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 + Data DynamicFeeTx `mapstructure:"data" json:"data"` + From string `mapstructure:"from" json:"from"` + Hash string `mapstructure:"hash" json:"hash"` +} +type DynamicFeeTx struct { + Type string `mapstructure:"@type" json:"@type"` + ChainId string `mapstructure:"chain_id" json:"chainId"` + Nonce string `mapstructure:"nonce" json:"nonce"` + GasTipCap string `mapstructure:"gas_tip_cap" json:"gasTipCap"` + GasFeeCap string `mapstructure:"Gas_fee_cap" json:"gasFeeCap"` + Gas string `mapstructure:"gas" json:"gas"` + To string `mapstructure:"to" json:"to"` + Value string `mapstructure:"value" json:"value"` + Data string `mapstructure:"data" json:"data"` + V string `mapstructure:"v" json:"v"` + R string `mapstructure:"r" json:"r"` + S string `mapstructure:"s" json:"s"` +} diff --git a/usecase/parser/msg.go b/usecase/parser/msg.go index 723bc2c2c..db594d546 100644 --- a/usecase/parser/msg.go +++ b/usecase/parser/msg.go @@ -128,7 +128,7 @@ func ParseBlockTxsMsgToCommands( // ethermint evm "/ethermint.evm.v1.MsgEthereumTx", - "/ethermint.types.v1.ExtensionOptionDynamicFeeTx": + "/ethermint.types.v1.DynamicFeeTx": parser := parserManager.GetParser(utils.CosmosParserKey(msgType.(string)), utils.ParserBlockHeight(blockHeight)) msgCommands, possibleSignerAddresses = parser(utils.CosmosParserParams{ @@ -2172,7 +2172,7 @@ func ParseMsgEthereumTx( func ParseExtensionOptionDynamicFeeTx( parserParams utils.CosmosParserParams, ) ([]command.Command, []string) { - var rawMsg model.RawMsgEthereumTx + var rawMsg model.RawDynamicFeeTx decoderConfig := &mapstructure.DecoderConfig{ WeaklyTypedInput: true, DecodeHook: mapstructure.ComposeDecodeHookFunc( @@ -2191,39 +2191,38 @@ func ParseExtensionOptionDynamicFeeTx( if err := decoder.Decode(parserParams.Msg); err != nil { panic(fmt.Errorf("error decoding RawMsgEthereumTx: %v", err)) } + fmt.Println("===> ", parserParams, rawMsg) + if !parserParams.MsgCommonParams.TxSuccess { + // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 + msgEthereumTxParams := model.DynamicFeeTxParams{ + RawDynamicFeeTx: rawMsg, + } - // if !parserParams.MsgCommonParams.TxSuccess { - // // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 - // msgEthereumTxParams := model.MsgEthereumTxParams{ - // RawMsgEthereumTx: rawMsg, - // } - - // // Getting possible signer address from Msg - // var possibleSignerAddresses []string - // // FIXME: https://github.com/crypto-com/chain-indexing/issues/729 - // // possibleSignerAddresses = append(possibleSignerAddresses, msgEthereumTxParams.From) + // Getting possible signer address from Msg + var possibleSignerAddresses []string + // FIXME: https://github.com/crypto-com/chain-indexing/issues/729 + // possibleSignerAddresses = append(possibleSignerAddresses, msgEthereumTxParams.From) - // return []command.Command{command_usecase.NewCreateMsgEthereumTx( - // parserParams.MsgCommonParams, + return []command.Command{command_usecase.NewCreateMsgEthereumTx( + parserParams.MsgCommonParams, - // msgEthereumTxParams, - // )}, possibleSignerAddresses - // } + msgEthereumTxParams, + )}, possibleSignerAddresses + } - // // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 - // msgEthereumTxParams := model.MsgEthereumTxParams{ - // RawMsgEthereumTx: rawMsg, - // } + // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 + msgEthereumTxParams := model.DynamicFeeTxParams{ + RawDynamicFeeTx: rawMsg, + } - // // Getting possible signer address from Msg - // var possibleSignerAddresses []string - // // FIXME: https://github.com/crypto-com/chain-indexing/issues/729 - // // possibleSignerAddresses = append(possibleSignerAddresses, msgEthereumTxParams.From) + // Getting possible signer address from Msg + var possibleSignerAddresses []string + // FIXME: https://github.com/crypto-com/chain-indexing/issues/729 + // possibleSignerAddresses = append(possibleSignerAddresses, msgEthereumTxParams.From) - // return []command.Command{command_usecase.NewCreateMsgEthereumTx( - // parserParams.MsgCommonParams, + return []command.Command{command_usecase.NewCreateMsgEthereumTx( + parserParams.MsgCommonParams, - // msgEthereumTxParams, - // )}, possibleSignerAddresses - return nil, nil + msgEthereumTxParams, + )}, possibleSignerAddresses } diff --git a/usecase/parser/msg_ethereum_tx_test.go b/usecase/parser/msg_ethereum_tx_test.go index 7dc8a4481..83663e99c 100644 --- a/usecase/parser/msg_ethereum_tx_test.go +++ b/usecase/parser/msg_ethereum_tx_test.go @@ -54,7 +54,6 @@ var _ = Describe("ParseMsgCommands", func() { }, model.MsgEthereumTxParams{ RawMsgEthereumTx: model.RawMsgEthereumTx{ - Type: "/ethermint.evm.v1.MsgEthereumTx", Size: 208, Data: model.LegacyTx{ diff --git a/usecase/parser/msg_extension_option_dynamic_fee_tx_test.go b/usecase/parser/msg_extension_option_dynamic_fee_tx_test.go index 5fca9a902..89eab2a47 100644 --- a/usecase/parser/msg_extension_option_dynamic_fee_tx_test.go +++ b/usecase/parser/msg_extension_option_dynamic_fee_tx_test.go @@ -6,7 +6,6 @@ import ( . "github.com/onsi/gomega" "github.com/crypto-com/chain-indexing/entity/command" - "github.com/crypto-com/chain-indexing/usecase/coin" command_usecase "github.com/crypto-com/chain-indexing/usecase/command" "github.com/crypto-com/chain-indexing/usecase/event" "github.com/crypto-com/chain-indexing/usecase/parser" @@ -21,7 +20,7 @@ var _ = Describe("ParseMsgCommands", func() { usecase_parser_test.TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP, ) - tx := mustParseTxsResp(usecase_parser_test.TX_MSG_FUND_COMMUNITY_POOL_TXS_RESP) + tx := mustParseTxsResp(usecase_parser_test.TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TXS_RESP) txs := []model.Tx{*tx} accountAddressPrefix := "tcro" @@ -39,19 +38,38 @@ var _ = Describe("ParseMsgCommands", func() { ) Expect(err).To(BeNil()) Expect(cmds).To(HaveLen(1)) - Expect(cmds).To(Equal([]command.Command{command_usecase.NewCreateMsgFundCommunityPool( + Expect(cmds).To(Equal([]command.Command{command_usecase.NewCreateMsgEthereumTx( event.MsgCommonParams{ - BlockHeight: int64(460662), - TxHash: "933052FD68B10549312F3CBA9AF4F4CC77536BE5ECD335638DD36ECCE681201E", + BlockHeight: int64(5168311), + TxHash: "3F1B98E6A43A3666699CA28DA2A0872E1478E092F7EC3FCF8A94202BB8B330D2", TxSuccess: true, MsgIndex: 0, }, - model.MsgFundCommunityPoolParams{ - Depositor: "tcro1fmprm0sjy6lz9llv7rltn0v2azzwcwzvk2lsyn", - Amount: coin.MustParseCoinsNormalized("1basetcro"), + model.DynamicFeeTxParams{ + RawDynamicFeeTx: model.RawDynamicFeeTx{ + Type: "/ethermint.evm.v1.MsgEthereumTx", + Size: 0, + Data: model.DynamicFeeTx{ + Type: "/ethermint.evm.v1.DynamicFeeTx", + ChainId: "338", + Nonce: "115", + GasTipCap: "5000000000000", + GasFeeCap: "5000000000000", + Gas: "48834", + To: "0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a", + Value: "0", + Data: "CV6nswAAAAAAAAAAAAAAAPVk7wA0u3182EQSJ14eUTZNTXc0//////////////////////////////////////////8=", + V: "", + R: "HHigR02IN48gvEM991C/MOCmbVfOw9Sj804IhtI5z2Q=", + S: "SspHmiOAoM4bQdvAig9I8PQzLv5GTzElhcROppO0WpU=", + }, + From: "", + Hash: "0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53", + }, }, )})) - Expect(possibleSignerAddresses).To(Equal([]string{"tcro1fmprm0sjy6lz9llv7rltn0v2azzwcwzvk2lsyn"})) + var emptyAddress []string + Expect(possibleSignerAddresses).To(Equal(emptyAddress)) }) }) }) diff --git a/usecase/parser/register.go b/usecase/parser/register.go index 67e8be439..038af3463 100644 --- a/usecase/parser/register.go +++ b/usecase/parser/register.go @@ -81,7 +81,7 @@ func InitParsers(manager *utils.CosmosParserManager) { // ethermint evm manager.RegisterParser("/ethermint.evm.v1.MsgEthereumTx", BEGIN_BLOCK_HEIGHT, ParseMsgEthereumTx) - manager.RegisterParser("/ethermint.types.v1.ExtensionOptionDynamicFeeTx", BEGIN_BLOCK_HEIGHT, ParseExtensionOptionDynamicFeeTx) + manager.RegisterParser("/ethermint.types.v1.DynamicFeeTx", BEGIN_BLOCK_HEIGHT, ParseExtensionOptionDynamicFeeTx) } func RegisterBreakingVersionParsers(manager *utils.CosmosParserManager) { diff --git a/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go b/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go index 8f7667df4..585c484c4 100644 --- a/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go +++ b/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go @@ -1,15 +1,14 @@ package usecase_parser_test -const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESP = ` -{ +const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESP = `{ "jsonrpc": "2.0", "id": -1, "result": { "block_id": { - "hash": "18AE8D867BA011BE28AA3972AF39BE09DB8A9B9E50B4B260B316A701B460EEF0", + "hash": "BAE99CBA6E908A6AA2FFF5EF9F826AC81A30DDF9717C4966A1C0E9C612B84814", "parts": { "total": 1, - "hash": "4BB6C29EB6A40435312DB1D0950733399EDA6B92045B715276FD48D00209BD05" + "hash": "4B23C9376865D93750C8D99B76626355B7B0A254B4F161DE5F913A374DF3643A" } }, "block": { @@ -18,91 +17,91 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESP = ` "block": "11" }, "chain_id": "cronostestnet_338-3", - "height": "5168277", - "time": "2022-09-16T03:11:51.138098162Z", + "height": "5168311", + "time": "2022-09-16T03:14:55.502206912Z", "last_block_id": { - "hash": "5CAF9746C8E5EB070A91FA0D96F78800F93AB84C5E9A18C38A49AE12928877DC", + "hash": "1BAB2F586A90A244BC2ABDE749C5DA15010451F8EE08969354E9FD7FF114B09E", "parts": { "total": 1, - "hash": "090F905B91A0D364418D137D5A911F022143CE54F91B005E8CBAC6074D10ABBF" + "hash": "1BB8EAE9BE456DE2C3F3F057F5890ED3D009EB5D35AD0D08FCA52DCB0A5568E8" } }, - "last_commit_hash": "E1B7475DF8F17F8F4C0E26DA9E2555E352F008B96083E70F730DA825BCF5DE92", - "data_hash": "D88C1DCD4A2244BF6F183B2CC748FC819C79EDE3685D9705B7A23803FEC9FB0F", + "last_commit_hash": "99238AFBBE27F4044D88333C80F10D3B64E17F06ED99A37DF2BA56AF53B4D79F", + "data_hash": "6250BA220F846B3CC45103440CB771D26C0485116629EC25ADB28A76ECB91317", "validators_hash": "133A3E0C61E2C3F64BB5A8541A03359C99F7CD9567521922ED9DD03E428940E4", "next_validators_hash": "133A3E0C61E2C3F64BB5A8541A03359C99F7CD9567521922ED9DD03E428940E4", "consensus_hash": "5B1778CC6A8A0D4443986BB557A8AB5231AA1DE78E4748B9731C8647D5616985", - "app_hash": "5C9F993A3FAB180EEEB8BBB497D7CE7E1E312A2C24119F5C84CB03E2F125CAEB", + "app_hash": "9FADC232331354963F288185BC5CCF43372C5A535EF696F9B5769190B27334BD", "last_results_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855", "evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855", - "proposer_address": "A3F7397F81D4CC82D566633F9728DFB50A35D965" + "proposer_address": "0421821D46C46F86F1EAD79EEB31CFA88A5578CB" }, "data": { "txs": [ - "Co0eCpcSCiMvaWJjLmNvcmUuY2xpZW50LnYxLk1zZ1VwZGF0ZUNsaWVudBLvEQoPMDctdGVuZGVybWludC0wEq4RCiYvaWJjLmxpZ2h0Y2xpZW50cy50ZW5kZXJtaW50LnYxLkhlYWRlchKDEQrDBgqbAwoCCAsSEnRlc3RuZXQtY3JvZXNlaWQtNBjw2/ECIgwI89KPmQYQ+sKdsQIqSAogArpLz6kXoV/Yuyr+co4SasuuQITggIx+GUqdTYfXDrUSJAgBEiAqW22SR8CbBBC5VWpGfwDlH3sOkmgsNzLF+bVwQVIWiDIgUtHcAB/CZETMw6cfWYXCiSPc6ulNV27bGfZ/TJEsdcs6IOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVQiAiFwjoC+1aiMo2eWd65jKf84ZELV0Bo+ZUQ9pbSd97iEogIhcI6AvtWojKNnlneuYyn/OGRC1dAaPmVEPaW0nfe4hSIDcrSuhFCGyDfv73mhibCFsf1mEMU/O+sX7g4ns0fAbeWiAab4/bzBhQlQ+LftMEP0lokMZnrW3gm1PQ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bk9wdGlvbnNFdGhlcmV1bVR4EiYSJAoeCghiYXNldGNybxISMjQ0MTcwMDAwMDAwMDAwMDAwEML9Ag==" ] }, "evidence": { "evidence": [] }, "last_commit": { - "height": "5168276", + "height": "5168310", "round": 0, "block_id": { - "hash": "5CAF9746C8E5EB070A91FA0D96F78800F93AB84C5E9A18C38A49AE12928877DC", + "hash": "1BAB2F586A90A244BC2ABDE749C5DA15010451F8EE08969354E9FD7FF114B09E", "parts": { "total": 1, - "hash": "090F905B91A0D364418D137D5A911F022143CE54F91B005E8CBAC6074D10ABBF" + "hash": "1BB8EAE9BE456DE2C3F3F057F5890ED3D009EB5D35AD0D08FCA52DCB0A5568E8" } }, "signatures": [ { "block_id_flag": 2, "validator_address": "0421821D46C46F86F1EAD79EEB31CFA88A5578CB", - "timestamp": "2022-09-16T03:11:51.138098162Z", - "signature": "3cY3A+m3NP39QKR5yhOUndHtlOe/6WuDA2ZAvWow2sRfVuW6h+orzIXidk2BoZ/2DY9nBsxVbZdp+6Ii1LasBQ==" + "timestamp": "2022-09-16T03:14:55.412522098Z", + "signature": "T9VpDeEJVBQGyDZOlnhP8Rij8FNlOvnCEcpeWLUEZzrIXKGYeMfd3OhJHrdqYvbPBAx8dZOwRwuImCC+OC+cCw==" }, { "block_id_flag": 2, "validator_address": "A3F7397F81D4CC82D566633F9728DFB50A35D965", - "timestamp": "2022-09-16T03:11:51.125576597Z", - "signature": "4fUTqq7dZsdyZT8VySXLETWstipeDwmbj2jum/BQ57At+MTcGWIWyoSLuY/Qo8f0er4pw9fdXeH6kMyGJmgKAg==" + "timestamp": "2022-09-16T03:14:55.502206912Z", + "signature": "c6wzGeXjsmITKQvXZT97atZj3n4tQHwZY3x47/3V3VONWUkLNA47CFVfZbJcVC9Cd7CPewTeg0nrwHLaDdCzAQ==" }, { "block_id_flag": 2, "validator_address": "739109BF2993601BEF624283C9A572DF3175CBA8", - "timestamp": "2022-09-16T03:11:51.43064565Z", - "signature": "uZbUzxBIA5dKAqLe9os+WoUjz1JZDAaUkcxKIx0rxMu9GglLxqf8DzR60/a67bexgezwVYT/iRXS8HMpm2YYCg==" + "timestamp": "2022-09-16T03:14:55.904650283Z", + "signature": "w5hHQg0iURWtrUV/zoyRvWId6Cs7cmzOZxP6oVGXYbNDNiQ/ky6kdOlQUmttGihtptOTw7H5iFJgz62ZFNMtAg==" }, { - "block_id_flag": 3, + "block_id_flag": 2, "validator_address": "A7E012CB6FFABA17C6C98600F3F7402DC1A06C8C", - "timestamp": "2022-09-16T03:11:51.586743853Z", - "signature": "8oUW/BJUsRuum84BPXaRjD5aeEULgBKd95xDOaPfhz9RlNrEluR23IC4J7g0B097ZYDSBlOa68dgtLl/UgljBQ==" + "timestamp": "2022-09-16T03:14:56.133612785Z", + "signature": "1N9rYVPlbnzcqk9PA18AKRByaF8D1Uw9UenkDE9w3Kb5WJ4Mvw4H/jjuVQnsErtFi0UogjEPyfSFfslT03m2Aw==" }, { "block_id_flag": 2, "validator_address": "B8735B4BBA3AD413B7DBB3A74ABC75A5907BE7A5", - "timestamp": "2022-09-16T03:11:51.381065082Z", - "signature": "R7vL//SDw5vXD1nGqX0h3tUzDM36Z/lbIiFu2wxH0Rfp1A8flyVb3oKZRqp2V9oyoDXx+lI/FOFpnETvgYHNDA==" + "timestamp": "2022-09-16T03:14:55.922103446Z", + "signature": "tv/YzR+ifULm4wH2LuolJeocN4a0rV0mOJpT2siQb3Yh1HHDHySyowzzUbQ+K66tz7EPzn2StD+CuCwLjtPIBQ==" }, { "block_id_flag": 2, "validator_address": "09D283BB0AC4B6A8BA05F6600E018E1D4DD25C12", - "timestamp": "2022-09-16T03:11:51.3426131Z", - "signature": "9uTQwAStZeKdZDR5RXYpoF95XxGPt7MocsfUA8kmtK24QU7cTjidKZ/gO3TyVgabhdT741bZhs2G/tLIqt1KBA==" + "timestamp": "2022-09-16T03:14:55.9156978Z", + "signature": "ovtvbZBC+LxFzFDHF/rE06GQ5YHuceGK5JPk3uJqZgn7GLa6j5NibOxVcy+3Fvr6WJUgdDjcJZt2jQMKhoe2BA==" }, { "block_id_flag": 2, "validator_address": "3ECB552B1E6651DD70CE27923099F96408A7703D", - "timestamp": "2022-09-16T03:11:51.398239188Z", - "signature": "L25yH/2U0+E2jCbvhIpCJ43JQjWhi81xBaIxH/hTqNiZkpxwLDkFNwzl+2fjCQ+KBjtlk9DnlO5CU+oSwy4LDw==" + "timestamp": "2022-09-16T03:14:55.926903388Z", + "signature": "JoItuXg74Cp3aLlmofHVkcqe3+45OhH1ryXjSB8ns+ccqxjE9aqxRS+AMvfMxWgc3miZNPCDhb8DqWeI6qwDCw==" }, { - "block_id_flag": 2, + "block_id_flag": 3, "validator_address": "B359B56836AF6117E780045985D45F988065B746", - "timestamp": "2022-09-16T03:11:51.4162306Z", - "signature": "1+75553/pvXNxab0GhZgjA37ahT9ub5hERD3v83GllEi+bkjNv0frPpgBTbqkOFQmsvtoMqBW2uCmPzQq3WDDQ==" + "timestamp": "2022-09-16T03:14:55.9657163Z", + "signature": "BhDo8ceW2/AFaxeBqDmt3lUNoTZaWVikOSYpmYPeTEN2deHaqZNHM+bFhseN/vfIzCB51VhUjLGXQ7LWQ+gbBw==" } ] } @@ -110,62 +109,31 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESP = ` } }` -const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` -{ +const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = `{ "jsonrpc": "2.0", "id": -1, "result": { - "height": "5168277", + "height": "5168311", "txs_results": [ { "code": 0, - "data": "Ei0KKy9pYmMuY29yZS5jbGllbnQudjEuTXNnVXBkYXRlQ2xpZW50UmVzcG9uc2USMAoqL2liYy5jb3JlLmNoYW5uZWwudjEuTXNnUmVjdlBhY2tldFJlc3BvbnNlEgIIAg==", - "log": "[{\"msg_index\":0,\"events\":[{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/ibc.core.client.v1.MsgUpdateClient\"},{\"key\":\"module\",\"value\":\"ibc_client\"}]},{\"type\":\"update_client\",\"attributes\":[{\"key\":\"client_id\",\"value\":\"07-tendermint-0\"},{\"key\":\"client_type\",\"value\":\"07-tendermint\"},{\"key\":\"consensus_height\",\"value\":\"4-6057456\"},{\"key\":\"header\",\"value\":\"0a262f6962632e6c69676874636c69656e74732e74656e6465726d696e742e76312e48656164657212d1110a91070a9b030a02080b1212746573746e65742d63726f65736569642d3418f0dbf102220c08f3d28f990610fac29db1022a480a2002ba4bcfa917a15fd8bb2afe728e126acbae4084e0808c7e194a9d4d87d70eb51224080112202a5b6d9247c09b0410b9556a467f00e51f7b0e92682c3732c5f9b57041521688322052d1dc001fc26444ccc3a71f5985c28923dceae94d576edb19f67f4c912c75cb3a20e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b8554220221708e80bed5a88ca3679677ae6329ff386442d5d01a3e65443da5b49df7b884a20221708e80bed5a88ca3679677ae6329ff386442d5d01a3e65443da5b49df7b885220372b4ae845086c837efef79a189b085b1fd6610c53f3beb17ee0e27b347c06de5a201a6f8fdbcc1850950f8b7ed3043f496890c667ad6de09b53d0e9d61cf5aadd36622014e1eac42537d613e3aac9be46f3d3656be9e0df78d497192efb3c1af3a974566a20e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b85572147e2b455523a35ae8f4064c00af01515fef67307912f00308f0dbf1021a480a20bcd3089d06e1ff67dc331a26f199b8e671e0cdb4eac8569fd2bdf9b8e1eefc3d122408011220f3b8254faa3e8d9b6d69a75a7c7a944eec3462d6a36804678033cf0378768607226708021214f9a4582896e5f2692beddd7c251755e33d2de0131a0b08f9d28f990610d29ec4292240bc28c6b0ef2d31c6bcfd98dde2b67e2e1d7be0624358736bfc1b323093c0d1c721bf20b29b9f2a550c1595c76e88a4a363d2b61e1ac0f0444292f33c0fc89e0d22670802121471da178ae52b2d0654102a86166ce91ac5121cb21a0b08f9d28f990610cbf1a1592240241258bb9087f0b8e5e71143d6a495dd1ad43965d6871b928e7d0c91cf4eaa82205b9137e54b3d24634f462be24b11a355b7eb4c98c828b0a94192a4d380e7062267080212147e2b455523a35ae8f4064c00af01515fef6730791a0b08f9d28f990610a5ebbc6522402dc21b41175619dd8e624fb0bd7731f2bc3f01ddcee40e3ecd73d2b1720103832c67e11e0b4fef3e93768c9b95f2796235e0e0f24d7ba652a9177a5db0697f0b220f08011a0b088092b8c398feffffff01220f08011a0b088092b8c398feffffff01220f08011a0b088092b8c398feffffff01220f08011a0b088092b8c398feffffff01220f08011a0b088092b8c398feffffff01220f08011a0b088092b8c398feffffff011297050a400a14f9a4582896e5f2692beddd7c251755e33d2de01312220a20a6ac24f74f9e57dc91a5f9943987c705f734cf5ee02392c729aa92341b8dbe2e18f487f3ee2c0a400a1471da178ae52b2d0654102a86166ce91ac5121cb212220a20df5b36442416b1c22d50fb4f1f4b60182e2449a66f08a1b630a73241d90b8eff18ddb29dee2c0a400a147e2b455523a35ae8f4064c00af01515fef67307912220a2062d5030d9a1bb3750c97c772ce4f88531c7e9e01216332dad48ae41b0fb61c8318c7e598ed2c0a400a14de0339827b43593f50097d63f7ea6d6f53d8a5fd12220a20cf000f2dfff1deb21b605910d9cbb48eb91eba47797c1931b4838ae8028d7d3618ece3c2960b0a400a14cf237edc88cbff3fe95b8077fdf1f1e6cba5bb1b12220a20bb736fd8b4c4720fec9818ed4f5d6b4810fb23e0dd85ff002488c4310524979a18dce694b2060a400a14cf43715fb7706185e1656766684e4a0f87bb156212220a205cd5ca6e6371250601156a65708d7c49799ff007dde639295e616b8c9d7a908418e6d48fa7040a3f0a142b1f2eb1bab6a7eaf7b05cdafa31827528b570ea12220a2076f94108639c8064b073036619870672db0dd37bea8c2ed023ead9e643fc7a4718cedfa9330a3f0a14131e5631082b355b3230fe51dc3f6305fc03728d12220a2056f2155f8da634bda0880ee376422b9689d96d07ffc8a2086ec4f7706516dfab188f8eae010a3e0a14f04886fac41dfaabec6a4bac6b483f743c42147812220a202fa3197455a6de637cc2721f69d398f15b95e116ad5f2ce0fc5200b108d15b2618c4db0112400a147e2b455523a35ae8f4064c00af01515fef67307912220a2062d5030d9a1bb3750c97c772ce4f88531c7e9e01216332dad48ae41b0fb61c8318c7e598ed2c18e788eaee9c011a07080410ffefeb022297050a400a14f9a4582896e5f2692beddd7c251755e33d2de01312220a20a6ac24f74f9e57dc91a5f9943987c705f734cf5ee02392c729aa92341b8dbe2e18f487f3ee2c0a400a1471da178ae52b2d0654102a86166ce91ac5121cb212220a20df5b36442416b1c22d50fb4f1f4b60182e2449a66f08a1b630a73241d90b8eff18ddb29dee2c0a400a147e2b455523a35ae8f4064c00af01515fef67307912220a2062d5030d9a1bb3750c97c772ce4f88531c7e9e01216332dad48ae41b0fb61c8318a48a91ed2c0a400a14de0339827b43593f50097d63f7ea6d6f53d8a5fd12220a20cf000f2dfff1deb21b605910d9cbb48eb91eba47797c1931b4838ae8028d7d3618ece3c2960b0a400a14cf237edc88cbff3fe95b8077fdf1f1e6cba5bb1b12220a20bb736fd8b4c4720fec9818ed4f5d6b4810fb23e0dd85ff002488c4310524979a18e78ae7a5060a400a14cf43715fb7706185e1656766684e4a0f87bb156212220a205cd5ca6e6371250601156a65708d7c49799ff007dde639295e616b8c9d7a908418c4cba0a0040a3f0a142b1f2eb1bab6a7eaf7b05cdafa31827528b570ea12220a2076f94108639c8064b073036619870672db0dd37bea8c2ed023ead9e643fc7a4718cedfa9330a3f0a14131e5631082b355b3230fe51dc3f6305fc03728d12220a2056f2155f8da634bda0880ee376422b9689d96d07ffc8a2086ec4f7706516dfab188f8eae010a3e0a14f04886fac41dfaabec6a4bac6b483f743c42147812220a202fa3197455a6de637cc2721f69d398f15b95e116ad5f2ce0fc5200b108d15b2618c4db0112400a14de0339827b43593f50097d63f7ea6d6f53d8a5fd12220a20cf000f2dfff1deb21b605910d9cbb48eb91eba47797c1931b4838ae8028d7d3618ece3c2960b18adc8c5db9c01\"}]}]},{\"msg_index\":1,\"events\":[{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"tcrc1yl6hdjhmkf37639730gffanpzndzdpmhh59m9v\"},{\"key\":\"amount\",\"value\":\"983ibc/DC0415924F42CE86E9937EBCC9A92CE5B520D1E33DAB766BB1E62DA6C9E9F6F0\"},{\"key\":\"receiver\",\"value\":\"tcrc1dsuzelz8jvk6gncmhtj7p4xs33kpt5fqyhf3qk\"},{\"key\":\"amount\",\"value\":\"983ibc/DC0415924F42CE86E9937EBCC9A92CE5B520D1E33DAB766BB1E62DA6C9E9F6F0\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"tcrc1yl6hdjhmkf37639730gffanpzndzdpmhh59m9v\"},{\"key\":\"amount\",\"value\":\"983ibc/DC0415924F42CE86E9937EBCC9A92CE5B520D1E33DAB766BB1E62DA6C9E9F6F0\"}]},{\"type\":\"coinbase\",\"attributes\":[{\"key\":\"minter\",\"value\":\"tcrc1yl6hdjhmkf37639730gffanpzndzdpmhh59m9v\"},{\"key\":\"amount\",\"value\":\"983ibc/DC0415924F42CE86E9937EBCC9A92CE5B520D1E33DAB766BB1E62DA6C9E9F6F0\"}]},{\"type\":\"denomination_trace\",\"attributes\":[{\"key\":\"trace_hash\",\"value\":\"DC0415924F42CE86E9937EBCC9A92CE5B520D1E33DAB766BB1E62DA6C9E9F6F0\"},{\"key\":\"denom\",\"value\":\"ibc/DC0415924F42CE86E9937EBCC9A92CE5B520D1E33DAB766BB1E62DA6C9E9F6F0\"}]},{\"type\":\"fungible_token_packet\",\"attributes\":[{\"key\":\"module\",\"value\":\"transfer\"},{\"key\":\"sender\",\"value\":\"tcro1pdn2nsn9wesz6px3lcjsgmp8pefednzp3gmp3q\"},{\"key\":\"receiver\",\"value\":\"tcrc1dsuzelz8jvk6gncmhtj7p4xs33kpt5fqyhf3qk\"},{\"key\":\"denom\",\"value\":\"transfer/channel-2/TEST\"},{\"key\":\"amount\",\"value\":\"983\"},{\"key\":\"success\",\"value\":\"true\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/ibc.core.channel.v1.MsgRecvPacket\"},{\"key\":\"module\",\"value\":\"ibc_channel\"},{\"key\":\"sender\",\"value\":\"tcrc1yl6hdjhmkf37639730gffanpzndzdpmhh59m9v\"},{\"key\":\"module\",\"value\":\"ibc_channel\"}]},{\"type\":\"recv_packet\",\"attributes\":[{\"key\":\"packet_data\",\"value\":\"{\\\"amount\\\":\\\"983\\\",\\\"denom\\\":\\\"transfer/channel-2/TEST\\\",\\\"receiver\\\":\\\"tcrc1dsuzelz8jvk6gncmhtj7p4xs33kpt5fqyhf3qk\\\",\\\"sender\\\":\\\"tcro1pdn2nsn9wesz6px3lcjsgmp8pefednzp3gmp3q\\\"}\"},{\"key\":\"packet_data_hex\",\"value\":\"7b22616d6f756e74223a22393833222c2264656e6f6d223a227472616e736665722f6368616e6e656c2d322f54455354222c227265636569766572223a2274637263316473757a656c7a386a766b36676e636d68746a377034787333336b707435667179686633716b222c2273656e646572223a227463726f3170646e326e736e397765737a367078336c636a73676d703870656665646e7a7033676d703371227d\"},{\"key\":\"packet_timeout_height\",\"value\":\"3-5169249\"},{\"key\":\"packet_timeout_timestamp\",\"value\":\"1663298359268152280\"},{\"key\":\"packet_sequence\",\"value\":\"1458\"},{\"key\":\"packet_src_port\",\"value\":\"transfer\"},{\"key\":\"packet_src_channel\",\"value\":\"channel-131\"},{\"key\":\"packet_dst_port\",\"value\":\"transfer\"},{\"key\":\"packet_dst_channel\",\"value\":\"channel-0\"},{\"key\":\"packet_channel_ordering\",\"value\":\"ORDER_UNORDERED\"},{\"key\":\"packet_connection\",\"value\":\"connection-0\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcrc1dsuzelz8jvk6gncmhtj7p4xs33kpt5fqyhf3qk\"},{\"key\":\"sender\",\"value\":\"tcrc1yl6hdjhmkf37639730gffanpzndzdpmhh59m9v\"},{\"key\":\"amount\",\"value\":\"983ibc/DC0415924F42CE86E9937EBCC9A92CE5B520D1E33DAB766BB1E62DA6C9E9F6F0\"}]},{\"type\":\"write_acknowledgement\",\"attributes\":[{\"key\":\"packet_data\",\"value\":\"{\\\"amount\\\":\\\"983\\\",\\\"denom\\\":\\\"transfer/channel-2/TEST\\\",\\\"receiver\\\":\\\"tcrc1dsuzelz8jvk6gncmhtj7p4xs33kpt5fqyhf3qk\\\",\\\"sender\\\":\\\"tcro1pdn2nsn9wesz6px3lcjsgmp8pefednzp3gmp3q\\\"}\"},{\"key\":\"packet_data_hex\",\"value\":\"7b22616d6f756e74223a22393833222c2264656e6f6d223a227472616e736665722f6368616e6e656c2d322f54455354222c227265636569766572223a2274637263316473757a656c7a386a766b36676e636d68746a377034787333336b707435667179686633716b222c2273656e646572223a227463726f3170646e326e736e397765737a367078336c636a73676d703870656665646e7a7033676d703371227d\"},{\"key\":\"packet_timeout_height\",\"value\":\"3-5169249\"},{\"key\":\"packet_timeout_timestamp\",\"value\":\"1663298359268152280\"},{\"key\":\"packet_sequence\",\"value\":\"1458\"},{\"key\":\"packet_src_port\",\"value\":\"transfer\"},{\"key\":\"packet_src_channel\",\"value\":\"channel-131\"},{\"key\":\"packet_dst_port\",\"value\":\"transfer\"},{\"key\":\"packet_dst_channel\",\"value\":\"channel-0\"},{\"key\":\"packet_ack\",\"value\":\"{\\\"result\\\":\\\"AQ==\\\"}\"},{\"key\":\"packet_ack_hex\",\"value\":\"7b22726573756c74223a2241513d3d227d\"},{\"key\":\"packet_connection\",\"value\":\"connection-0\"}]}]}]", + "data": "EsAECicvZXRoZXJtaW50LmV2bS52MS5Nc2dFdGhlcmV1bVR4UmVzcG9uc2USlAQKQjB4ZDU2ZGI2NTY3MmE0OGRhYWYxNGY3NDNmNTNjMzE2YTNlYmExMzBkNzJiZWI3MDM0Mjk2ZjRlYTNmN2U0OWI1MxKnAwoqMHg5MDRCZDVhNUFBQzBCOWQ4OEEwRDQ3ODY0NzI0MjE4OTg2QWQ0YTNhEkIweDhjNWJlMWU1ZWJlYzdkNWJkMTRmNzE0MjdkMWU4NGYzZGQwMzE0YzBmN2IyMjkxZTViMjAwYWM4YzdjM2I5MjUSQjB4MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwZTA4OWQxYTBkMTUxYTEzZDgxMmVhNGU4ZDY0OGYxZGM1OGI0MWNhORJCMHgwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBmNTY0ZWYwMDM0YmI3ZDdjZDg0NDEyMjc1ZTFlNTEzNjRkNGQ3NzM0GiD//////////////////////////////////////////yC3ubsCKkIweGQ1NmRiNjU2NzJhNDhkYWFmMTRmNzQzZjUzYzMxNmEzZWJhMTMwZDcyYmViNzAzNDI5NmY0ZWEzZjdlNDliNTM6QjB4YmFlOTljYmE2ZTkwOGE2YWEyZmZmNWVmOWY4MjZhYzgxYTMwZGRmOTcxN2M0OTY2YTFjMGU5YzYxMmI4NDgxNBogAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEo69oC", + "log": "[{\"msg_index\":0,\"events\":[{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"ethereum_tx\",\"attributes\":[{\"key\":\"amount\",\"value\":\"0\"},{\"key\":\"ethereumTxHash\",\"value\":\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\"},{\"key\":\"txIndex\",\"value\":\"0\"},{\"key\":\"txGasUsed\",\"value\":\"44395\"},{\"key\":\"txHash\",\"value\":\"3F1B98E6A43A3666699CA28DA2A0872E1478E092F7EC3FCF8A94202BB8B330D2\"},{\"key\":\"recipient\",\"value\":\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/ethermint.evm.v1.MsgEthereumTx\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"module\",\"value\":\"evm\"},{\"key\":\"sender\",\"value\":\"0xE089d1a0d151A13D812eA4e8D648f1Dc58B41ca9\"},{\"key\":\"txType\",\"value\":\"2\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"tx_log\",\"attributes\":[{\"key\":\"txLog\",\"value\":\"{\\\"address\\\":\\\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\\\",\\\"topics\\\":[\\\"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\\\",\\\"0x000000000000000000000000e089d1a0d151a13d812ea4e8d648f1dc58b41ca9\\\",\\\"0x000000000000000000000000f564ef0034bb7d7cd84412275e1e51364d4d7734\\\"],\\\"data\\\":\\\"//////////////////////////////////////////8=\\\",\\\"blockNumber\\\":5168311,\\\"transactionHash\\\":\\\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\\\",\\\"transactionIndex\\\":0,\\\"blockHash\\\":\\\"0xbae99cba6e908a6aa2fff5ef9f826ac81a30ddf9717c4966a1c0e9c612b84814\\\",\\\"logIndex\\\":0}\"}]}]}]", "info": "", - "gas_wanted": "309526", - "gas_used": "296783", + "gas_wanted": "48834", + "gas_used": "44395", "events": [ - { - "type": "use_feegrant", - "attributes": [ - { - "key": "Z3JhbnRlcg==", - "value": "dGNyYzFjbnV3eDVkd3p3Znlwc2t2cDdrYTh5bGx3eXBrZGpnejM2c216ZA==", - "index": true - }, - { - "key": "Z3JhbnRlZQ==", - "value": "dGNyYzFqNnhobnRtZnFhdXduMHJxaHFjODl5cjlhMnhxZTh2eHRoZWRocA==", - "index": true - } - ] - }, - { - "type": "update_feegrant", - "attributes": [ - { - "key": "Z3JhbnRlcg==", - "value": "dGNyYzFjbnV3eDVkd3p3Znlwc2t2cDdrYTh5bGx3eXBrZGpnejM2c216ZA==", - "index": true - }, - { - "key": "Z3JhbnRlZQ==", - "value": "dGNyYzFqNnhobnRtZnFhdXduMHJxaHFjODl5cjlhMnhxZTh2eHRoZWRocA==", - "index": true - } - ] - }, { "type": "coin_spent", "attributes": [ { "key": "c3BlbmRlcg==", - "value": "dGNyYzFjbnV3eDVkd3p3Znlwc2t2cDdrYTh5bGx3eXBrZGpnejM2c216ZA==", + "value": "dGNyYzF1enlhcmd4MzJ4c25tcWZ3NW41ZHZqODNtM3Z0Zzg5ZmhqZ2VzMw==", "index": true }, { "key": "YW1vdW50", - "value": "NzU5OTk0MDc2MDI1NjcxNjA2YmFzZXRjcm8=", + "value": "MjQ0MTcwMDAwMDAwMDAwMDAwYmFzZXRjcm8=", "index": true } ] @@ -180,7 +148,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` }, { "key": "YW1vdW50", - "value": "NzU5OTk0MDc2MDI1NjcxNjA2YmFzZXRjcm8=", + "value": "MjQ0MTcwMDAwMDAwMDAwMDAwYmFzZXRjcm8=", "index": true } ] @@ -195,12 +163,12 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` }, { "key": "c2VuZGVy", - "value": "dGNyYzFjbnV3eDVkd3p3Znlwc2t2cDdrYTh5bGx3eXBrZGpnejM2c216ZA==", + "value": "dGNyYzF1enlhcmd4MzJ4c25tcWZ3NW41ZHZqODNtM3Z0Zzg5ZmhqZ2VzMw==", "index": true }, { "key": "YW1vdW50", - "value": "NzU5OTk0MDc2MDI1NjcxNjA2YmFzZXRjcm8=", + "value": "MjQ0MTcwMDAwMDAwMDAwMDAwYmFzZXRjcm8=", "index": true } ] @@ -210,7 +178,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` "attributes": [ { "key": "c2VuZGVy", - "value": "dGNyYzFjbnV3eDVkd3p3Znlwc2t2cDdrYTh5bGx3eXBrZGpnejM2c216ZA==", + "value": "dGNyYzF1enlhcmd4MzJ4c25tcWZ3NW41ZHZqODNtM3Z0Zzg5ZmhqZ2VzMw==", "index": true } ] @@ -220,77 +188,22 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` "attributes": [ { "key": "ZmVl", - "value": "NzU5OTk0MDc2MDI1NjcxNjA2YmFzZXRjcm8=", - "index": true - }, - { - "key": "ZmVlX3BheWVy", - "value": "dGNyYzFjbnV3eDVkd3p3Znlwc2t2cDdrYTh5bGx3eXBrZGpnejM2c216ZA==", - "index": true - } - ] - }, - { - "type": "tx", - "attributes": [ - { - "key": "YWNjX3NlcQ==", - "value": "dGNyYzFqNnhobnRtZnFhdXduMHJxaHFjODl5cjlhMnhxZTh2eHRoZWRocC8yMDYw", - "index": true - } - ] - }, - { - "type": "tx", - "attributes": [ - { - "key": "c2lnbmF0dXJl", - "value": "R1lCU0hFai9mZVIvaGdhZjBtMW82a3ZZamlQblBYcU92TUlMdlF1UHNacHlOZGdyeHd4OUp1UVIyR3JhOFZvYVJ1ZGhHSGVocTRLbldZekMzVzVmbVE9PQ==", + "value": "MjQ0MTcwMDAwMDAwMDAwMDAwYmFzZXRjcm8=", "index": true } ] }, { - "type": "message", + "type": "ethereum_tx", "attributes": [ { - "key": "YWN0aW9u", - "value": "L2liYy5jb3JlLmNsaWVudC52MS5Nc2dVcGRhdGVDbGllbnQ=", - "index": true - } - ] - }, - { - "type": "update_client", - "attributes": [ - { - "key": "Y2xpZW50X2lk", - "value": "MDctdGVuZGVybWludC0w", - "index": true - }, - { - "key": "Y2xpZW50X3R5cGU=", - "value": "MDctdGVuZGVybWludA==", - "index": true - }, - { - "key": "Y29uc2Vuc3VzX2hlaWdodA==", - "value": "NC02MDU3NDU2", + "key": "ZXRoZXJldW1UeEhhc2g=", + "value": "MHhkNTZkYjY1NjcyYTQ4ZGFhZjE0Zjc0M2Y1M2MzMTZhM2ViYTEzMGQ3MmJlYjcwMzQyOTZmNGVhM2Y3ZTQ5YjUz", "index": true }, { - "key": "aGVhZGVy", - "value": "MGEyNjJmNjk2MjYzMmU2YzY5Njc2ODc0NjM2YzY5NjU2ZTc0NzMyZTc0NjU2ZTY0NjU3MjZkNjk2ZTc0MmU3NjMxMmU0ODY1NjE2NDY1NzIxMmQxMTEwYTkxMDcwYTliMDMwYTAyMDgwYjEyMTI3NDY1NzM3NDZlNjU3NDJkNjM3MjZmNjU3MzY1Njk2NDJkMzQxOGYwZGJmMTAyMjIwYzA4ZjNkMjhmOTkwNjEwZmFjMjlkYjEwMjJhNDgwYTIwMDJiYTRiY2ZhOTE3YTE1ZmQ4YmIyYWZlNzI4ZTEyNmFjYmFlNDA4NGUwODA4YzdlMTk0YTlkNGQ4N2Q3MGViNTEyMjQwODAxMTIyMDJhNWI2ZDkyNDdjMDliMDQxMGI5NTU2YTQ2N2YwMGU1MWY3YjBlOTI2ODJjMzczMmM1ZjliNTcwNDE1MjE2ODgzMjIwNTJkMWRjMDAxZmMyNjQ0NGNjYzNhNzFmNTk4NWMyODkyM2RjZWFlOTRkNTc2ZWRiMTlmNjdmNGM5MTJjNzVjYjNhMjBlM2IwYzQ0Mjk4ZmMxYzE0OWFmYmY0Yzg5OTZmYjkyNDI3YWU0MWU0NjQ5YjkzNGNhNDk1OTkxYjc4NTJiODU1NDIyMDIyMTcwOGU4MGJlZDVhODhjYTM2Nzk2NzdhZTYzMjlmZjM4NjQ0MmQ1ZDAxY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cwNjUxNmRmYWIxODhmOGVhZTAxMGEzZTBhMTRmMDQ4ODZmYWM0MWRmYWFiZWM2YTRiYWM2YjQ4M2Y3NDNjNDIxNDc4MTIyMjBhMjAyZmEzMTk3NDU1YTZkZTYzN2NjMjcyMWY2OWQzOThmMTViOTVlMTE2YWQ1ZjJjZTBmYzUyMDBiMTA4ZDE1YjI2MThjNGRiMDExMjQwMGExNGRlMDMzOTgyN2I0MzU5M2Y1MDA5N2Q2M2Y3ZWE2ZDZmNTNkOGE1ZmQxMjIyMGEyMGNmMDAwZjJkZmZmMWRlYjIxYjYwNTkxMGQ5Y2JiNDhlYjkxZWJhNDc3OTdjMTkzMWI0ODM4YWU4MDI4ZDdkMzYxOGVjZTNjMjk2MGIxOGFkYzhjNWRiOWMwMQ==", - "index": true - } - ] - }, - { - "type": "message", - "attributes": [ - { - "key": "bW9kdWxl", - "value": "aWJjX2NsaWVudA==", + "key": "dHhJbmRleA==", + "value": "MA==", "index": true } ] @@ -300,122 +213,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` "attributes": [ { "key": "YWN0aW9u", - "value": "L2liYy5jb3JlLmNoYW5uZWwudjEuTXNnUmVjdlBhY2tldA==", - "index": true - } - ] - }, - { - "type": "recv_packet", - "attributes": [ - { - "key": "cGFja2V0X2RhdGE=", - "value": "eyJhbW91bnQiOiI5ODMiLCJkZW5vbSI6InRyYW5zZmVyL2NoYW5uZWwtMi9URVNUIiwicmVjZWl2ZXIiOiJ0Y3JjMWRzdXplbHo4anZrNmduY21odGo3cDR4czMza3B0NWZxeWhmM3FrIiwic2VuZGVyIjoidGNybzFwZG4ybnNuOXdlc3o2cHgzbGNqc2dtcDhwZWZlZG56cDNnbXAzcSJ9", - "index": true - }, - { - "key": "cGFja2V0X2RhdGFfaGV4", - "value": "N2IyMjYxNmQ2Zjc1NmU3NDIyM2EyMjM5MzgzMzIyMmMyMjY0NjU2ZTZmNmQyMjNhMjI3NDcyNjE2ZTczNjY2NTcyMmY2MzY4NjE2ZTZlNjU2YzJkMzIyZjU0NDU1MzU0MjIyYzIyNzI2NTYzNjU2OTc2NjU3MjIyM2EyMjc0NjM3MjYzMzE2NDczNzU3YTY1NmM3YTM4NmE3NjZiMzY2NzZlNjM2ZDY4NzQ2YTM3NzAzNDc4NzMzMzMzNmI3MDc0MzU2NjcxNzk2ODY2MzM3MTZiMjIyYzIyNzM2NTZlNjQ2NTcyMjIzYTIyNzQ2MzcyNmYzMTcwNjQ2ZTMyNmU3MzZlMzk3NzY1NzM3YTM2NzA3ODMzNmM2MzZhNzM2NzZkNzAzODcwNjU2NjY1NjQ2ZTdhNzAzMzY3NmQ3MDMzNzEyMjdk", - "index": true - }, - { - "key": "cGFja2V0X3RpbWVvdXRfaGVpZ2h0", - "value": "My01MTY5MjQ5", - "index": true - }, - { - "key": "cGFja2V0X3RpbWVvdXRfdGltZXN0YW1w", - "value": "MTY2MzI5ODM1OTI2ODE1MjI4MA==", - "index": true - }, - { - "key": "cGFja2V0X3NlcXVlbmNl", - "value": "MTQ1OA==", - "index": true - }, - { - "key": "cGFja2V0X3NyY19wb3J0", - "value": "dHJhbnNmZXI=", - "index": true - }, - { - "key": "cGFja2V0X3NyY19jaGFubmVs", - "value": "Y2hhbm5lbC0xMzE=", - "index": true - }, - { - "key": "cGFja2V0X2RzdF9wb3J0", - "value": "dHJhbnNmZXI=", - "index": true - }, - { - "key": "cGFja2V0X2RzdF9jaGFubmVs", - "value": "Y2hhbm5lbC0w", - "index": true - }, - { - "key": "cGFja2V0X2NoYW5uZWxfb3JkZXJpbmc=", - "value": "T1JERVJfVU5PUkRFUkVE", - "index": true - }, - { - "key": "cGFja2V0X2Nvbm5lY3Rpb24=", - "value": "Y29ubmVjdGlvbi0w", - "index": true - } - ] - }, - { - "type": "message", - "attributes": [ - { - "key": "bW9kdWxl", - "value": "aWJjX2NoYW5uZWw=", - "index": true - } - ] - }, - { - "type": "denomination_trace", - "attributes": [ - { - "key": "dHJhY2VfaGFzaA==", - "value": "REMwNDE1OTI0RjQyQ0U4NkU5OTM3RUJDQzlBOTJDRTVCNTIwRDFFMzNEQUI3NjZCQjFFNjJEQTZDOUU5RjZGMA==", - "index": true - }, - { - "key": "ZGVub20=", - "value": "aWJjL0RDMDQxNTkyNEY0MkNFODZFOTkzN0VCQ0M5QTkyQ0U1QjUyMEQxRTMzREFCNzY2QkIxRTYyREE2QzlFOUY2RjA=", - "index": true - } - ] - }, - { - "type": "coin_received", - "attributes": [ - { - "key": "cmVjZWl2ZXI=", - "value": "dGNyYzF5bDZoZGpobWtmMzc2Mzk3MzBnZmZhbnB6bmR6ZHBtaGg1OW05dg==", - "index": true - }, - { - "key": "YW1vdW50", - "value": "OTgzaWJjL0RDMDQxNTkyNEY0MkNFODZFOTkzN0VCQ0M5QTkyQ0U1QjUyMEQxRTMzREFCNzY2QkIxRTYyREE2QzlFOUY2RjA=", - "index": true - } - ] - }, - { - "type": "coinbase", - "attributes": [ - { - "key": "bWludGVy", - "value": "dGNyYzF5bDZoZGpobWtmMzc2Mzk3MzBnZmZhbnB6bmR6ZHBtaGg1OW05dg==", - "index": true - }, - { - "key": "YW1vdW50", - "value": "OTgzaWJjL0RDMDQxNTkyNEY0MkNFODZFOTkzN0VCQ0M5QTkyQ0U1QjUyMEQxRTMzREFCNzY2QkIxRTYyREE2QzlFOUY2RjA=", + "value": "L2V0aGVybWludC5ldm0udjEuTXNnRXRoZXJldW1UeA==", "index": true } ] @@ -425,12 +223,12 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` "attributes": [ { "key": "c3BlbmRlcg==", - "value": "dGNyYzF5bDZoZGpobWtmMzc2Mzk3MzBnZmZhbnB6bmR6ZHBtaGg1OW05dg==", + "value": "dGNyYzE3eHBmdmFrbTJhbWc5NjJ5bHM2Zjg0ejNrZWxsOGM1bGZqc2plag==", "index": true }, { "key": "YW1vdW50", - "value": "OTgzaWJjL0RDMDQxNTkyNEY0MkNFODZFOTkzN0VCQ0M5QTkyQ0U1QjUyMEQxRTMzREFCNzY2QkIxRTYyREE2QzlFOUY2RjA=", + "value": "MjIxOTUwMDAwMDAwMDAwMDBiYXNldGNybw==", "index": true } ] @@ -440,12 +238,12 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` "attributes": [ { "key": "cmVjZWl2ZXI=", - "value": "dGNyYzFkc3V6ZWx6OGp2azZnbmNtaHRqN3A0eHMzM2twdDVmcXloZjNxaw==", + "value": "dGNyYzF1enlhcmd4MzJ4c25tcWZ3NW41ZHZqODNtM3Z0Zzg5ZmhqZ2VzMw==", "index": true }, { "key": "YW1vdW50", - "value": "OTgzaWJjL0RDMDQxNTkyNEY0MkNFODZFOTkzN0VCQ0M5QTkyQ0U1QjUyMEQxRTMzREFCNzY2QkIxRTYyREE2QzlFOUY2RjA=", + "value": "MjIxOTUwMDAwMDAwMDAwMDBiYXNldGNybw==", "index": true } ] @@ -455,17 +253,17 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` "attributes": [ { "key": "cmVjaXBpZW50", - "value": "dGNyYzFkc3V6ZWx6OGp2azZnbmNtaHRqN3A0eHMzM2twdDVmcXloZjNxaw==", + "value": "dGNyYzF1enlhcmd4MzJ4c25tcWZ3NW41ZHZqODNtM3Z0Zzg5ZmhqZ2VzMw==", "index": true }, { "key": "c2VuZGVy", - "value": "dGNyYzF5bDZoZGpobWtmMzc2Mzk3MzBnZmZhbnB6bmR6ZHBtaGg1OW05dg==", + "value": "dGNyYzE3eHBmdmFrbTJhbWc5NjJ5bHM2Zjg0ejNrZWxsOGM1bGZqc2plag==", "index": true }, { "key": "YW1vdW50", - "value": "OTgzaWJjL0RDMDQxNTkyNEY0MkNFODZFOTkzN0VCQ0M5QTkyQ0U1QjUyMEQxRTMzREFCNzY2QkIxRTYyREE2QzlFOUY2RjA=", + "value": "MjIxOTUwMDAwMDAwMDAwMDBiYXNldGNybw==", "index": true } ] @@ -475,107 +273,52 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` "attributes": [ { "key": "c2VuZGVy", - "value": "dGNyYzF5bDZoZGpobWtmMzc2Mzk3MzBnZmZhbnB6bmR6ZHBtaGg1OW05dg==", + "value": "dGNyYzE3eHBmdmFrbTJhbWc5NjJ5bHM2Zjg0ejNrZWxsOGM1bGZqc2plag==", "index": true } ] }, { - "type": "fungible_token_packet", + "type": "ethereum_tx", "attributes": [ { - "key": "bW9kdWxl", - "value": "dHJhbnNmZXI=", + "key": "YW1vdW50", + "value": "MA==", "index": true }, { - "key": "c2VuZGVy", - "value": "dGNybzFwZG4ybnNuOXdlc3o2cHgzbGNqc2dtcDhwZWZlZG56cDNnbXAzcQ==", + "key": "ZXRoZXJldW1UeEhhc2g=", + "value": "MHhkNTZkYjY1NjcyYTQ4ZGFhZjE0Zjc0M2Y1M2MzMTZhM2ViYTEzMGQ3MmJlYjcwMzQyOTZmNGVhM2Y3ZTQ5YjUz", "index": true }, { - "key": "cmVjZWl2ZXI=", - "value": "dGNyYzFkc3V6ZWx6OGp2azZnbmNtaHRqN3A0eHMzM2twdDVmcXloZjNxaw==", + "key": "dHhJbmRleA==", + "value": "MA==", "index": true }, { - "key": "ZGVub20=", - "value": "dHJhbnNmZXIvY2hhbm5lbC0yL1RFU1Q=", + "key": "dHhHYXNVc2Vk", + "value": "NDQzOTU=", "index": true }, { - "key": "YW1vdW50", - "value": "OTgz", + "key": "dHhIYXNo", + "value": "M0YxQjk4RTZBNDNBMzY2NjY5OUNBMjhEQTJBMDg3MkUxNDc4RTA5MkY3RUMzRkNGOEE5NDIwMkJCOEIzMzBEMg==", "index": true }, { - "key": "c3VjY2Vzcw==", - "value": "dHJ1ZQ==", + "key": "cmVjaXBpZW50", + "value": "MHg5MDRCZDVhNUFBQzBCOWQ4OEEwRDQ3ODY0NzI0MjE4OTg2QWQ0YTNh", "index": true } ] }, { - "type": "write_acknowledgement", + "type": "tx_log", "attributes": [ { - "key": "cGFja2V0X2RhdGE=", - "value": "eyJhbW91bnQiOiI5ODMiLCJkZW5vbSI6InRyYW5zZmVyL2NoYW5uZWwtMi9URVNUIiwicmVjZWl2ZXIiOiJ0Y3JjMWRzdXplbHo4anZrNmduY21odGo3cDR4czMza3B0NWZxeWhmM3FrIiwic2VuZGVyIjoidGNybzFwZG4ybnNuOXdlc3o2cHgzbGNqc2dtcDhwZWZlZG56cDNnbXAzcSJ9", - "index": true - }, - { - "key": "cGFja2V0X2RhdGFfaGV4", - "value": "N2IyMjYxNmQ2Zjc1NmU3NDIyM2EyMjM5MzgzMzIyMmMyMjY0NjU2ZTZmNmQyMjNhMjI3NDcyNjE2ZTczNjY2NTcyMmY2MzY4NjE2ZTZlNjU2YzJkMzIyZjU0NDU1MzU0MjIyYzIyNzI2NTYzNjU2OTc2NjU3MjIyM2EyMjc0NjM3MjYzMzE2NDczNzU3YTY1NmM3YTM4NmE3NjZiMzY2NzZlNjM2ZDY4NzQ2YTM3NzAzNDc4NzMzMzMzNmI3MDc0MzU2NjcxNzk2ODY2MzM3MTZiMjIyYzIyNzM2NTZlNjQ2NTcyMjIzYTIyNzQ2MzcyNmYzMTcwNjQ2ZTMyNmU3MzZlMzk3NzY1NzM3YTM2NzA3ODMzNmM2MzZhNzM2NzZkNzAzODcwNjU2NjY1NjQ2ZTdhNzAzMzY3NmQ3MDMzNzEyMjdk", - "index": true - }, - { - "key": "cGFja2V0X3RpbWVvdXRfaGVpZ2h0", - "value": "My01MTY5MjQ5", - "index": true - }, - { - "key": "cGFja2V0X3RpbWVvdXRfdGltZXN0YW1w", - "value": "MTY2MzI5ODM1OTI2ODE1MjI4MA==", - "index": true - }, - { - "key": "cGFja2V0X3NlcXVlbmNl", - "value": "MTQ1OA==", - "index": true - }, - { - "key": "cGFja2V0X3NyY19wb3J0", - "value": "dHJhbnNmZXI=", - "index": true - }, - { - "key": "cGFja2V0X3NyY19jaGFubmVs", - "value": "Y2hhbm5lbC0xMzE=", - "index": true - }, - { - "key": "cGFja2V0X2RzdF9wb3J0", - "value": "dHJhbnNmZXI=", - "index": true - }, - { - "key": "cGFja2V0X2RzdF9jaGFubmVs", - "value": "Y2hhbm5lbC0w", - "index": true - }, - { - "key": "cGFja2V0X2Fjaw==", - "value": "eyJyZXN1bHQiOiJBUT09In0=", - "index": true - }, - { - "key": "cGFja2V0X2Fja19oZXg=", - "value": "N2IyMjcyNjU3Mzc1NmM3NDIyM2EyMjQxNTEzZDNkMjI3ZA==", - "index": true - }, - { - "key": "cGFja2V0X2Nvbm5lY3Rpb24=", - "value": "Y29ubmVjdGlvbi0w", + "key": "dHhMb2c=", + "value": "eyJhZGRyZXNzIjoiMHg5MDRCZDVhNUFBQzBCOWQ4OEEwRDQ3ODY0NzI0MjE4OTg2QWQ0YTNhIiwidG9waWNzIjpbIjB4OGM1YmUxZTVlYmVjN2Q1YmQxNGY3MTQyN2QxZTg0ZjNkZDAzMTRjMGY3YjIyOTFlNWIyMDBhYzhjN2MzYjkyNSIsIjB4MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwZTA4OWQxYTBkMTUxYTEzZDgxMmVhNGU4ZDY0OGYxZGM1OGI0MWNhOSIsIjB4MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwZjU2NGVmMDAzNGJiN2Q3Y2Q4NDQxMjI3NWUxZTUxMzY0ZDRkNzczNCJdLCJkYXRhIjoiLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vOD0iLCJibG9ja051bWJlciI6NTE2ODMxMSwidHJhbnNhY3Rpb25IYXNoIjoiMHhkNTZkYjY1NjcyYTQ4ZGFhZjE0Zjc0M2Y1M2MzMTZhM2ViYTEzMGQ3MmJlYjcwMzQyOTZmNGVhM2Y3ZTQ5YjUzIiwidHJhbnNhY3Rpb25JbmRleCI6MCwiYmxvY2tIYXNoIjoiMHhiYWU5OWNiYTZlOTA4YTZhYTJmZmY1ZWY5ZjgyNmFjODFhMzBkZGY5NzE3YzQ5NjZhMWMwZTljNjEyYjg0ODE0IiwibG9nSW5kZXgiOjB9", "index": true } ] @@ -585,7 +328,17 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` "attributes": [ { "key": "bW9kdWxl", - "value": "aWJjX2NoYW5uZWw=", + "value": "ZXZt", + "index": true + }, + { + "key": "c2VuZGVy", + "value": "MHhFMDg5ZDFhMGQxNTFBMTNEODEyZUE0ZThENjQ4ZjFEYzU4QjQxY2E5", + "index": true + }, + { + "key": "dHhUeXBl", + "value": "Mg==", "index": true } ] @@ -750,7 +503,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` }, { "key": "dmFsaWRhdG9y", - "value": "dGNyY3ZhbG9wZXIxaDBqY2cwM3hqZnE0bjl3NmwybHh1dHA4bDU1bm1jejl3enkwMHY=", + "value": "dGNyY3ZhbG9wZXIxczllM2Y1eTR0dDRma3ozanlqODY1cWF1ZDJjcWhzNjZ5bm1qNGY=", "index": true } ] @@ -765,7 +518,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` }, { "key": "dmFsaWRhdG9y", - "value": "dGNyY3ZhbG9wZXIxaDBqY2cwM3hqZnE0bjl3NmwybHh1dHA4bDU1bm1jejl3enkwMHY=", + "value": "dGNyY3ZhbG9wZXIxczllM2Y1eTR0dDRma3ozanlqODY1cWF1ZDJjcWhzNjZ5bm1qNGY=", "index": true } ] @@ -780,7 +533,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` }, { "key": "dmFsaWRhdG9y", - "value": "dGNyY3ZhbG9wZXIxaDBqY2cwM3hqZnE0bjl3NmwybHh1dHA4bDU1bm1jejl3enkwMHY=", + "value": "dGNyY3ZhbG9wZXIxczllM2Y1eTR0dDRma3ozanlqODY1cWF1ZDJjcWhzNjZ5bm1qNGY=", "index": true } ] @@ -1030,7 +783,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` "attributes": [ { "key": "YmFzZV9mZWU=", - "value": "MTk1NTM0ODEwMDA4MQ==", + "value": "MTk1NTM0NzQzODEzMA==", "index": true } ] @@ -1042,7 +795,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` "attributes": [ { "key": "Ymxvb20=", - "value": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "value": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAEAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", "index": true } ] @@ -1052,12 +805,12 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` "attributes": [ { "key": "aGVpZ2h0", - "value": "NTE2ODI3Nw==", + "value": "NTE2ODMxMQ==", "index": true }, { "key": "YW1vdW50", - "value": "Mjk2Nzgz", + "value": "NDQzOTU=", "index": true } ] @@ -1083,3 +836,459 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = ` } } ` + +const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TXS_RESP = ` +{ + "tx": { + "body": { + "messages": [ + { + "@type": "/ethermint.evm.v1.MsgEthereumTx", + "data": { + "@type": "/ethermint.evm.v1.DynamicFeeTx", + "chain_id": "338", + "nonce": "115", + "gas_tip_cap": "5000000000000", + "gas_fee_cap": "5000000000000", + "gas": "48834", + "to": "0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a", + "value": "0", + "data": "CV6nswAAAAAAAAAAAAAAAPVk7wA0u3182EQSJ14eUTZNTXc0//////////////////////////////////////////8=", + "accesses": [], + "v": null, + "r": "HHigR02IN48gvEM991C/MOCmbVfOw9Sj804IhtI5z2Q=", + "s": "SspHmiOAoM4bQdvAig9I8PQzLv5GTzElhcROppO0WpU=" + }, + "size": 0, + "hash": "0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53", + "from": "" + } + ], + "memo": "", + "timeout_height": "0", + "extension_options": [ + { + "@type": "/ethermint.evm.v1.ExtensionOptionsEthereumTx" + } + ], + "non_critical_extension_options": [] + }, + "auth_info": { + "signer_infos": [], + "fee": { + "amount": [ + { + "denom": "basetcro", + "amount": "244170000000000000" + } + ], + "gas_limit": "48834", + "payer": "", + "granter": "" + }, + "tip": null + }, + "signatures": [] + }, + "tx_response": { + "height": "5168311", + "txhash": "3F1B98E6A43A3666699CA28DA2A0872E1478E092F7EC3FCF8A94202BB8B330D2", + "codespace": "", + "code": 0, + "data": "12C0040A272F65746865726D696E742E65766D2E76312E4D7367457468657265756D5478526573706F6E73651294040A4230786435366462363536373261343864616166313466373433663533633331366133656261313330643732626562373033343239366634656133663765343962353312A7030A2A3078393034426435613541414330423964383841304434373836343732343231383938364164346133611242307838633562653165356562656337643562643134663731343237643165383466336464303331346330663762323239316535623230306163386337633362393235124230783030303030303030303030303030303030303030303030306530383964316130643135316131336438313265613465386436343866316463353862343163613912423078303030303030303030303030303030303030303030303030663536346566303033346262376437636438343431323237356531653531333634643464373733341A20FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF20B7B9BB022A423078643536646236353637326134386461616631346637343366353363333136613365626131333064373262656237303334323936663465613366376534396235333A423078626165393963626136653930386136616132666666356566396638323661633831613330646466393731376334393636613163306539633631326238343831341A20000000000000000000000000000000000000000000000000000000000000000128EBDA02", + "raw_log": "[{\"msg_index\":0,\"events\":[{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"ethereum_tx\",\"attributes\":[{\"key\":\"amount\",\"value\":\"0\"},{\"key\":\"ethereumTxHash\",\"value\":\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\"},{\"key\":\"txIndex\",\"value\":\"0\"},{\"key\":\"txGasUsed\",\"value\":\"44395\"},{\"key\":\"txHash\",\"value\":\"3F1B98E6A43A3666699CA28DA2A0872E1478E092F7EC3FCF8A94202BB8B330D2\"},{\"key\":\"recipient\",\"value\":\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/ethermint.evm.v1.MsgEthereumTx\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"module\",\"value\":\"evm\"},{\"key\":\"sender\",\"value\":\"0xE089d1a0d151A13D812eA4e8D648f1Dc58B41ca9\"},{\"key\":\"txType\",\"value\":\"2\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"tx_log\",\"attributes\":[{\"key\":\"txLog\",\"value\":\"{\\\"address\\\":\\\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\\\",\\\"topics\\\":[\\\"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\\\",\\\"0x000000000000000000000000e089d1a0d151a13d812ea4e8d648f1dc58b41ca9\\\",\\\"0x000000000000000000000000f564ef0034bb7d7cd84412275e1e51364d4d7734\\\"],\\\"data\\\":\\\"//////////////////////////////////////////8=\\\",\\\"blockNumber\\\":5168311,\\\"transactionHash\\\":\\\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\\\",\\\"transactionIndex\\\":0,\\\"blockHash\\\":\\\"0xbae99cba6e908a6aa2fff5ef9f826ac81a30ddf9717c4966a1c0e9c612b84814\\\",\\\"logIndex\\\":0}\"}]}]}]", + "logs": [ + { + "msg_index": 0, + "log": "", + "events": [ + { + "type": "coin_received", + "attributes": [ + { + "key": "receiver", + "value": "tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3" + }, + { + "key": "amount", + "value": "22195000000000000basetcro" + } + ] + }, + { + "type": "coin_spent", + "attributes": [ + { + "key": "spender", + "value": "tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej" + }, + { + "key": "amount", + "value": "22195000000000000basetcro" + } + ] + }, + { + "type": "ethereum_tx", + "attributes": [ + { + "key": "amount", + "value": "0" + }, + { + "key": "ethereumTxHash", + "value": "0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53" + }, + { + "key": "txIndex", + "value": "0" + }, + { + "key": "txGasUsed", + "value": "44395" + }, + { + "key": "txHash", + "value": "3F1B98E6A43A3666699CA28DA2A0872E1478E092F7EC3FCF8A94202BB8B330D2" + }, + { + "key": "recipient", + "value": "0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a" + } + ] + }, + { + "type": "message", + "attributes": [ + { + "key": "action", + "value": "/ethermint.evm.v1.MsgEthereumTx" + }, + { + "key": "sender", + "value": "tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej" + }, + { + "key": "module", + "value": "evm" + }, + { + "key": "sender", + "value": "0xE089d1a0d151A13D812eA4e8D648f1Dc58B41ca9" + }, + { + "key": "txType", + "value": "2" + } + ] + }, + { + "type": "transfer", + "attributes": [ + { + "key": "recipient", + "value": "tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3" + }, + { + "key": "sender", + "value": "tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej" + }, + { + "key": "amount", + "value": "22195000000000000basetcro" + } + ] + }, + { + "type": "tx_log", + "attributes": [ + { + "key": "txLog", + "value": "{\"address\":\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\",\"topics\":[\"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\",\"0x000000000000000000000000e089d1a0d151a13d812ea4e8d648f1dc58b41ca9\",\"0x000000000000000000000000f564ef0034bb7d7cd84412275e1e51364d4d7734\"],\"data\":\"//////////////////////////////////////////8=\",\"blockNumber\":5168311,\"transactionHash\":\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\",\"transactionIndex\":0,\"blockHash\":\"0xbae99cba6e908a6aa2fff5ef9f826ac81a30ddf9717c4966a1c0e9c612b84814\",\"logIndex\":0}" + } + ] + } + ] + } + ], + "info": "", + "gas_wanted": "48834", + "gas_used": "44395", + "tx": { + "@type": "/cosmos.tx.v1beta1.Tx", + "body": { + "messages": [ + { + "@type": "/ethermint.evm.v1.MsgEthereumTx", + "data": { + "@type": "/ethermint.evm.v1.DynamicFeeTx", + "chain_id": "338", + "nonce": "115", + "gas_tip_cap": "5000000000000", + "gas_fee_cap": "5000000000000", + "gas": "48834", + "to": "0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a", + "value": "0", + "data": "CV6nswAAAAAAAAAAAAAAAPVk7wA0u3182EQSJ14eUTZNTXc0//////////////////////////////////////////8=", + "accesses": [], + "v": null, + "r": "HHigR02IN48gvEM991C/MOCmbVfOw9Sj804IhtI5z2Q=", + "s": "SspHmiOAoM4bQdvAig9I8PQzLv5GTzElhcROppO0WpU=" + }, + "size": 0, + "hash": "0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53", + "from": "" + } + ], + "memo": "", + "timeout_height": "0", + "extension_options": [ + { + "@type": "/ethermint.evm.v1.ExtensionOptionsEthereumTx" + } + ], + "non_critical_extension_options": [] + }, + "auth_info": { + "signer_infos": [], + "fee": { + "amount": [ + { + "denom": "basetcro", + "amount": "244170000000000000" + } + ], + "gas_limit": "48834", + "payer": "", + "granter": "" + }, + "tip": null + }, + "signatures": [] + }, + "timestamp": "2022-09-16T03:14:55Z", + "events": [ + { + "type": "coin_spent", + "attributes": [ + { + "key": "c3BlbmRlcg==", + "value": "dGNyYzF1enlhcmd4MzJ4c25tcWZ3NW41ZHZqODNtM3Z0Zzg5ZmhqZ2VzMw==", + "index": true + }, + { + "key": "YW1vdW50", + "value": "MjQ0MTcwMDAwMDAwMDAwMDAwYmFzZXRjcm8=", + "index": true + } + ] + }, + { + "type": "coin_received", + "attributes": [ + { + "key": "cmVjZWl2ZXI=", + "value": "dGNyYzE3eHBmdmFrbTJhbWc5NjJ5bHM2Zjg0ejNrZWxsOGM1bGZqc2plag==", + "index": true + }, + { + "key": "YW1vdW50", + "value": "MjQ0MTcwMDAwMDAwMDAwMDAwYmFzZXRjcm8=", + "index": true + } + ] + }, + { + "type": "transfer", + "attributes": [ + { + "key": "cmVjaXBpZW50", + "value": "dGNyYzE3eHBmdmFrbTJhbWc5NjJ5bHM2Zjg0ejNrZWxsOGM1bGZqc2plag==", + "index": true + }, + { + "key": "c2VuZGVy", + "value": "dGNyYzF1enlhcmd4MzJ4c25tcWZ3NW41ZHZqODNtM3Z0Zzg5ZmhqZ2VzMw==", + "index": true + }, + { + "key": "YW1vdW50", + "value": "MjQ0MTcwMDAwMDAwMDAwMDAwYmFzZXRjcm8=", + "index": true + } + ] + }, + { + "type": "message", + "attributes": [ + { + "key": "c2VuZGVy", + "value": "dGNyYzF1enlhcmd4MzJ4c25tcWZ3NW41ZHZqODNtM3Z0Zzg5ZmhqZ2VzMw==", + "index": true + } + ] + }, + { + "type": "tx", + "attributes": [ + { + "key": "ZmVl", + "value": "MjQ0MTcwMDAwMDAwMDAwMDAwYmFzZXRjcm8=", + "index": true + } + ] + }, + { + "type": "ethereum_tx", + "attributes": [ + { + "key": "ZXRoZXJldW1UeEhhc2g=", + "value": "MHhkNTZkYjY1NjcyYTQ4ZGFhZjE0Zjc0M2Y1M2MzMTZhM2ViYTEzMGQ3MmJlYjcwMzQyOTZmNGVhM2Y3ZTQ5YjUz", + "index": true + }, + { + "key": "dHhJbmRleA==", + "value": "MA==", + "index": true + } + ] + }, + { + "type": "message", + "attributes": [ + { + "key": "YWN0aW9u", + "value": "L2V0aGVybWludC5ldm0udjEuTXNnRXRoZXJldW1UeA==", + "index": true + } + ] + }, + { + "type": "coin_spent", + "attributes": [ + { + "key": "c3BlbmRlcg==", + "value": "dGNyYzE3eHBmdmFrbTJhbWc5NjJ5bHM2Zjg0ejNrZWxsOGM1bGZqc2plag==", + "index": true + }, + { + "key": "YW1vdW50", + "value": "MjIxOTUwMDAwMDAwMDAwMDBiYXNldGNybw==", + "index": true + } + ] + }, + { + "type": "coin_received", + "attributes": [ + { + "key": "cmVjZWl2ZXI=", + "value": "dGNyYzF1enlhcmd4MzJ4c25tcWZ3NW41ZHZqODNtM3Z0Zzg5ZmhqZ2VzMw==", + "index": true + }, + { + "key": "YW1vdW50", + "value": "MjIxOTUwMDAwMDAwMDAwMDBiYXNldGNybw==", + "index": true + } + ] + }, + { + "type": "transfer", + "attributes": [ + { + "key": "cmVjaXBpZW50", + "value": "dGNyYzF1enlhcmd4MzJ4c25tcWZ3NW41ZHZqODNtM3Z0Zzg5ZmhqZ2VzMw==", + "index": true + }, + { + "key": "c2VuZGVy", + "value": "dGNyYzE3eHBmdmFrbTJhbWc5NjJ5bHM2Zjg0ejNrZWxsOGM1bGZqc2plag==", + "index": true + }, + { + "key": "YW1vdW50", + "value": "MjIxOTUwMDAwMDAwMDAwMDBiYXNldGNybw==", + "index": true + } + ] + }, + { + "type": "message", + "attributes": [ + { + "key": "c2VuZGVy", + "value": "dGNyYzE3eHBmdmFrbTJhbWc5NjJ5bHM2Zjg0ejNrZWxsOGM1bGZqc2plag==", + "index": true + } + ] + }, + { + "type": "ethereum_tx", + "attributes": [ + { + "key": "YW1vdW50", + "value": "MA==", + "index": true + }, + { + "key": "ZXRoZXJldW1UeEhhc2g=", + "value": "MHhkNTZkYjY1NjcyYTQ4ZGFhZjE0Zjc0M2Y1M2MzMTZhM2ViYTEzMGQ3MmJlYjcwMzQyOTZmNGVhM2Y3ZTQ5YjUz", + "index": true + }, + { + "key": "dHhJbmRleA==", + "value": "MA==", + "index": true + }, + { + "key": "dHhHYXNVc2Vk", + "value": "NDQzOTU=", + "index": true + }, + { + "key": "dHhIYXNo", + "value": "M0YxQjk4RTZBNDNBMzY2NjY5OUNBMjhEQTJBMDg3MkUxNDc4RTA5MkY3RUMzRkNGOEE5NDIwMkJCOEIzMzBEMg==", + "index": true + }, + { + "key": "cmVjaXBpZW50", + "value": "MHg5MDRCZDVhNUFBQzBCOWQ4OEEwRDQ3ODY0NzI0MjE4OTg2QWQ0YTNh", + "index": true + } + ] + }, + { + "type": "tx_log", + "attributes": [ + { + "key": "dHhMb2c=", + "value": "eyJhZGRyZXNzIjoiMHg5MDRCZDVhNUFBQzBCOWQ4OEEwRDQ3ODY0NzI0MjE4OTg2QWQ0YTNhIiwidG9waWNzIjpbIjB4OGM1YmUxZTVlYmVjN2Q1YmQxNGY3MTQyN2QxZTg0ZjNkZDAzMTRjMGY3YjIyOTFlNWIyMDBhYzhjN2MzYjkyNSIsIjB4MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwZTA4OWQxYTBkMTUxYTEzZDgxMmVhNGU4ZDY0OGYxZGM1OGI0MWNhOSIsIjB4MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwZjU2NGVmMDAzNGJiN2Q3Y2Q4NDQxMjI3NWUxZTUxMzY0ZDRkNzczNCJdLCJkYXRhIjoiLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vOD0iLCJibG9ja051bWJlciI6NTE2ODMxMSwidHJhbnNhY3Rpb25IYXNoIjoiMHhkNTZkYjY1NjcyYTQ4ZGFhZjE0Zjc0M2Y1M2MzMTZhM2ViYTEzMGQ3MmJlYjcwMzQyOTZmNGVhM2Y3ZTQ5YjUzIiwidHJhbnNhY3Rpb25JbmRleCI6MCwiYmxvY2tIYXNoIjoiMHhiYWU5OWNiYTZlOTA4YTZhYTJmZmY1ZWY5ZjgyNmFjODFhMzBkZGY5NzE3YzQ5NjZhMWMwZTljNjEyYjg0ODE0IiwibG9nSW5kZXgiOjB9", + "index": true + } + ] + }, + { + "type": "message", + "attributes": [ + { + "key": "bW9kdWxl", + "value": "ZXZt", + "index": true + }, + { + "key": "c2VuZGVy", + "value": "MHhFMDg5ZDFhMGQxNTFBMTNEODEyZUE0ZThENjQ4ZjFEYzU4QjQxY2E5", + "index": true + }, + { + "key": "dHhUeXBl", + "value": "Mg==", + "index": true + } + ] + } + ] + } +} +` From 73945802e0068f149f6f2d6e243cd9a146a17e14 Mon Sep 17 00:00:00 2001 From: vincentysc Date: Mon, 19 Sep 2022 10:21:44 +0800 Subject: [PATCH 03/15] update dynamic fee --- ...te_msg_extension_option_dynamic_fee_tx..go | 35 +++++++++++ .../msg_extension_option_dynamic_fee_tx.go | 62 +++++++++++++++++++ usecase/model/msg_ethereum_tx.go | 2 +- usecase/parser/msg.go | 24 ++++--- ...sg_extension_option_dynamic_fee_tx_test.go | 4 +- 5 files changed, 115 insertions(+), 12 deletions(-) create mode 100644 usecase/command/create_msg_extension_option_dynamic_fee_tx..go create mode 100644 usecase/event/msg_extension_option_dynamic_fee_tx.go diff --git a/usecase/command/create_msg_extension_option_dynamic_fee_tx..go b/usecase/command/create_msg_extension_option_dynamic_fee_tx..go new file mode 100644 index 000000000..98cbda5d3 --- /dev/null +++ b/usecase/command/create_msg_extension_option_dynamic_fee_tx..go @@ -0,0 +1,35 @@ +package command + +import ( + entity_event "github.com/crypto-com/chain-indexing/entity/event" + "github.com/crypto-com/chain-indexing/usecase/event" + "github.com/crypto-com/chain-indexing/usecase/model" +) + +type CreateMsgExtensionOptionDynamicFeeTx struct { + msgCommonParams event.MsgCommonParams + params model.MsgDynamicFeeTxParams +} + +func NewCreateMsgExtensionOptionDynamicFeeTxTx( + msgCommonParams event.MsgCommonParams, + params model.MsgDynamicFeeTxParams, +) *CreateMsgExtensionOptionDynamicFeeTx { + return &CreateMsgExtensionOptionDynamicFeeTx{ + msgCommonParams, + params, + } +} + +func (*CreateMsgExtensionOptionDynamicFeeTx) Name() string { + return "/ethermint.types.v1.DynamicFeeTx.Create" +} + +func (*CreateMsgExtensionOptionDynamicFeeTx) Version() int { + return 1 +} + +func (cmd *CreateMsgExtensionOptionDynamicFeeTx) Exec() (entity_event.Event, error) { + event := event.NewMsgExtensionOptionDynamicFeeTx(cmd.msgCommonParams, cmd.params) + return event, nil +} diff --git a/usecase/event/msg_extension_option_dynamic_fee_tx.go b/usecase/event/msg_extension_option_dynamic_fee_tx.go new file mode 100644 index 000000000..3d8115499 --- /dev/null +++ b/usecase/event/msg_extension_option_dynamic_fee_tx.go @@ -0,0 +1,62 @@ +package event + +import ( + "bytes" + + "github.com/crypto-com/chain-indexing/usecase/model" + + entity_event "github.com/crypto-com/chain-indexing/entity/event" + jsoniter "github.com/json-iterator/go" + "github.com/luci/go-render/render" +) + +const MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX = "/ethermint.types.v1.DynamicFeeTx" +const MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_CREATED = "/ethermint.types.v1.DynamicFeeTx.Created" +const MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_FAILED = "/ethermint.types.v1.DynamicFeeTx.Failed" + +type MsgExtensionOptionDynamicFeeTx struct { + MsgBase + + Params model.MsgDynamicFeeTxParams `json:"params"` +} + +func NewMsgExtensionOptionDynamicFeeTx( + msgCommonParams MsgCommonParams, + params model.MsgDynamicFeeTxParams, +) *MsgExtensionOptionDynamicFeeTx { + return &MsgExtensionOptionDynamicFeeTx{ + NewMsgBase(MsgBaseParams{ + MsgName: MSG_ETHEREUM_TX, + Version: 1, + MsgCommonParams: msgCommonParams, + }), + + params, + } +} + +// ToJSON encodes the event into JSON string payload +func (event *MsgExtensionOptionDynamicFeeTx) ToJSON() (string, error) { + encoded, err := jsoniter.Marshal(event) + if err != nil { + return "", err + } + + return string(encoded), nil +} + +func (event *MsgExtensionOptionDynamicFeeTx) String() string { + return render.Render(event) +} + +func DecodeMsgExtensionOptionDynamicFeeTx(encoded []byte) (entity_event.Event, error) { + jsonDecoder := jsoniter.NewDecoder(bytes.NewReader(encoded)) + jsonDecoder.DisallowUnknownFields() + + var event *MsgExtensionOptionDynamicFeeTx + if err := jsonDecoder.Decode(&event); err != nil { + return nil, err + } + + return event, nil +} diff --git a/usecase/model/msg_ethereum_tx.go b/usecase/model/msg_ethereum_tx.go index e722f7897..e87c7f9d1 100644 --- a/usecase/model/msg_ethereum_tx.go +++ b/usecase/model/msg_ethereum_tx.go @@ -32,7 +32,7 @@ type LegacyTx struct { S string `mapstructure:"s" json:"s"` } -type DynamicFeeTxParams struct { +type MsgDynamicFeeTxParams struct { RawDynamicFeeTx } type RawDynamicFeeTx struct { diff --git a/usecase/parser/msg.go b/usecase/parser/msg.go index db594d546..11eb1b2bc 100644 --- a/usecase/parser/msg.go +++ b/usecase/parser/msg.go @@ -2134,6 +2134,9 @@ func ParseMsgEthereumTx( panic(fmt.Errorf("error decoding RawMsgEthereumTx: %v", err)) } + data := parserParams.Msg["data"].(map[string]interface{}) + fmt.Println("===> ", data["@type"]) + if !parserParams.MsgCommonParams.TxSuccess { // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 msgEthereumTxParams := model.MsgEthereumTxParams{ @@ -2191,38 +2194,41 @@ func ParseExtensionOptionDynamicFeeTx( if err := decoder.Decode(parserParams.Msg); err != nil { panic(fmt.Errorf("error decoding RawMsgEthereumTx: %v", err)) } - fmt.Println("===> ", parserParams, rawMsg) + // fmt.Println("===> ", parserParams.Msg["data"]) + data := parserParams.Msg["data"].(map[string]interface{}) + fmt.Println("===> ", data["@type"]) + if !parserParams.MsgCommonParams.TxSuccess { // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 - msgEthereumTxParams := model.DynamicFeeTxParams{ + msgDynamicFeeTxParams := model.MsgDynamicFeeTxParams{ RawDynamicFeeTx: rawMsg, } // Getting possible signer address from Msg var possibleSignerAddresses []string // FIXME: https://github.com/crypto-com/chain-indexing/issues/729 - // possibleSignerAddresses = append(possibleSignerAddresses, msgEthereumTxParams.From) + // possibleSignerAddresses = append(possibleSignerAddresses, msgDynamicFeeTxParams.From) - return []command.Command{command_usecase.NewCreateMsgEthereumTx( + return []command.Command{command_usecase.NewCreateMsgExtensionOptionDynamicFeeTxTx( parserParams.MsgCommonParams, - msgEthereumTxParams, + msgDynamicFeeTxParams, )}, possibleSignerAddresses } // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 - msgEthereumTxParams := model.DynamicFeeTxParams{ + msgDynamicFeeTxParams := model.MsgDynamicFeeTxParams{ RawDynamicFeeTx: rawMsg, } // Getting possible signer address from Msg var possibleSignerAddresses []string // FIXME: https://github.com/crypto-com/chain-indexing/issues/729 - // possibleSignerAddresses = append(possibleSignerAddresses, msgEthereumTxParams.From) + // possibleSignerAddresses = append(possibleSignerAddresses, msgDynamicFeeTxParams.From) - return []command.Command{command_usecase.NewCreateMsgEthereumTx( + return []command.Command{command_usecase.NewCreateMsgExtensionOptionDynamicFeeTxTx( parserParams.MsgCommonParams, - msgEthereumTxParams, + msgDynamicFeeTxParams, )}, possibleSignerAddresses } diff --git a/usecase/parser/msg_extension_option_dynamic_fee_tx_test.go b/usecase/parser/msg_extension_option_dynamic_fee_tx_test.go index 89eab2a47..6397a84ba 100644 --- a/usecase/parser/msg_extension_option_dynamic_fee_tx_test.go +++ b/usecase/parser/msg_extension_option_dynamic_fee_tx_test.go @@ -38,14 +38,14 @@ var _ = Describe("ParseMsgCommands", func() { ) Expect(err).To(BeNil()) Expect(cmds).To(HaveLen(1)) - Expect(cmds).To(Equal([]command.Command{command_usecase.NewCreateMsgEthereumTx( + Expect(cmds).To(Equal([]command.Command{command_usecase.NewCreateMsgExtensionOptionDynamicFeeTxTx( event.MsgCommonParams{ BlockHeight: int64(5168311), TxHash: "3F1B98E6A43A3666699CA28DA2A0872E1478E092F7EC3FCF8A94202BB8B330D2", TxSuccess: true, MsgIndex: 0, }, - model.DynamicFeeTxParams{ + model.MsgDynamicFeeTxParams{ RawDynamicFeeTx: model.RawDynamicFeeTx{ Type: "/ethermint.evm.v1.MsgEthereumTx", Size: 0, From da24de799af47e858835a53c077b6bfaf62a7547 Mon Sep 17 00:00:00 2001 From: vincentysc Date: Mon, 19 Sep 2022 14:55:44 +0800 Subject: [PATCH 04/15] update msg ethereum parser and test case --- usecase/command/create_msg_ethereum_tx.go | 4 +- usecase/event/msg_ethereum_tx.go | 4 +- usecase/event/msg_ethereum_tx_test.go | 4 +- usecase/model/msg_ethereum_tx.go | 2 +- usecase/parser/msg.go | 53 ++++++++----- usecase/parser/msg_ethereum_tx_test.go | 61 ++++++++++++++- ...sg_extension_option_dynamic_fee_tx_test.go | 75 ------------------- usecase/parser/register.go | 1 - 8 files changed, 103 insertions(+), 101 deletions(-) delete mode 100644 usecase/parser/msg_extension_option_dynamic_fee_tx_test.go diff --git a/usecase/command/create_msg_ethereum_tx.go b/usecase/command/create_msg_ethereum_tx.go index d3797a50e..662f9da52 100644 --- a/usecase/command/create_msg_ethereum_tx.go +++ b/usecase/command/create_msg_ethereum_tx.go @@ -8,12 +8,12 @@ import ( type CreateMsgEthereumTx struct { msgCommonParams event.MsgCommonParams - params model.MsgEthereumTxParams + params model.MsgLegacyTxParams } func NewCreateMsgEthereumTx( msgCommonParams event.MsgCommonParams, - params model.MsgEthereumTxParams, + params model.MsgLegacyTxParams, ) *CreateMsgEthereumTx { return &CreateMsgEthereumTx{ msgCommonParams, diff --git a/usecase/event/msg_ethereum_tx.go b/usecase/event/msg_ethereum_tx.go index 39f4b54b6..22b2d4b02 100644 --- a/usecase/event/msg_ethereum_tx.go +++ b/usecase/event/msg_ethereum_tx.go @@ -17,12 +17,12 @@ const MSG_ETHEREUM_TX_FAILED = "/ethermint.evm.v1.MsgEthereumTx.Failed" type MsgEthereumTx struct { MsgBase - Params model.MsgEthereumTxParams `json:"params"` + Params model.MsgLegacyTxParams `json:"params"` } func NewMsgEthereumTx( msgCommonParams MsgCommonParams, - params model.MsgEthereumTxParams, + params model.MsgLegacyTxParams, ) *MsgEthereumTx { return &MsgEthereumTx{ NewMsgBase(MsgBaseParams{ diff --git a/usecase/event/msg_ethereum_tx_test.go b/usecase/event/msg_ethereum_tx_test.go index d8d38d5b4..83fe584cd 100644 --- a/usecase/event/msg_ethereum_tx_test.go +++ b/usecase/event/msg_ethereum_tx_test.go @@ -19,7 +19,7 @@ var _ = Describe("Event", func() { anyTxHash := "2678437368AFC7E0E6D891D858F17B9C05CFEE850A786592A11992813D6A89FD" anyMsgIndex := 2 - anyParams := model.MsgEthereumTxParams{} + anyParams := model.MsgLegacyTxParams{} event := event_usecase.NewMsgEthereumTx(event_usecase.MsgCommonParams{ BlockHeight: anyHeight, @@ -51,7 +51,7 @@ var _ = Describe("Event", func() { anyTxHash := "2678437368AFC7E0E6D891D858F17B9C05CFEE850A786592A11992813D6A89FD" anyMsgIndex := 2 - anyParams := model.MsgEthereumTxParams{} + anyParams := model.MsgLegacyTxParams{} event := event_usecase.NewMsgEthereumTx(event_usecase.MsgCommonParams{ BlockHeight: anyHeight, diff --git a/usecase/model/msg_ethereum_tx.go b/usecase/model/msg_ethereum_tx.go index e87c7f9d1..cb222f46f 100644 --- a/usecase/model/msg_ethereum_tx.go +++ b/usecase/model/msg_ethereum_tx.go @@ -1,6 +1,6 @@ package model -type MsgEthereumTxParams struct { +type MsgLegacyTxParams struct { RawMsgEthereumTx } diff --git a/usecase/parser/msg.go b/usecase/parser/msg.go index 11eb1b2bc..ba3be1b79 100644 --- a/usecase/parser/msg.go +++ b/usecase/parser/msg.go @@ -128,6 +128,7 @@ func ParseBlockTxsMsgToCommands( // ethermint evm "/ethermint.evm.v1.MsgEthereumTx", + "/ethermint.types.v1.LegacyTx", "/ethermint.types.v1.DynamicFeeTx": parser := parserManager.GetParser(utils.CosmosParserKey(msgType.(string)), utils.ParserBlockHeight(blockHeight)) @@ -2114,6 +2115,28 @@ func ParseMsgCreateVestingAccount( func ParseMsgEthereumTx( parserParams utils.CosmosParserParams, +) ([]command.Command, []string) { + var cmds []command.Command + var possibleSignerAddresses []string + + data := parserParams.Msg["data"].(map[string]interface{}) + if data["@type"] == "/ethermint.evm.v1.LegacyTx" { + cmds, possibleSignerAddresses = ParseLegacyTx(parserParams.MsgCommonParams.TxSuccess, parserParams.MsgCommonParams, parserParams.Msg) + } else if data["@type"] == "/ethermint.evm.v1.DynamicFeeTx" { + cmds, possibleSignerAddresses = ParseExtensionOptionDynamicFeeTx(parserParams.MsgCommonParams.TxSuccess, parserParams.MsgCommonParams, parserParams.Msg) + } + + if !parserParams.MsgCommonParams.TxSuccess { + return cmds, possibleSignerAddresses + } + + return cmds, possibleSignerAddresses +} + +func ParseLegacyTx( + txSuccess bool, + msgCommonParams event.MsgCommonParams, + msg map[string]interface{}, ) ([]command.Command, []string) { var rawMsg model.RawMsgEthereumTx decoderConfig := &mapstructure.DecoderConfig{ @@ -2130,16 +2153,13 @@ func ParseMsgEthereumTx( if decoderErr != nil { panic(fmt.Errorf("error creating RawMsgEthereumTx decoder: %v", decoderErr)) } - if err := decoder.Decode(parserParams.Msg); err != nil { + if err := decoder.Decode(msg); err != nil { panic(fmt.Errorf("error decoding RawMsgEthereumTx: %v", err)) } - data := parserParams.Msg["data"].(map[string]interface{}) - fmt.Println("===> ", data["@type"]) - - if !parserParams.MsgCommonParams.TxSuccess { + if !txSuccess { // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 - msgEthereumTxParams := model.MsgEthereumTxParams{ + msgEthereumTxParams := model.MsgLegacyTxParams{ RawMsgEthereumTx: rawMsg, } @@ -2149,14 +2169,14 @@ func ParseMsgEthereumTx( // possibleSignerAddresses = append(possibleSignerAddresses, msgEthereumTxParams.From) return []command.Command{command_usecase.NewCreateMsgEthereumTx( - parserParams.MsgCommonParams, + msgCommonParams, msgEthereumTxParams, )}, possibleSignerAddresses } // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 - msgEthereumTxParams := model.MsgEthereumTxParams{ + msgEthereumTxParams := model.MsgLegacyTxParams{ RawMsgEthereumTx: rawMsg, } @@ -2166,14 +2186,16 @@ func ParseMsgEthereumTx( // possibleSignerAddresses = append(possibleSignerAddresses, msgEthereumTxParams.From) return []command.Command{command_usecase.NewCreateMsgEthereumTx( - parserParams.MsgCommonParams, + msgCommonParams, msgEthereumTxParams, )}, possibleSignerAddresses } func ParseExtensionOptionDynamicFeeTx( - parserParams utils.CosmosParserParams, + txSuccess bool, + msgCommonParams event.MsgCommonParams, + msg map[string]interface{}, ) ([]command.Command, []string) { var rawMsg model.RawDynamicFeeTx decoderConfig := &mapstructure.DecoderConfig{ @@ -2191,14 +2213,11 @@ func ParseExtensionOptionDynamicFeeTx( if decoderErr != nil { panic(fmt.Errorf("error creating RawMsgEthereumTx decoder: %v", decoderErr)) } - if err := decoder.Decode(parserParams.Msg); err != nil { + if err := decoder.Decode(msg); err != nil { panic(fmt.Errorf("error decoding RawMsgEthereumTx: %v", err)) } - // fmt.Println("===> ", parserParams.Msg["data"]) - data := parserParams.Msg["data"].(map[string]interface{}) - fmt.Println("===> ", data["@type"]) - if !parserParams.MsgCommonParams.TxSuccess { + if !txSuccess { // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 msgDynamicFeeTxParams := model.MsgDynamicFeeTxParams{ RawDynamicFeeTx: rawMsg, @@ -2210,7 +2229,7 @@ func ParseExtensionOptionDynamicFeeTx( // possibleSignerAddresses = append(possibleSignerAddresses, msgDynamicFeeTxParams.From) return []command.Command{command_usecase.NewCreateMsgExtensionOptionDynamicFeeTxTx( - parserParams.MsgCommonParams, + msgCommonParams, msgDynamicFeeTxParams, )}, possibleSignerAddresses @@ -2227,7 +2246,7 @@ func ParseExtensionOptionDynamicFeeTx( // possibleSignerAddresses = append(possibleSignerAddresses, msgDynamicFeeTxParams.From) return []command.Command{command_usecase.NewCreateMsgExtensionOptionDynamicFeeTxTx( - parserParams.MsgCommonParams, + msgCommonParams, msgDynamicFeeTxParams, )}, possibleSignerAddresses diff --git a/usecase/parser/msg_ethereum_tx_test.go b/usecase/parser/msg_ethereum_tx_test.go index 83663e99c..2146d8f19 100644 --- a/usecase/parser/msg_ethereum_tx_test.go +++ b/usecase/parser/msg_ethereum_tx_test.go @@ -6,6 +6,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + "github.com/crypto-com/chain-indexing/entity/command" "github.com/crypto-com/chain-indexing/infrastructure/tendermint" command_usecase "github.com/crypto-com/chain-indexing/usecase/command" "github.com/crypto-com/chain-indexing/usecase/event" @@ -52,7 +53,7 @@ var _ = Describe("ParseMsgCommands", func() { TxSuccess: true, MsgIndex: 0, }, - model.MsgEthereumTxParams{ + model.MsgLegacyTxParams{ RawMsgEthereumTx: model.RawMsgEthereumTx{ Type: "/ethermint.evm.v1.MsgEthereumTx", Size: 208, @@ -76,5 +77,63 @@ var _ = Describe("ParseMsgCommands", func() { var emptyAddress []string Expect(possibleSignerAddresses).To(Equal(emptyAddress)) }) + + It("should parse Msg commands when there is ethermint.ExtensionOptionDynamicFeeTx in the transaction", func() { + block, _ := mustParseBlockResp(usecase_parser_test.TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESP) + blockResults := mustParseBlockResultsResp( + usecase_parser_test.TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP, + ) + + tx := mustParseTxsResp(usecase_parser_test.TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TXS_RESP) + txs := []model.Tx{*tx} + + accountAddressPrefix := "tcro" + bondingDenom := "basetcro" + + pm := usecase_parser_test.InitParserManager() + + cmds, possibleSignerAddresses, err := parser.ParseBlockTxsMsgToCommands( + pm, + block.Height, + blockResults, + txs, + accountAddressPrefix, + bondingDenom, + ) + Expect(err).To(BeNil()) + Expect(cmds).To(HaveLen(1)) + Expect(cmds).To(Equal([]command.Command{command_usecase.NewCreateMsgExtensionOptionDynamicFeeTxTx( + event.MsgCommonParams{ + BlockHeight: int64(5168311), + TxHash: "3F1B98E6A43A3666699CA28DA2A0872E1478E092F7EC3FCF8A94202BB8B330D2", + TxSuccess: true, + MsgIndex: 0, + }, + model.MsgDynamicFeeTxParams{ + RawDynamicFeeTx: model.RawDynamicFeeTx{ + Type: "/ethermint.evm.v1.MsgEthereumTx", + Size: 0, + Data: model.DynamicFeeTx{ + Type: "/ethermint.evm.v1.DynamicFeeTx", + ChainId: "338", + Nonce: "115", + GasTipCap: "5000000000000", + GasFeeCap: "5000000000000", + Gas: "48834", + To: "0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a", + Value: "0", + Data: "CV6nswAAAAAAAAAAAAAAAPVk7wA0u3182EQSJ14eUTZNTXc0//////////////////////////////////////////8=", + V: "", + R: "HHigR02IN48gvEM991C/MOCmbVfOw9Sj804IhtI5z2Q=", + S: "SspHmiOAoM4bQdvAig9I8PQzLv5GTzElhcROppO0WpU=", + }, + From: "", + Hash: "0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53", + }, + }, + )})) + var emptyAddress []string + Expect(possibleSignerAddresses).To(Equal(emptyAddress)) + }) }) }) diff --git a/usecase/parser/msg_extension_option_dynamic_fee_tx_test.go b/usecase/parser/msg_extension_option_dynamic_fee_tx_test.go deleted file mode 100644 index 6397a84ba..000000000 --- a/usecase/parser/msg_extension_option_dynamic_fee_tx_test.go +++ /dev/null @@ -1,75 +0,0 @@ -package parser_test - -import ( - "github.com/crypto-com/chain-indexing/usecase/model" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "github.com/crypto-com/chain-indexing/entity/command" - command_usecase "github.com/crypto-com/chain-indexing/usecase/command" - "github.com/crypto-com/chain-indexing/usecase/event" - "github.com/crypto-com/chain-indexing/usecase/parser" - usecase_parser_test "github.com/crypto-com/chain-indexing/usecase/parser/test" -) - -var _ = Describe("ParseMsgCommands", func() { - Describe("ExtensionOptionDynamicFeeTx", func() { - It("should parse Msg commands when there is ethermint.ExtensionOptionDynamicFeeTx in the transaction", func() { - block, _ := mustParseBlockResp(usecase_parser_test.TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESP) - blockResults := mustParseBlockResultsResp( - usecase_parser_test.TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP, - ) - - tx := mustParseTxsResp(usecase_parser_test.TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TXS_RESP) - txs := []model.Tx{*tx} - - accountAddressPrefix := "tcro" - bondingDenom := "basetcro" - - pm := usecase_parser_test.InitParserManager() - - cmds, possibleSignerAddresses, err := parser.ParseBlockTxsMsgToCommands( - pm, - block.Height, - blockResults, - txs, - accountAddressPrefix, - bondingDenom, - ) - Expect(err).To(BeNil()) - Expect(cmds).To(HaveLen(1)) - Expect(cmds).To(Equal([]command.Command{command_usecase.NewCreateMsgExtensionOptionDynamicFeeTxTx( - event.MsgCommonParams{ - BlockHeight: int64(5168311), - TxHash: "3F1B98E6A43A3666699CA28DA2A0872E1478E092F7EC3FCF8A94202BB8B330D2", - TxSuccess: true, - MsgIndex: 0, - }, - model.MsgDynamicFeeTxParams{ - RawDynamicFeeTx: model.RawDynamicFeeTx{ - Type: "/ethermint.evm.v1.MsgEthereumTx", - Size: 0, - Data: model.DynamicFeeTx{ - Type: "/ethermint.evm.v1.DynamicFeeTx", - ChainId: "338", - Nonce: "115", - GasTipCap: "5000000000000", - GasFeeCap: "5000000000000", - Gas: "48834", - To: "0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a", - Value: "0", - Data: "CV6nswAAAAAAAAAAAAAAAPVk7wA0u3182EQSJ14eUTZNTXc0//////////////////////////////////////////8=", - V: "", - R: "HHigR02IN48gvEM991C/MOCmbVfOw9Sj804IhtI5z2Q=", - S: "SspHmiOAoM4bQdvAig9I8PQzLv5GTzElhcROppO0WpU=", - }, - From: "", - Hash: "0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53", - }, - }, - )})) - var emptyAddress []string - Expect(possibleSignerAddresses).To(Equal(emptyAddress)) - }) - }) -}) diff --git a/usecase/parser/register.go b/usecase/parser/register.go index 038af3463..89ddcd6c6 100644 --- a/usecase/parser/register.go +++ b/usecase/parser/register.go @@ -81,7 +81,6 @@ func InitParsers(manager *utils.CosmosParserManager) { // ethermint evm manager.RegisterParser("/ethermint.evm.v1.MsgEthereumTx", BEGIN_BLOCK_HEIGHT, ParseMsgEthereumTx) - manager.RegisterParser("/ethermint.types.v1.DynamicFeeTx", BEGIN_BLOCK_HEIGHT, ParseExtensionOptionDynamicFeeTx) } func RegisterBreakingVersionParsers(manager *utils.CosmosParserManager) { From 814f8c9efb8e8a5bad8dd84c9804cad7506fb75e Mon Sep 17 00:00:00 2001 From: vincentysc Date: Mon, 19 Sep 2022 14:57:29 +0800 Subject: [PATCH 05/15] fix filename --- ...c_fee_tx..go => create_msg_extension_option_dynamic_fee_tx.go} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename usecase/command/{create_msg_extension_option_dynamic_fee_tx..go => create_msg_extension_option_dynamic_fee_tx.go} (100%) diff --git a/usecase/command/create_msg_extension_option_dynamic_fee_tx..go b/usecase/command/create_msg_extension_option_dynamic_fee_tx.go similarity index 100% rename from usecase/command/create_msg_extension_option_dynamic_fee_tx..go rename to usecase/command/create_msg_extension_option_dynamic_fee_tx.go From 59ee1829774c1556a4595c0295e3d3af402d9692 Mon Sep 17 00:00:00 2001 From: vincentysc Date: Mon, 19 Sep 2022 15:24:15 +0800 Subject: [PATCH 06/15] update event and test case --- usecase/command/create_msg_extension_option_dynamic_fee_tx.go | 2 +- usecase/event/msg_extension_option_dynamic_fee_tx.go | 4 ---- usecase/parser/msg_ethereum_tx_test.go | 2 ++ 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/usecase/command/create_msg_extension_option_dynamic_fee_tx.go b/usecase/command/create_msg_extension_option_dynamic_fee_tx.go index 98cbda5d3..7a73f0ffa 100644 --- a/usecase/command/create_msg_extension_option_dynamic_fee_tx.go +++ b/usecase/command/create_msg_extension_option_dynamic_fee_tx.go @@ -22,7 +22,7 @@ func NewCreateMsgExtensionOptionDynamicFeeTxTx( } func (*CreateMsgExtensionOptionDynamicFeeTx) Name() string { - return "/ethermint.types.v1.DynamicFeeTx.Create" + return "/ethermint.evm.v1.MsgEthereumTx.Create" } func (*CreateMsgExtensionOptionDynamicFeeTx) Version() int { diff --git a/usecase/event/msg_extension_option_dynamic_fee_tx.go b/usecase/event/msg_extension_option_dynamic_fee_tx.go index 3d8115499..b27e8f8e8 100644 --- a/usecase/event/msg_extension_option_dynamic_fee_tx.go +++ b/usecase/event/msg_extension_option_dynamic_fee_tx.go @@ -10,10 +10,6 @@ import ( "github.com/luci/go-render/render" ) -const MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX = "/ethermint.types.v1.DynamicFeeTx" -const MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_CREATED = "/ethermint.types.v1.DynamicFeeTx.Created" -const MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_FAILED = "/ethermint.types.v1.DynamicFeeTx.Failed" - type MsgExtensionOptionDynamicFeeTx struct { MsgBase diff --git a/usecase/parser/msg_ethereum_tx_test.go b/usecase/parser/msg_ethereum_tx_test.go index 2146d8f19..e28b0e3f7 100644 --- a/usecase/parser/msg_ethereum_tx_test.go +++ b/usecase/parser/msg_ethereum_tx_test.go @@ -102,6 +102,8 @@ var _ = Describe("ParseMsgCommands", func() { ) Expect(err).To(BeNil()) Expect(cmds).To(HaveLen(1)) + cmd := cmds[0] + Expect(cmd.Name()).To(Equal("/ethermint.evm.v1.MsgEthereumTx.Create")) Expect(cmds).To(Equal([]command.Command{command_usecase.NewCreateMsgExtensionOptionDynamicFeeTxTx( event.MsgCommonParams{ BlockHeight: int64(5168311), From 7bcf87487a335014ee63eaafe9ef4892614fd1bf Mon Sep 17 00:00:00 2001 From: vincentysc Date: Tue, 20 Sep 2022 11:25:37 +0800 Subject: [PATCH 07/15] update naming --- usecase/command/create_msg_ethereum_tx.go | 22 +++++++-------- ...ate_msg_extension_option_dynamic_fee_tx.go | 2 +- ...ermint_extension_option_dynamic_fee_tx.go} | 22 +++++++++------ ..._ethereum_tx.go => ethermint_legacy_tx.go} | 28 +++++++++---------- usecase/event/events.go | 4 +-- usecase/event/msg_ethereum_tx_test.go | 20 ++++++------- usecase/event/msgevents.go | 6 ++-- usecase/model/msg_ethereum_tx.go | 4 +-- usecase/parser/msg.go | 12 ++++---- usecase/parser/msg_ethereum_tx_test.go | 14 +++++----- usecase/parser/register.go | 2 +- usecase/parser/test/tx_msg_ethereum_tx.go | 4 +-- .../tx_msg_extension_option_dynamic_fee_tx.go | 10 +++---- ...knowledgement_duplicate_packet_sequence.go | 28 +++++++++---------- 14 files changed, 91 insertions(+), 87 deletions(-) rename usecase/event/{msg_extension_option_dynamic_fee_tx.go => ethermint_extension_option_dynamic_fee_tx.go} (55%) rename usecase/event/{msg_ethereum_tx.go => ethermint_legacy_tx.go} (55%) diff --git a/usecase/command/create_msg_ethereum_tx.go b/usecase/command/create_msg_ethereum_tx.go index 662f9da52..1ed6d1049 100644 --- a/usecase/command/create_msg_ethereum_tx.go +++ b/usecase/command/create_msg_ethereum_tx.go @@ -6,30 +6,30 @@ import ( "github.com/crypto-com/chain-indexing/usecase/model" ) -type CreateMsgEthereumTx struct { +type CreateLegacyTx struct { msgCommonParams event.MsgCommonParams - params model.MsgLegacyTxParams + params model.EthermintLegacyTxParams } -func NewCreateMsgEthereumTx( +func NewCreateLegacyTx( msgCommonParams event.MsgCommonParams, - params model.MsgLegacyTxParams, -) *CreateMsgEthereumTx { - return &CreateMsgEthereumTx{ + params model.EthermintLegacyTxParams, +) *CreateLegacyTx { + return &CreateLegacyTx{ msgCommonParams, params, } } -func (*CreateMsgEthereumTx) Name() string { - return "/ethermint.evm.v1.MsgEthereumTx.Create" +func (*CreateLegacyTx) Name() string { + return "/ethermint.evm.v1.LegacyTx.Create" } -func (*CreateMsgEthereumTx) Version() int { +func (*CreateLegacyTx) Version() int { return 1 } -func (cmd *CreateMsgEthereumTx) Exec() (entity_event.Event, error) { - event := event.NewMsgEthereumTx(cmd.msgCommonParams, cmd.params) +func (cmd *CreateLegacyTx) Exec() (entity_event.Event, error) { + event := event.NewEthermintLegacyx(cmd.msgCommonParams, cmd.params) return event, nil } diff --git a/usecase/command/create_msg_extension_option_dynamic_fee_tx.go b/usecase/command/create_msg_extension_option_dynamic_fee_tx.go index 7a73f0ffa..c009b41a5 100644 --- a/usecase/command/create_msg_extension_option_dynamic_fee_tx.go +++ b/usecase/command/create_msg_extension_option_dynamic_fee_tx.go @@ -22,7 +22,7 @@ func NewCreateMsgExtensionOptionDynamicFeeTxTx( } func (*CreateMsgExtensionOptionDynamicFeeTx) Name() string { - return "/ethermint.evm.v1.MsgEthereumTx.Create" + return "/ethermint.evm.v1.DynamicFeeTx.Create" } func (*CreateMsgExtensionOptionDynamicFeeTx) Version() int { diff --git a/usecase/event/msg_extension_option_dynamic_fee_tx.go b/usecase/event/ethermint_extension_option_dynamic_fee_tx.go similarity index 55% rename from usecase/event/msg_extension_option_dynamic_fee_tx.go rename to usecase/event/ethermint_extension_option_dynamic_fee_tx.go index b27e8f8e8..190f9316b 100644 --- a/usecase/event/msg_extension_option_dynamic_fee_tx.go +++ b/usecase/event/ethermint_extension_option_dynamic_fee_tx.go @@ -10,19 +10,23 @@ import ( "github.com/luci/go-render/render" ) -type MsgExtensionOptionDynamicFeeTx struct { +const DYNAMIC_FEE_TX = "/ethermint.evm.v1.DynamicFeeTx" +const DYNAMIC_FEE_TX_CREATED = "/ethermint.evm.v1.DynamicFeeTx.Created" +const DYNAMIC_FEE_TX_FAILED = "/ethermint.evm.v1.DynamicFeeTx.Failed" + +type EthermintExtensionOptionDynamicFeeTx struct { MsgBase Params model.MsgDynamicFeeTxParams `json:"params"` } -func NewMsgExtensionOptionDynamicFeeTx( +func NewEthermintExtensionOptionDynamicFeeTx( msgCommonParams MsgCommonParams, params model.MsgDynamicFeeTxParams, -) *MsgExtensionOptionDynamicFeeTx { - return &MsgExtensionOptionDynamicFeeTx{ +) *EthermintExtensionOptionDynamicFeeTx { + return &EthermintExtensionOptionDynamicFeeTx{ NewMsgBase(MsgBaseParams{ - MsgName: MSG_ETHEREUM_TX, + MsgName: DYNAMIC_FEE_TX, Version: 1, MsgCommonParams: msgCommonParams, }), @@ -32,7 +36,7 @@ func NewMsgExtensionOptionDynamicFeeTx( } // ToJSON encodes the event into JSON string payload -func (event *MsgExtensionOptionDynamicFeeTx) ToJSON() (string, error) { +func (event *EthermintExtensionOptionDynamicFeeTx) ToJSON() (string, error) { encoded, err := jsoniter.Marshal(event) if err != nil { return "", err @@ -41,15 +45,15 @@ func (event *MsgExtensionOptionDynamicFeeTx) ToJSON() (string, error) { return string(encoded), nil } -func (event *MsgExtensionOptionDynamicFeeTx) String() string { +func (event *EthermintExtensionOptionDynamicFeeTx) String() string { return render.Render(event) } -func DecodeMsgExtensionOptionDynamicFeeTx(encoded []byte) (entity_event.Event, error) { +func DecodeEthermintExtensionOptionDynamicFeeTx(encoded []byte) (entity_event.Event, error) { jsonDecoder := jsoniter.NewDecoder(bytes.NewReader(encoded)) jsonDecoder.DisallowUnknownFields() - var event *MsgExtensionOptionDynamicFeeTx + var event *EthermintExtensionOptionDynamicFeeTx if err := jsonDecoder.Decode(&event); err != nil { return nil, err } diff --git a/usecase/event/msg_ethereum_tx.go b/usecase/event/ethermint_legacy_tx.go similarity index 55% rename from usecase/event/msg_ethereum_tx.go rename to usecase/event/ethermint_legacy_tx.go index 22b2d4b02..e67f276d2 100644 --- a/usecase/event/msg_ethereum_tx.go +++ b/usecase/event/ethermint_legacy_tx.go @@ -10,23 +10,23 @@ import ( "github.com/luci/go-render/render" ) -const MSG_ETHEREUM_TX = "/ethermint.evm.v1.MsgEthereumTx" -const MSG_ETHEREUM_TX_CREATED = "/ethermint.evm.v1.MsgEthereumTx.Created" -const MSG_ETHEREUM_TX_FAILED = "/ethermint.evm.v1.MsgEthereumTx.Failed" +const LEGACY_TX = "/ethermint.evm.v1.LegacyTx" +const LEGACY_TX_CREATED = "/ethermint.evm.v1.LegacyTx.Created" +const LEGACY_TX_FAILED = "/ethermint.evm.v1.LegacyTx.Failed" -type MsgEthereumTx struct { +type EthermintLegacyTx struct { MsgBase - Params model.MsgLegacyTxParams `json:"params"` + Params model.EthermintLegacyTxParams `json:"params"` } -func NewMsgEthereumTx( +func NewEthermintLegacyx( msgCommonParams MsgCommonParams, - params model.MsgLegacyTxParams, -) *MsgEthereumTx { - return &MsgEthereumTx{ + params model.EthermintLegacyTxParams, +) *EthermintLegacyTx { + return &EthermintLegacyTx{ NewMsgBase(MsgBaseParams{ - MsgName: MSG_ETHEREUM_TX, + MsgName: LEGACY_TX, Version: 1, MsgCommonParams: msgCommonParams, }), @@ -36,7 +36,7 @@ func NewMsgEthereumTx( } // ToJSON encodes the event into JSON string payload -func (event *MsgEthereumTx) ToJSON() (string, error) { +func (event *EthermintLegacyTx) ToJSON() (string, error) { encoded, err := jsoniter.Marshal(event) if err != nil { return "", err @@ -45,15 +45,15 @@ func (event *MsgEthereumTx) ToJSON() (string, error) { return string(encoded), nil } -func (event *MsgEthereumTx) String() string { +func (event *EthermintLegacyTx) String() string { return render.Render(event) } -func DecodeMsgEthereumTx(encoded []byte) (entity_event.Event, error) { +func DecodeEthermintLegacyTx(encoded []byte) (entity_event.Event, error) { jsonDecoder := jsoniter.NewDecoder(bytes.NewReader(encoded)) jsonDecoder.DisallowUnknownFields() - var event *MsgEthereumTx + var event *EthermintLegacyTx if err := jsonDecoder.Decode(&event); err != nil { return nil, err } diff --git a/usecase/event/events.go b/usecase/event/events.go index 4aff66cee..44a709e65 100644 --- a/usecase/event/events.go +++ b/usecase/event/events.go @@ -161,6 +161,6 @@ func RegisterEvents(registry *event.Registry) { registry.Register(CRONOS_SEND_TO_IBC_CREATED, 1, DecodeCronosSendToIBCCreated) // Ethermint tx - registry.Register(MSG_ETHEREUM_TX_CREATED, 1, DecodeMsgEthereumTx) - registry.Register(MSG_ETHEREUM_TX_FAILED, 1, DecodeMsgEthereumTx) + registry.Register(LEGACY_TX_CREATED, 1, DecodeEthermintLegacyTx) + registry.Register(LEGACY_TX_FAILED, 1, DecodeEthermintLegacyTx) } diff --git a/usecase/event/msg_ethereum_tx_test.go b/usecase/event/msg_ethereum_tx_test.go index 83fe584cd..944753387 100644 --- a/usecase/event/msg_ethereum_tx_test.go +++ b/usecase/event/msg_ethereum_tx_test.go @@ -19,9 +19,9 @@ var _ = Describe("Event", func() { anyTxHash := "2678437368AFC7E0E6D891D858F17B9C05CFEE850A786592A11992813D6A89FD" anyMsgIndex := 2 - anyParams := model.MsgLegacyTxParams{} + anyParams := model.EthermintLegacyTxParams{} - event := event_usecase.NewMsgEthereumTx(event_usecase.MsgCommonParams{ + event := event_usecase.NewEthermintLegacyx(event_usecase.MsgCommonParams{ BlockHeight: anyHeight, TxHash: anyTxHash, TxSuccess: true, @@ -32,12 +32,12 @@ var _ = Describe("Event", func() { Expect(err).To(BeNil()) decodedEvent, err := registry.DecodeByType( - event_usecase.MSG_ETHEREUM_TX_CREATED, 1, []byte(encoded), + event_usecase.LEGACY_TX_CREATED, 1, []byte(encoded), ) Expect(err).To(BeNil()) Expect(decodedEvent).To(Equal(event)) - typedEvent, _ := decodedEvent.(*event_usecase.MsgEthereumTx) - Expect(typedEvent.Name()).To(Equal(event_usecase.MSG_ETHEREUM_TX_CREATED)) + typedEvent, _ := decodedEvent.(*event_usecase.EthermintLegacyTx) + Expect(typedEvent.Name()).To(Equal(event_usecase.LEGACY_TX_CREATED)) Expect(typedEvent.Version()).To(Equal(1)) Expect(typedEvent.TxSuccess()).To(BeTrue()) Expect(typedEvent.TxHash()).To(Equal(anyTxHash)) @@ -51,9 +51,9 @@ var _ = Describe("Event", func() { anyTxHash := "2678437368AFC7E0E6D891D858F17B9C05CFEE850A786592A11992813D6A89FD" anyMsgIndex := 2 - anyParams := model.MsgLegacyTxParams{} + anyParams := model.EthermintLegacyTxParams{} - event := event_usecase.NewMsgEthereumTx(event_usecase.MsgCommonParams{ + event := event_usecase.NewEthermintLegacyx(event_usecase.MsgCommonParams{ BlockHeight: anyHeight, TxHash: anyTxHash, TxSuccess: false, @@ -64,12 +64,12 @@ var _ = Describe("Event", func() { Expect(err).To(BeNil()) decodedEvent, err := registry.DecodeByType( - event_usecase.MSG_ETHEREUM_TX_FAILED, 1, []byte(encoded), + event_usecase.LEGACY_TX_FAILED, 1, []byte(encoded), ) Expect(err).To(BeNil()) Expect(decodedEvent).To(Equal(event)) - typedEvent, _ := decodedEvent.(*event_usecase.MsgEthereumTx) - Expect(typedEvent.Name()).To(Equal(event_usecase.MSG_ETHEREUM_TX_FAILED)) + typedEvent, _ := decodedEvent.(*event_usecase.EthermintLegacyTx) + Expect(typedEvent.Name()).To(Equal(event_usecase.LEGACY_TX_FAILED)) Expect(typedEvent.Version()).To(Equal(1)) Expect(typedEvent.TxSuccess()).To(BeFalse()) Expect(typedEvent.TxHash()).To(Equal(anyTxHash)) diff --git a/usecase/event/msgevents.go b/usecase/event/msgevents.go index 4d5601878..7b22e35a1 100644 --- a/usecase/event/msgevents.go +++ b/usecase/event/msgevents.go @@ -121,6 +121,8 @@ var MSG_EVENTS = []string{ MSG_REVOKE_ALLOWANCE_FAILED, MSG_CREATE_VESTING_ACCOUNT_CREATED, MSG_CREATE_VESTING_ACCOUNT_FAILED, - MSG_ETHEREUM_TX_CREATED, - MSG_ETHEREUM_TX_FAILED, + LEGACY_TX_CREATED, + LEGACY_TX_FAILED, + DYNAMIC_FEE_TX_CREATED, + DYNAMIC_FEE_TX_FAILED, } diff --git a/usecase/model/msg_ethereum_tx.go b/usecase/model/msg_ethereum_tx.go index cb222f46f..84c6de3f9 100644 --- a/usecase/model/msg_ethereum_tx.go +++ b/usecase/model/msg_ethereum_tx.go @@ -1,6 +1,6 @@ package model -type MsgLegacyTxParams struct { +type EthermintLegacyTxParams struct { RawMsgEthereumTx } @@ -13,7 +13,7 @@ type RawMsgEthereumTx struct { Hash string `mapstructure:"hash" json:"hash"` } -type MsgEthereumTx struct { +type EthermintLegacyTx struct { Denom string `mapstructure:"denom" json:"denom,omitempty"` Amount string `mapstructure:"amount" json:"amount"` } diff --git a/usecase/parser/msg.go b/usecase/parser/msg.go index ba3be1b79..1af9dc3d9 100644 --- a/usecase/parser/msg.go +++ b/usecase/parser/msg.go @@ -127,9 +127,7 @@ func ParseBlockTxsMsgToCommands( "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", // ethermint evm - "/ethermint.evm.v1.MsgEthereumTx", - "/ethermint.types.v1.LegacyTx", - "/ethermint.types.v1.DynamicFeeTx": + "/ethermint.evm.v1.EthermintLegacyTx": parser := parserManager.GetParser(utils.CosmosParserKey(msgType.(string)), utils.ParserBlockHeight(blockHeight)) msgCommands, possibleSignerAddresses = parser(utils.CosmosParserParams{ @@ -2159,7 +2157,7 @@ func ParseLegacyTx( if !txSuccess { // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 - msgEthereumTxParams := model.MsgLegacyTxParams{ + msgEthereumTxParams := model.EthermintLegacyTxParams{ RawMsgEthereumTx: rawMsg, } @@ -2168,7 +2166,7 @@ func ParseLegacyTx( // FIXME: https://github.com/crypto-com/chain-indexing/issues/729 // possibleSignerAddresses = append(possibleSignerAddresses, msgEthereumTxParams.From) - return []command.Command{command_usecase.NewCreateMsgEthereumTx( + return []command.Command{command_usecase.NewCreateLegacyTx( msgCommonParams, msgEthereumTxParams, @@ -2176,7 +2174,7 @@ func ParseLegacyTx( } // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 - msgEthereumTxParams := model.MsgLegacyTxParams{ + msgEthereumTxParams := model.EthermintLegacyTxParams{ RawMsgEthereumTx: rawMsg, } @@ -2185,7 +2183,7 @@ func ParseLegacyTx( // FIXME: https://github.com/crypto-com/chain-indexing/issues/729 // possibleSignerAddresses = append(possibleSignerAddresses, msgEthereumTxParams.From) - return []command.Command{command_usecase.NewCreateMsgEthereumTx( + return []command.Command{command_usecase.NewCreateLegacyTx( msgCommonParams, msgEthereumTxParams, diff --git a/usecase/parser/msg_ethereum_tx_test.go b/usecase/parser/msg_ethereum_tx_test.go index e28b0e3f7..542af6a48 100644 --- a/usecase/parser/msg_ethereum_tx_test.go +++ b/usecase/parser/msg_ethereum_tx_test.go @@ -17,7 +17,7 @@ import ( var _ = Describe("ParseMsgCommands", func() { Describe("MsgExec", func() { - It("should parse Msg commands when there is MsgEthereumTx in the transaction", func() { + It("should parse Msg commands when there is EthermintLegacyTx in the transaction", func() { block, _, _ := tendermint.ParseBlockResp(strings.NewReader( usecase_parser_test.TX_MSG_ETHEREUM_TX_BLOCK_RESP, )) @@ -44,18 +44,18 @@ var _ = Describe("ParseMsgCommands", func() { Expect(err).To(BeNil()) Expect(cmds).To(HaveLen(1)) cmd := cmds[0] - Expect(cmd.Name()).To(Equal("/ethermint.evm.v1.MsgEthereumTx.Create")) + Expect(cmd.Name()).To(Equal("/ethermint.evm.v1.EthermintLegacyTx.Create")) - Expect(cmd).To(Equal(command_usecase.NewCreateMsgEthereumTx( + Expect(cmd).To(Equal(command_usecase.NewCreateLegacyTx( event.MsgCommonParams{ BlockHeight: int64(83178), TxHash: "2678437368AFC7E0E6D891D858F17B9C05CFEE850A786592A11992813D6A89FD", TxSuccess: true, MsgIndex: 0, }, - model.MsgLegacyTxParams{ + model.EthermintLegacyTxParams{ RawMsgEthereumTx: model.RawMsgEthereumTx{ - Type: "/ethermint.evm.v1.MsgEthereumTx", + Type: "/ethermint.evm.v1.EthermintLegacyTx", Size: 208, Data: model.LegacyTx{ Type: "/ethermint.evm.v1.LegacyTx", @@ -103,7 +103,7 @@ var _ = Describe("ParseMsgCommands", func() { Expect(err).To(BeNil()) Expect(cmds).To(HaveLen(1)) cmd := cmds[0] - Expect(cmd.Name()).To(Equal("/ethermint.evm.v1.MsgEthereumTx.Create")) + Expect(cmd.Name()).To(Equal("/ethermint.evm.v1.EthermintLegacyTx.Create")) Expect(cmds).To(Equal([]command.Command{command_usecase.NewCreateMsgExtensionOptionDynamicFeeTxTx( event.MsgCommonParams{ BlockHeight: int64(5168311), @@ -113,7 +113,7 @@ var _ = Describe("ParseMsgCommands", func() { }, model.MsgDynamicFeeTxParams{ RawDynamicFeeTx: model.RawDynamicFeeTx{ - Type: "/ethermint.evm.v1.MsgEthereumTx", + Type: "/ethermint.evm.v1.EthermintLegacyTx", Size: 0, Data: model.DynamicFeeTx{ Type: "/ethermint.evm.v1.DynamicFeeTx", diff --git a/usecase/parser/register.go b/usecase/parser/register.go index 89ddcd6c6..509290ebc 100644 --- a/usecase/parser/register.go +++ b/usecase/parser/register.go @@ -80,7 +80,7 @@ func InitParsers(manager *utils.CosmosParserManager) { manager.RegisterParser("/cosmos.vesting.v1beta1.MsgCreateVestingAccount", BEGIN_BLOCK_HEIGHT, ParseMsgCreateVestingAccount) // ethermint evm - manager.RegisterParser("/ethermint.evm.v1.MsgEthereumTx", BEGIN_BLOCK_HEIGHT, ParseMsgEthereumTx) + manager.RegisterParser("/ethermint.evm.v1.EthermintLegacyTx", BEGIN_BLOCK_HEIGHT, ParseMsgEthereumTx) } func RegisterBreakingVersionParsers(manager *utils.CosmosParserManager) { diff --git a/usecase/parser/test/tx_msg_ethereum_tx.go b/usecase/parser/test/tx_msg_ethereum_tx.go index d2c3d4d2b..83e2d8723 100644 --- a/usecase/parser/test/tx_msg_ethereum_tx.go +++ b/usecase/parser/test/tx_msg_ethereum_tx.go @@ -1091,7 +1091,7 @@ const TX_MSG_ETHEREUM_TX_TXS_RESP = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "130", @@ -1211,7 +1211,7 @@ const TX_MSG_ETHEREUM_TX_TXS_RESP = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "130", diff --git a/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go b/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go index 585c484c4..074ceceb1 100644 --- a/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go +++ b/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go @@ -118,7 +118,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = `{ { "code": 0, "data": "EsAECicvZXRoZXJtaW50LmV2bS52MS5Nc2dFdGhlcmV1bVR4UmVzcG9uc2USlAQKQjB4ZDU2ZGI2NTY3MmE0OGRhYWYxNGY3NDNmNTNjMzE2YTNlYmExMzBkNzJiZWI3MDM0Mjk2ZjRlYTNmN2U0OWI1MxKnAwoqMHg5MDRCZDVhNUFBQzBCOWQ4OEEwRDQ3ODY0NzI0MjE4OTg2QWQ0YTNhEkIweDhjNWJlMWU1ZWJlYzdkNWJkMTRmNzE0MjdkMWU4NGYzZGQwMzE0YzBmN2IyMjkxZTViMjAwYWM4YzdjM2I5MjUSQjB4MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwZTA4OWQxYTBkMTUxYTEzZDgxMmVhNGU4ZDY0OGYxZGM1OGI0MWNhORJCMHgwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBmNTY0ZWYwMDM0YmI3ZDdjZDg0NDEyMjc1ZTFlNTEzNjRkNGQ3NzM0GiD//////////////////////////////////////////yC3ubsCKkIweGQ1NmRiNjU2NzJhNDhkYWFmMTRmNzQzZjUzYzMxNmEzZWJhMTMwZDcyYmViNzAzNDI5NmY0ZWEzZjdlNDliNTM6QjB4YmFlOTljYmE2ZTkwOGE2YWEyZmZmNWVmOWY4MjZhYzgxYTMwZGRmOTcxN2M0OTY2YTFjMGU5YzYxMmI4NDgxNBogAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEo69oC", - "log": "[{\"msg_index\":0,\"events\":[{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"ethereum_tx\",\"attributes\":[{\"key\":\"amount\",\"value\":\"0\"},{\"key\":\"ethereumTxHash\",\"value\":\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\"},{\"key\":\"txIndex\",\"value\":\"0\"},{\"key\":\"txGasUsed\",\"value\":\"44395\"},{\"key\":\"txHash\",\"value\":\"3F1B98E6A43A3666699CA28DA2A0872E1478E092F7EC3FCF8A94202BB8B330D2\"},{\"key\":\"recipient\",\"value\":\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/ethermint.evm.v1.MsgEthereumTx\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"module\",\"value\":\"evm\"},{\"key\":\"sender\",\"value\":\"0xE089d1a0d151A13D812eA4e8D648f1Dc58B41ca9\"},{\"key\":\"txType\",\"value\":\"2\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"tx_log\",\"attributes\":[{\"key\":\"txLog\",\"value\":\"{\\\"address\\\":\\\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\\\",\\\"topics\\\":[\\\"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\\\",\\\"0x000000000000000000000000e089d1a0d151a13d812ea4e8d648f1dc58b41ca9\\\",\\\"0x000000000000000000000000f564ef0034bb7d7cd84412275e1e51364d4d7734\\\"],\\\"data\\\":\\\"//////////////////////////////////////////8=\\\",\\\"blockNumber\\\":5168311,\\\"transactionHash\\\":\\\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\\\",\\\"transactionIndex\\\":0,\\\"blockHash\\\":\\\"0xbae99cba6e908a6aa2fff5ef9f826ac81a30ddf9717c4966a1c0e9c612b84814\\\",\\\"logIndex\\\":0}\"}]}]}]", + "log": "[{\"msg_index\":0,\"events\":[{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"ethereum_tx\",\"attributes\":[{\"key\":\"amount\",\"value\":\"0\"},{\"key\":\"ethereumTxHash\",\"value\":\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\"},{\"key\":\"txIndex\",\"value\":\"0\"},{\"key\":\"txGasUsed\",\"value\":\"44395\"},{\"key\":\"txHash\",\"value\":\"3F1B98E6A43A3666699CA28DA2A0872E1478E092F7EC3FCF8A94202BB8B330D2\"},{\"key\":\"recipient\",\"value\":\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/ethermint.evm.v1.EthermintLegacyTx\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"module\",\"value\":\"evm\"},{\"key\":\"sender\",\"value\":\"0xE089d1a0d151A13D812eA4e8D648f1Dc58B41ca9\"},{\"key\":\"txType\",\"value\":\"2\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"tx_log\",\"attributes\":[{\"key\":\"txLog\",\"value\":\"{\\\"address\\\":\\\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\\\",\\\"topics\\\":[\\\"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\\\",\\\"0x000000000000000000000000e089d1a0d151a13d812ea4e8d648f1dc58b41ca9\\\",\\\"0x000000000000000000000000f564ef0034bb7d7cd84412275e1e51364d4d7734\\\"],\\\"data\\\":\\\"//////////////////////////////////////////8=\\\",\\\"blockNumber\\\":5168311,\\\"transactionHash\\\":\\\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\\\",\\\"transactionIndex\\\":0,\\\"blockHash\\\":\\\"0xbae99cba6e908a6aa2fff5ef9f826ac81a30ddf9717c4966a1c0e9c612b84814\\\",\\\"logIndex\\\":0}\"}]}]}]", "info": "", "gas_wanted": "48834", "gas_used": "44395", @@ -843,7 +843,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TXS_RESP = ` "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.DynamicFeeTx", "chain_id": "338", @@ -896,7 +896,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TXS_RESP = ` "codespace": "", "code": 0, "data": "12C0040A272F65746865726D696E742E65766D2E76312E4D7367457468657265756D5478526573706F6E73651294040A4230786435366462363536373261343864616166313466373433663533633331366133656261313330643732626562373033343239366634656133663765343962353312A7030A2A3078393034426435613541414330423964383841304434373836343732343231383938364164346133611242307838633562653165356562656337643562643134663731343237643165383466336464303331346330663762323239316535623230306163386337633362393235124230783030303030303030303030303030303030303030303030306530383964316130643135316131336438313265613465386436343866316463353862343163613912423078303030303030303030303030303030303030303030303030663536346566303033346262376437636438343431323237356531653531333634643464373733341A20FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF20B7B9BB022A423078643536646236353637326134386461616631346637343366353363333136613365626131333064373262656237303334323936663465613366376534396235333A423078626165393963626136653930386136616132666666356566396638323661633831613330646466393731376334393636613163306539633631326238343831341A20000000000000000000000000000000000000000000000000000000000000000128EBDA02", - "raw_log": "[{\"msg_index\":0,\"events\":[{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"ethereum_tx\",\"attributes\":[{\"key\":\"amount\",\"value\":\"0\"},{\"key\":\"ethereumTxHash\",\"value\":\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\"},{\"key\":\"txIndex\",\"value\":\"0\"},{\"key\":\"txGasUsed\",\"value\":\"44395\"},{\"key\":\"txHash\",\"value\":\"3F1B98E6A43A3666699CA28DA2A0872E1478E092F7EC3FCF8A94202BB8B330D2\"},{\"key\":\"recipient\",\"value\":\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/ethermint.evm.v1.MsgEthereumTx\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"module\",\"value\":\"evm\"},{\"key\":\"sender\",\"value\":\"0xE089d1a0d151A13D812eA4e8D648f1Dc58B41ca9\"},{\"key\":\"txType\",\"value\":\"2\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"tx_log\",\"attributes\":[{\"key\":\"txLog\",\"value\":\"{\\\"address\\\":\\\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\\\",\\\"topics\\\":[\\\"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\\\",\\\"0x000000000000000000000000e089d1a0d151a13d812ea4e8d648f1dc58b41ca9\\\",\\\"0x000000000000000000000000f564ef0034bb7d7cd84412275e1e51364d4d7734\\\"],\\\"data\\\":\\\"//////////////////////////////////////////8=\\\",\\\"blockNumber\\\":5168311,\\\"transactionHash\\\":\\\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\\\",\\\"transactionIndex\\\":0,\\\"blockHash\\\":\\\"0xbae99cba6e908a6aa2fff5ef9f826ac81a30ddf9717c4966a1c0e9c612b84814\\\",\\\"logIndex\\\":0}\"}]}]}]", + "raw_log": "[{\"msg_index\":0,\"events\":[{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"ethereum_tx\",\"attributes\":[{\"key\":\"amount\",\"value\":\"0\"},{\"key\":\"ethereumTxHash\",\"value\":\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\"},{\"key\":\"txIndex\",\"value\":\"0\"},{\"key\":\"txGasUsed\",\"value\":\"44395\"},{\"key\":\"txHash\",\"value\":\"3F1B98E6A43A3666699CA28DA2A0872E1478E092F7EC3FCF8A94202BB8B330D2\"},{\"key\":\"recipient\",\"value\":\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/ethermint.evm.v1.EthermintLegacyTx\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"module\",\"value\":\"evm\"},{\"key\":\"sender\",\"value\":\"0xE089d1a0d151A13D812eA4e8D648f1Dc58B41ca9\"},{\"key\":\"txType\",\"value\":\"2\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"tx_log\",\"attributes\":[{\"key\":\"txLog\",\"value\":\"{\\\"address\\\":\\\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\\\",\\\"topics\\\":[\\\"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\\\",\\\"0x000000000000000000000000e089d1a0d151a13d812ea4e8d648f1dc58b41ca9\\\",\\\"0x000000000000000000000000f564ef0034bb7d7cd84412275e1e51364d4d7734\\\"],\\\"data\\\":\\\"//////////////////////////////////////////8=\\\",\\\"blockNumber\\\":5168311,\\\"transactionHash\\\":\\\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\\\",\\\"transactionIndex\\\":0,\\\"blockHash\\\":\\\"0xbae99cba6e908a6aa2fff5ef9f826ac81a30ddf9717c4966a1c0e9c612b84814\\\",\\\"logIndex\\\":0}\"}]}]}]", "logs": [ { "msg_index": 0, @@ -962,7 +962,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TXS_RESP = ` "attributes": [ { "key": "action", - "value": "/ethermint.evm.v1.MsgEthereumTx" + "value": "/ethermint.evm.v1.EthermintLegacyTx" }, { "key": "sender", @@ -1019,7 +1019,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TXS_RESP = ` "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.DynamicFeeTx", "chain_id": "338", diff --git a/usecase/parser/test/tx_msg_ibc_acknowledgement_duplicate_packet_sequence.go b/usecase/parser/test/tx_msg_ibc_acknowledgement_duplicate_packet_sequence.go index e0a01d5b9..8dfb38b2d 100644 --- a/usecase/parser/test/tx_msg_ibc_acknowledgement_duplicate_packet_sequence.go +++ b/usecase/parser/test/tx_msg_ibc_acknowledgement_duplicate_packet_sequence.go @@ -3702,7 +3702,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_1 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "14", @@ -3877,7 +3877,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_1 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "14", @@ -4139,7 +4139,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_2 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "55", @@ -4314,7 +4314,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_2 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "55", @@ -4576,7 +4576,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_3 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "71", @@ -4755,7 +4755,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_3 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "71", @@ -5022,7 +5022,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_4 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "33", @@ -5225,7 +5225,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_4 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "33", @@ -5522,7 +5522,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_5 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "97", @@ -5701,7 +5701,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_5 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "97", @@ -5968,7 +5968,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_6 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "0", @@ -6353,7 +6353,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_6 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "0", @@ -17270,7 +17270,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_10 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "12", @@ -17437,7 +17437,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_10 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.MsgEthereumTx", + "@type": "/ethermint.evm.v1.EthermintLegacyTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "12", From 795adeb32d750a637c3fbe82ecb2c8d3c0e6f1ca Mon Sep 17 00:00:00 2001 From: vincentysc Date: Tue, 20 Sep 2022 11:28:13 +0800 Subject: [PATCH 08/15] update naming --- ...eate_msg_extension_option_dynamic_fee_tx.go | 4 ++-- ...thermint_extension_option_dynamic_fee_tx.go | 4 ++-- usecase/model/msg_ethereum_tx.go | 6 +++--- usecase/parser/msg.go | 18 +++++++++--------- usecase/parser/msg_ethereum_tx_test.go | 4 ++-- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/usecase/command/create_msg_extension_option_dynamic_fee_tx.go b/usecase/command/create_msg_extension_option_dynamic_fee_tx.go index c009b41a5..f7b9ff533 100644 --- a/usecase/command/create_msg_extension_option_dynamic_fee_tx.go +++ b/usecase/command/create_msg_extension_option_dynamic_fee_tx.go @@ -8,12 +8,12 @@ import ( type CreateMsgExtensionOptionDynamicFeeTx struct { msgCommonParams event.MsgCommonParams - params model.MsgDynamicFeeTxParams + params model.EthermintDynamicFeeTxParams } func NewCreateMsgExtensionOptionDynamicFeeTxTx( msgCommonParams event.MsgCommonParams, - params model.MsgDynamicFeeTxParams, + params model.EthermintDynamicFeeTxParams, ) *CreateMsgExtensionOptionDynamicFeeTx { return &CreateMsgExtensionOptionDynamicFeeTx{ msgCommonParams, diff --git a/usecase/event/ethermint_extension_option_dynamic_fee_tx.go b/usecase/event/ethermint_extension_option_dynamic_fee_tx.go index 190f9316b..e624d8c45 100644 --- a/usecase/event/ethermint_extension_option_dynamic_fee_tx.go +++ b/usecase/event/ethermint_extension_option_dynamic_fee_tx.go @@ -17,12 +17,12 @@ const DYNAMIC_FEE_TX_FAILED = "/ethermint.evm.v1.DynamicFeeTx.Failed" type EthermintExtensionOptionDynamicFeeTx struct { MsgBase - Params model.MsgDynamicFeeTxParams `json:"params"` + Params model.EthermintDynamicFeeTxParams `json:"params"` } func NewEthermintExtensionOptionDynamicFeeTx( msgCommonParams MsgCommonParams, - params model.MsgDynamicFeeTxParams, + params model.EthermintDynamicFeeTxParams, ) *EthermintExtensionOptionDynamicFeeTx { return &EthermintExtensionOptionDynamicFeeTx{ NewMsgBase(MsgBaseParams{ diff --git a/usecase/model/msg_ethereum_tx.go b/usecase/model/msg_ethereum_tx.go index 84c6de3f9..d45af2320 100644 --- a/usecase/model/msg_ethereum_tx.go +++ b/usecase/model/msg_ethereum_tx.go @@ -1,10 +1,10 @@ package model type EthermintLegacyTxParams struct { - RawMsgEthereumTx + RawLegacyTx } -type RawMsgEthereumTx struct { +type RawLegacyTx struct { Type string `mapstructure:"@type" json:"@type"` Size int `mapstructure:"size" json:"size"` // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 @@ -32,7 +32,7 @@ type LegacyTx struct { S string `mapstructure:"s" json:"s"` } -type MsgDynamicFeeTxParams struct { +type EthermintDynamicFeeTxParams struct { RawDynamicFeeTx } type RawDynamicFeeTx struct { diff --git a/usecase/parser/msg.go b/usecase/parser/msg.go index 1af9dc3d9..921e79a23 100644 --- a/usecase/parser/msg.go +++ b/usecase/parser/msg.go @@ -2136,7 +2136,7 @@ func ParseLegacyTx( msgCommonParams event.MsgCommonParams, msg map[string]interface{}, ) ([]command.Command, []string) { - var rawMsg model.RawMsgEthereumTx + var rawMsg model.RawLegacyTx decoderConfig := &mapstructure.DecoderConfig{ WeaklyTypedInput: true, DecodeHook: mapstructure.ComposeDecodeHookFunc( @@ -2149,16 +2149,16 @@ func ParseLegacyTx( } decoder, decoderErr := mapstructure.NewDecoder(decoderConfig) if decoderErr != nil { - panic(fmt.Errorf("error creating RawMsgEthereumTx decoder: %v", decoderErr)) + panic(fmt.Errorf("error creating RawLegacyTx decoder: %v", decoderErr)) } if err := decoder.Decode(msg); err != nil { - panic(fmt.Errorf("error decoding RawMsgEthereumTx: %v", err)) + panic(fmt.Errorf("error decoding RawLegacyTx: %v", err)) } if !txSuccess { // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 msgEthereumTxParams := model.EthermintLegacyTxParams{ - RawMsgEthereumTx: rawMsg, + RawLegacyTx: rawMsg, } // Getting possible signer address from Msg @@ -2175,7 +2175,7 @@ func ParseLegacyTx( // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 msgEthereumTxParams := model.EthermintLegacyTxParams{ - RawMsgEthereumTx: rawMsg, + RawLegacyTx: rawMsg, } // Getting possible signer address from Msg @@ -2209,15 +2209,15 @@ func ParseExtensionOptionDynamicFeeTx( decoder, decoderErr := mapstructure.NewDecoder(decoderConfig) if decoderErr != nil { - panic(fmt.Errorf("error creating RawMsgEthereumTx decoder: %v", decoderErr)) + panic(fmt.Errorf("error creating RawLegacyTx decoder: %v", decoderErr)) } if err := decoder.Decode(msg); err != nil { - panic(fmt.Errorf("error decoding RawMsgEthereumTx: %v", err)) + panic(fmt.Errorf("error decoding RawLegacyTx: %v", err)) } if !txSuccess { // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 - msgDynamicFeeTxParams := model.MsgDynamicFeeTxParams{ + msgDynamicFeeTxParams := model.EthermintDynamicFeeTxParams{ RawDynamicFeeTx: rawMsg, } @@ -2234,7 +2234,7 @@ func ParseExtensionOptionDynamicFeeTx( } // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 - msgDynamicFeeTxParams := model.MsgDynamicFeeTxParams{ + msgDynamicFeeTxParams := model.EthermintDynamicFeeTxParams{ RawDynamicFeeTx: rawMsg, } diff --git a/usecase/parser/msg_ethereum_tx_test.go b/usecase/parser/msg_ethereum_tx_test.go index 542af6a48..f596d30a3 100644 --- a/usecase/parser/msg_ethereum_tx_test.go +++ b/usecase/parser/msg_ethereum_tx_test.go @@ -54,7 +54,7 @@ var _ = Describe("ParseMsgCommands", func() { MsgIndex: 0, }, model.EthermintLegacyTxParams{ - RawMsgEthereumTx: model.RawMsgEthereumTx{ + RawLegacyTx: model.RawLegacyTx{ Type: "/ethermint.evm.v1.EthermintLegacyTx", Size: 208, Data: model.LegacyTx{ @@ -111,7 +111,7 @@ var _ = Describe("ParseMsgCommands", func() { TxSuccess: true, MsgIndex: 0, }, - model.MsgDynamicFeeTxParams{ + model.EthermintDynamicFeeTxParams{ RawDynamicFeeTx: model.RawDynamicFeeTx{ Type: "/ethermint.evm.v1.EthermintLegacyTx", Size: 0, From 9c39fffd2630d48e1762f4139e07189dc161b428 Mon Sep 17 00:00:00 2001 From: vincentysc Date: Tue, 20 Sep 2022 15:15:38 +0800 Subject: [PATCH 09/15] update event name and test case --- usecase/command/create_msg_ethereum_tx.go | 2 +- ...ate_msg_extension_option_dynamic_fee_tx.go | 4 +-- usecase/event/ethermint_legacy_tx.go | 2 +- usecase/event/msg_ethereum_tx_test.go | 4 +-- usecase/parser/msg.go | 6 ++-- usecase/parser/msg_ethereum_tx_test.go | 12 ++++---- .../parser/msg_fund_community_pool_test.go | 4 ++- usecase/parser/register.go | 2 +- usecase/parser/test/tx_msg_ethereum_tx.go | 2 +- .../tx_msg_extension_option_dynamic_fee_tx.go | 2 +- ...knowledgement_duplicate_packet_sequence.go | 28 +++++++++---------- 11 files changed, 35 insertions(+), 33 deletions(-) diff --git a/usecase/command/create_msg_ethereum_tx.go b/usecase/command/create_msg_ethereum_tx.go index 1ed6d1049..0623ccf64 100644 --- a/usecase/command/create_msg_ethereum_tx.go +++ b/usecase/command/create_msg_ethereum_tx.go @@ -30,6 +30,6 @@ func (*CreateLegacyTx) Version() int { } func (cmd *CreateLegacyTx) Exec() (entity_event.Event, error) { - event := event.NewEthermintLegacyx(cmd.msgCommonParams, cmd.params) + event := event.NewEthermintLegacyTx(cmd.msgCommonParams, cmd.params) return event, nil } diff --git a/usecase/command/create_msg_extension_option_dynamic_fee_tx.go b/usecase/command/create_msg_extension_option_dynamic_fee_tx.go index f7b9ff533..184069d4a 100644 --- a/usecase/command/create_msg_extension_option_dynamic_fee_tx.go +++ b/usecase/command/create_msg_extension_option_dynamic_fee_tx.go @@ -11,7 +11,7 @@ type CreateMsgExtensionOptionDynamicFeeTx struct { params model.EthermintDynamicFeeTxParams } -func NewCreateMsgExtensionOptionDynamicFeeTxTx( +func NewCreateMsgExtensionOptionDynamicFeeTx( msgCommonParams event.MsgCommonParams, params model.EthermintDynamicFeeTxParams, ) *CreateMsgExtensionOptionDynamicFeeTx { @@ -30,6 +30,6 @@ func (*CreateMsgExtensionOptionDynamicFeeTx) Version() int { } func (cmd *CreateMsgExtensionOptionDynamicFeeTx) Exec() (entity_event.Event, error) { - event := event.NewMsgExtensionOptionDynamicFeeTx(cmd.msgCommonParams, cmd.params) + event := event.NewEthermintExtensionOptionDynamicFeeTx(cmd.msgCommonParams, cmd.params) return event, nil } diff --git a/usecase/event/ethermint_legacy_tx.go b/usecase/event/ethermint_legacy_tx.go index e67f276d2..637531cb8 100644 --- a/usecase/event/ethermint_legacy_tx.go +++ b/usecase/event/ethermint_legacy_tx.go @@ -20,7 +20,7 @@ type EthermintLegacyTx struct { Params model.EthermintLegacyTxParams `json:"params"` } -func NewEthermintLegacyx( +func NewEthermintLegacyTx( msgCommonParams MsgCommonParams, params model.EthermintLegacyTxParams, ) *EthermintLegacyTx { diff --git a/usecase/event/msg_ethereum_tx_test.go b/usecase/event/msg_ethereum_tx_test.go index 944753387..240f13be0 100644 --- a/usecase/event/msg_ethereum_tx_test.go +++ b/usecase/event/msg_ethereum_tx_test.go @@ -21,7 +21,7 @@ var _ = Describe("Event", func() { anyParams := model.EthermintLegacyTxParams{} - event := event_usecase.NewEthermintLegacyx(event_usecase.MsgCommonParams{ + event := event_usecase.NewEthermintLegacyTx(event_usecase.MsgCommonParams{ BlockHeight: anyHeight, TxHash: anyTxHash, TxSuccess: true, @@ -53,7 +53,7 @@ var _ = Describe("Event", func() { anyParams := model.EthermintLegacyTxParams{} - event := event_usecase.NewEthermintLegacyx(event_usecase.MsgCommonParams{ + event := event_usecase.NewEthermintLegacyTx(event_usecase.MsgCommonParams{ BlockHeight: anyHeight, TxHash: anyTxHash, TxSuccess: false, diff --git a/usecase/parser/msg.go b/usecase/parser/msg.go index 921e79a23..c240af3d4 100644 --- a/usecase/parser/msg.go +++ b/usecase/parser/msg.go @@ -127,7 +127,7 @@ func ParseBlockTxsMsgToCommands( "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", // ethermint evm - "/ethermint.evm.v1.EthermintLegacyTx": + "/ethermint.evm.v1.MsgEthereumTx": parser := parserManager.GetParser(utils.CosmosParserKey(msgType.(string)), utils.ParserBlockHeight(blockHeight)) msgCommands, possibleSignerAddresses = parser(utils.CosmosParserParams{ @@ -2226,7 +2226,7 @@ func ParseExtensionOptionDynamicFeeTx( // FIXME: https://github.com/crypto-com/chain-indexing/issues/729 // possibleSignerAddresses = append(possibleSignerAddresses, msgDynamicFeeTxParams.From) - return []command.Command{command_usecase.NewCreateMsgExtensionOptionDynamicFeeTxTx( + return []command.Command{command_usecase.NewCreateMsgExtensionOptionDynamicFeeTx( msgCommonParams, msgDynamicFeeTxParams, @@ -2243,7 +2243,7 @@ func ParseExtensionOptionDynamicFeeTx( // FIXME: https://github.com/crypto-com/chain-indexing/issues/729 // possibleSignerAddresses = append(possibleSignerAddresses, msgDynamicFeeTxParams.From) - return []command.Command{command_usecase.NewCreateMsgExtensionOptionDynamicFeeTxTx( + return []command.Command{command_usecase.NewCreateMsgExtensionOptionDynamicFeeTx( msgCommonParams, msgDynamicFeeTxParams, diff --git a/usecase/parser/msg_ethereum_tx_test.go b/usecase/parser/msg_ethereum_tx_test.go index f596d30a3..b89ed0a4f 100644 --- a/usecase/parser/msg_ethereum_tx_test.go +++ b/usecase/parser/msg_ethereum_tx_test.go @@ -16,7 +16,7 @@ import ( ) var _ = Describe("ParseMsgCommands", func() { - Describe("MsgExec", func() { + Describe("MsgEthereumTx", func() { It("should parse Msg commands when there is EthermintLegacyTx in the transaction", func() { block, _, _ := tendermint.ParseBlockResp(strings.NewReader( usecase_parser_test.TX_MSG_ETHEREUM_TX_BLOCK_RESP, @@ -44,7 +44,7 @@ var _ = Describe("ParseMsgCommands", func() { Expect(err).To(BeNil()) Expect(cmds).To(HaveLen(1)) cmd := cmds[0] - Expect(cmd.Name()).To(Equal("/ethermint.evm.v1.EthermintLegacyTx.Create")) + Expect(cmd.Name()).To(Equal("/ethermint.evm.v1.LegacyTx.Create")) Expect(cmd).To(Equal(command_usecase.NewCreateLegacyTx( event.MsgCommonParams{ @@ -55,7 +55,7 @@ var _ = Describe("ParseMsgCommands", func() { }, model.EthermintLegacyTxParams{ RawLegacyTx: model.RawLegacyTx{ - Type: "/ethermint.evm.v1.EthermintLegacyTx", + Type: "/ethermint.evm.v1.MsgEthereumTx", Size: 208, Data: model.LegacyTx{ Type: "/ethermint.evm.v1.LegacyTx", @@ -103,8 +103,8 @@ var _ = Describe("ParseMsgCommands", func() { Expect(err).To(BeNil()) Expect(cmds).To(HaveLen(1)) cmd := cmds[0] - Expect(cmd.Name()).To(Equal("/ethermint.evm.v1.EthermintLegacyTx.Create")) - Expect(cmds).To(Equal([]command.Command{command_usecase.NewCreateMsgExtensionOptionDynamicFeeTxTx( + Expect(cmd.Name()).To(Equal("/ethermint.evm.v1.DynamicFeeTx.Create")) + Expect(cmds).To(Equal([]command.Command{command_usecase.NewCreateMsgExtensionOptionDynamicFeeTx( event.MsgCommonParams{ BlockHeight: int64(5168311), TxHash: "3F1B98E6A43A3666699CA28DA2A0872E1478E092F7EC3FCF8A94202BB8B330D2", @@ -113,7 +113,7 @@ var _ = Describe("ParseMsgCommands", func() { }, model.EthermintDynamicFeeTxParams{ RawDynamicFeeTx: model.RawDynamicFeeTx{ - Type: "/ethermint.evm.v1.EthermintLegacyTx", + Type: "/ethermint.evm.v1.MsgEthereumTx", Size: 0, Data: model.DynamicFeeTx{ Type: "/ethermint.evm.v1.DynamicFeeTx", diff --git a/usecase/parser/msg_fund_community_pool_test.go b/usecase/parser/msg_fund_community_pool_test.go index c3985a4e2..498382b14 100644 --- a/usecase/parser/msg_fund_community_pool_test.go +++ b/usecase/parser/msg_fund_community_pool_test.go @@ -17,7 +17,9 @@ var _ = Describe("ParseMsgCommands", func() { Describe("MsgFundCommunityPool", func() { It("should parse Msg commands when there is distribution.MsgFundCommunityPool in the transaction", func() { block, _ := mustParseBlockResp(usecase_parser_test.TX_MSG_FUND_COMMUNITY_POOL_BLOCK_RESP) - blockResults := mustParseBlockResultsResp(usecase_parser_test.TX_MSG_FUND_COMMUNITY_POOL_BLOCK_RESULTS_RESP) + blockResults := mustParseBlockResultsResp( + usecase_parser_test.TX_MSG_FUND_COMMUNITY_POOL_BLOCK_RESULTS_RESP, + ) tx := mustParseTxsResp(usecase_parser_test.TX_MSG_FUND_COMMUNITY_POOL_TXS_RESP) txs := []model.Tx{*tx} diff --git a/usecase/parser/register.go b/usecase/parser/register.go index 509290ebc..89ddcd6c6 100644 --- a/usecase/parser/register.go +++ b/usecase/parser/register.go @@ -80,7 +80,7 @@ func InitParsers(manager *utils.CosmosParserManager) { manager.RegisterParser("/cosmos.vesting.v1beta1.MsgCreateVestingAccount", BEGIN_BLOCK_HEIGHT, ParseMsgCreateVestingAccount) // ethermint evm - manager.RegisterParser("/ethermint.evm.v1.EthermintLegacyTx", BEGIN_BLOCK_HEIGHT, ParseMsgEthereumTx) + manager.RegisterParser("/ethermint.evm.v1.MsgEthereumTx", BEGIN_BLOCK_HEIGHT, ParseMsgEthereumTx) } func RegisterBreakingVersionParsers(manager *utils.CosmosParserManager) { diff --git a/usecase/parser/test/tx_msg_ethereum_tx.go b/usecase/parser/test/tx_msg_ethereum_tx.go index 83e2d8723..edecf85f5 100644 --- a/usecase/parser/test/tx_msg_ethereum_tx.go +++ b/usecase/parser/test/tx_msg_ethereum_tx.go @@ -1091,7 +1091,7 @@ const TX_MSG_ETHEREUM_TX_TXS_RESP = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "130", diff --git a/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go b/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go index 074ceceb1..afcc94cd2 100644 --- a/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go +++ b/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go @@ -843,7 +843,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TXS_RESP = ` "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.DynamicFeeTx", "chain_id": "338", diff --git a/usecase/parser/test/tx_msg_ibc_acknowledgement_duplicate_packet_sequence.go b/usecase/parser/test/tx_msg_ibc_acknowledgement_duplicate_packet_sequence.go index 8dfb38b2d..e0a01d5b9 100644 --- a/usecase/parser/test/tx_msg_ibc_acknowledgement_duplicate_packet_sequence.go +++ b/usecase/parser/test/tx_msg_ibc_acknowledgement_duplicate_packet_sequence.go @@ -3702,7 +3702,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_1 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "14", @@ -3877,7 +3877,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_1 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "14", @@ -4139,7 +4139,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_2 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "55", @@ -4314,7 +4314,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_2 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "55", @@ -4576,7 +4576,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_3 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "71", @@ -4755,7 +4755,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_3 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "71", @@ -5022,7 +5022,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_4 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "33", @@ -5225,7 +5225,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_4 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "33", @@ -5522,7 +5522,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_5 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "97", @@ -5701,7 +5701,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_5 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "97", @@ -5968,7 +5968,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_6 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "0", @@ -6353,7 +6353,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_6 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "0", @@ -17270,7 +17270,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_10 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "12", @@ -17437,7 +17437,7 @@ const TX_MSG_ACKNOWLEDGEMENT_DUPLICATE_PACKET_SEQUENCE_TXS_RESP_10 = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "12", From 6db20ecbaa593558e959e98f5a8b79c2c2bbe4a9 Mon Sep 17 00:00:00 2001 From: vincentysc Date: Mon, 24 Oct 2022 12:19:41 +0800 Subject: [PATCH 10/15] update test case --- usecase/parser/test/tx_msg_ethereum_tx.go | 2 +- .../parser/test/tx_msg_extension_option_dynamic_fee_tx.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/usecase/parser/test/tx_msg_ethereum_tx.go b/usecase/parser/test/tx_msg_ethereum_tx.go index edecf85f5..d2c3d4d2b 100644 --- a/usecase/parser/test/tx_msg_ethereum_tx.go +++ b/usecase/parser/test/tx_msg_ethereum_tx.go @@ -1211,7 +1211,7 @@ const TX_MSG_ETHEREUM_TX_TXS_RESP = `{ "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.LegacyTx", "nonce": "130", diff --git a/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go b/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go index afcc94cd2..585c484c4 100644 --- a/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go +++ b/usecase/parser/test/tx_msg_extension_option_dynamic_fee_tx.go @@ -118,7 +118,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP = `{ { "code": 0, "data": "EsAECicvZXRoZXJtaW50LmV2bS52MS5Nc2dFdGhlcmV1bVR4UmVzcG9uc2USlAQKQjB4ZDU2ZGI2NTY3MmE0OGRhYWYxNGY3NDNmNTNjMzE2YTNlYmExMzBkNzJiZWI3MDM0Mjk2ZjRlYTNmN2U0OWI1MxKnAwoqMHg5MDRCZDVhNUFBQzBCOWQ4OEEwRDQ3ODY0NzI0MjE4OTg2QWQ0YTNhEkIweDhjNWJlMWU1ZWJlYzdkNWJkMTRmNzE0MjdkMWU4NGYzZGQwMzE0YzBmN2IyMjkxZTViMjAwYWM4YzdjM2I5MjUSQjB4MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwZTA4OWQxYTBkMTUxYTEzZDgxMmVhNGU4ZDY0OGYxZGM1OGI0MWNhORJCMHgwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBmNTY0ZWYwMDM0YmI3ZDdjZDg0NDEyMjc1ZTFlNTEzNjRkNGQ3NzM0GiD//////////////////////////////////////////yC3ubsCKkIweGQ1NmRiNjU2NzJhNDhkYWFmMTRmNzQzZjUzYzMxNmEzZWJhMTMwZDcyYmViNzAzNDI5NmY0ZWEzZjdlNDliNTM6QjB4YmFlOTljYmE2ZTkwOGE2YWEyZmZmNWVmOWY4MjZhYzgxYTMwZGRmOTcxN2M0OTY2YTFjMGU5YzYxMmI4NDgxNBogAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEo69oC", - "log": "[{\"msg_index\":0,\"events\":[{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"ethereum_tx\",\"attributes\":[{\"key\":\"amount\",\"value\":\"0\"},{\"key\":\"ethereumTxHash\",\"value\":\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\"},{\"key\":\"txIndex\",\"value\":\"0\"},{\"key\":\"txGasUsed\",\"value\":\"44395\"},{\"key\":\"txHash\",\"value\":\"3F1B98E6A43A3666699CA28DA2A0872E1478E092F7EC3FCF8A94202BB8B330D2\"},{\"key\":\"recipient\",\"value\":\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/ethermint.evm.v1.EthermintLegacyTx\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"module\",\"value\":\"evm\"},{\"key\":\"sender\",\"value\":\"0xE089d1a0d151A13D812eA4e8D648f1Dc58B41ca9\"},{\"key\":\"txType\",\"value\":\"2\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"tx_log\",\"attributes\":[{\"key\":\"txLog\",\"value\":\"{\\\"address\\\":\\\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\\\",\\\"topics\\\":[\\\"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\\\",\\\"0x000000000000000000000000e089d1a0d151a13d812ea4e8d648f1dc58b41ca9\\\",\\\"0x000000000000000000000000f564ef0034bb7d7cd84412275e1e51364d4d7734\\\"],\\\"data\\\":\\\"//////////////////////////////////////////8=\\\",\\\"blockNumber\\\":5168311,\\\"transactionHash\\\":\\\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\\\",\\\"transactionIndex\\\":0,\\\"blockHash\\\":\\\"0xbae99cba6e908a6aa2fff5ef9f826ac81a30ddf9717c4966a1c0e9c612b84814\\\",\\\"logIndex\\\":0}\"}]}]}]", + "log": "[{\"msg_index\":0,\"events\":[{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"ethereum_tx\",\"attributes\":[{\"key\":\"amount\",\"value\":\"0\"},{\"key\":\"ethereumTxHash\",\"value\":\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\"},{\"key\":\"txIndex\",\"value\":\"0\"},{\"key\":\"txGasUsed\",\"value\":\"44395\"},{\"key\":\"txHash\",\"value\":\"3F1B98E6A43A3666699CA28DA2A0872E1478E092F7EC3FCF8A94202BB8B330D2\"},{\"key\":\"recipient\",\"value\":\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/ethermint.evm.v1.MsgEthereumTx\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"module\",\"value\":\"evm\"},{\"key\":\"sender\",\"value\":\"0xE089d1a0d151A13D812eA4e8D648f1Dc58B41ca9\"},{\"key\":\"txType\",\"value\":\"2\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"tx_log\",\"attributes\":[{\"key\":\"txLog\",\"value\":\"{\\\"address\\\":\\\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\\\",\\\"topics\\\":[\\\"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\\\",\\\"0x000000000000000000000000e089d1a0d151a13d812ea4e8d648f1dc58b41ca9\\\",\\\"0x000000000000000000000000f564ef0034bb7d7cd84412275e1e51364d4d7734\\\"],\\\"data\\\":\\\"//////////////////////////////////////////8=\\\",\\\"blockNumber\\\":5168311,\\\"transactionHash\\\":\\\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\\\",\\\"transactionIndex\\\":0,\\\"blockHash\\\":\\\"0xbae99cba6e908a6aa2fff5ef9f826ac81a30ddf9717c4966a1c0e9c612b84814\\\",\\\"logIndex\\\":0}\"}]}]}]", "info": "", "gas_wanted": "48834", "gas_used": "44395", @@ -896,7 +896,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TXS_RESP = ` "codespace": "", "code": 0, "data": "12C0040A272F65746865726D696E742E65766D2E76312E4D7367457468657265756D5478526573706F6E73651294040A4230786435366462363536373261343864616166313466373433663533633331366133656261313330643732626562373033343239366634656133663765343962353312A7030A2A3078393034426435613541414330423964383841304434373836343732343231383938364164346133611242307838633562653165356562656337643562643134663731343237643165383466336464303331346330663762323239316535623230306163386337633362393235124230783030303030303030303030303030303030303030303030306530383964316130643135316131336438313265613465386436343866316463353862343163613912423078303030303030303030303030303030303030303030303030663536346566303033346262376437636438343431323237356531653531333634643464373733341A20FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF20B7B9BB022A423078643536646236353637326134386461616631346637343366353363333136613365626131333064373262656237303334323936663465613366376534396235333A423078626165393963626136653930386136616132666666356566396638323661633831613330646466393731376334393636613163306539633631326238343831341A20000000000000000000000000000000000000000000000000000000000000000128EBDA02", - "raw_log": "[{\"msg_index\":0,\"events\":[{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"ethereum_tx\",\"attributes\":[{\"key\":\"amount\",\"value\":\"0\"},{\"key\":\"ethereumTxHash\",\"value\":\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\"},{\"key\":\"txIndex\",\"value\":\"0\"},{\"key\":\"txGasUsed\",\"value\":\"44395\"},{\"key\":\"txHash\",\"value\":\"3F1B98E6A43A3666699CA28DA2A0872E1478E092F7EC3FCF8A94202BB8B330D2\"},{\"key\":\"recipient\",\"value\":\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/ethermint.evm.v1.EthermintLegacyTx\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"module\",\"value\":\"evm\"},{\"key\":\"sender\",\"value\":\"0xE089d1a0d151A13D812eA4e8D648f1Dc58B41ca9\"},{\"key\":\"txType\",\"value\":\"2\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"tx_log\",\"attributes\":[{\"key\":\"txLog\",\"value\":\"{\\\"address\\\":\\\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\\\",\\\"topics\\\":[\\\"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\\\",\\\"0x000000000000000000000000e089d1a0d151a13d812ea4e8d648f1dc58b41ca9\\\",\\\"0x000000000000000000000000f564ef0034bb7d7cd84412275e1e51364d4d7734\\\"],\\\"data\\\":\\\"//////////////////////////////////////////8=\\\",\\\"blockNumber\\\":5168311,\\\"transactionHash\\\":\\\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\\\",\\\"transactionIndex\\\":0,\\\"blockHash\\\":\\\"0xbae99cba6e908a6aa2fff5ef9f826ac81a30ddf9717c4966a1c0e9c612b84814\\\",\\\"logIndex\\\":0}\"}]}]}]", + "raw_log": "[{\"msg_index\":0,\"events\":[{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"ethereum_tx\",\"attributes\":[{\"key\":\"amount\",\"value\":\"0\"},{\"key\":\"ethereumTxHash\",\"value\":\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\"},{\"key\":\"txIndex\",\"value\":\"0\"},{\"key\":\"txGasUsed\",\"value\":\"44395\"},{\"key\":\"txHash\",\"value\":\"3F1B98E6A43A3666699CA28DA2A0872E1478E092F7EC3FCF8A94202BB8B330D2\"},{\"key\":\"recipient\",\"value\":\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/ethermint.evm.v1.MsgEthereumTx\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"module\",\"value\":\"evm\"},{\"key\":\"sender\",\"value\":\"0xE089d1a0d151A13D812eA4e8D648f1Dc58B41ca9\"},{\"key\":\"txType\",\"value\":\"2\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"tcrc1uzyargx32xsnmqfw5n5dvj83m3vtg89fhjges3\"},{\"key\":\"sender\",\"value\":\"tcrc17xpfvakm2amg962yls6f84z3kell8c5lfjsjej\"},{\"key\":\"amount\",\"value\":\"22195000000000000basetcro\"}]},{\"type\":\"tx_log\",\"attributes\":[{\"key\":\"txLog\",\"value\":\"{\\\"address\\\":\\\"0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a\\\",\\\"topics\\\":[\\\"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\\\",\\\"0x000000000000000000000000e089d1a0d151a13d812ea4e8d648f1dc58b41ca9\\\",\\\"0x000000000000000000000000f564ef0034bb7d7cd84412275e1e51364d4d7734\\\"],\\\"data\\\":\\\"//////////////////////////////////////////8=\\\",\\\"blockNumber\\\":5168311,\\\"transactionHash\\\":\\\"0xd56db65672a48daaf14f743f53c316a3eba130d72beb7034296f4ea3f7e49b53\\\",\\\"transactionIndex\\\":0,\\\"blockHash\\\":\\\"0xbae99cba6e908a6aa2fff5ef9f826ac81a30ddf9717c4966a1c0e9c612b84814\\\",\\\"logIndex\\\":0}\"}]}]}]", "logs": [ { "msg_index": 0, @@ -962,7 +962,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TXS_RESP = ` "attributes": [ { "key": "action", - "value": "/ethermint.evm.v1.EthermintLegacyTx" + "value": "/ethermint.evm.v1.MsgEthereumTx" }, { "key": "sender", @@ -1019,7 +1019,7 @@ const TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TXS_RESP = ` "body": { "messages": [ { - "@type": "/ethermint.evm.v1.EthermintLegacyTx", + "@type": "/ethermint.evm.v1.MsgEthereumTx", "data": { "@type": "/ethermint.evm.v1.DynamicFeeTx", "chain_id": "338", From 22b7d75fca56fbfc386f85aa8d719b9818f80dc6 Mon Sep 17 00:00:00 2001 From: vincentysc Date: Mon, 24 Oct 2022 12:22:50 +0800 Subject: [PATCH 11/15] fix lint --- usecase/parser/msg_ethereum_tx_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usecase/parser/msg_ethereum_tx_test.go b/usecase/parser/msg_ethereum_tx_test.go index 245dda0bf..00b59a1ec 100644 --- a/usecase/parser/msg_ethereum_tx_test.go +++ b/usecase/parser/msg_ethereum_tx_test.go @@ -84,8 +84,8 @@ var _ = Describe("ParseMsgCommands", func() { usecase_parser_test.TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TX_BLOCK_RESULTS_RESP, ) - tx := mustParseTxsResp(usecase_parser_test.TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TXS_RESP) - txs := []model.Tx{*tx} + tx := MustParseTxsResp(usecase_parser_test.TX_MSG_EXTENSION_OPTION_DYNAMIC_FEE_TXS_RESP) + txs := []model.CosmosTxWithHash{*tx} accountAddressPrefix := "tcro" bondingDenom := "basetcro" From 52301e7dd94186b80d6f17a07886eae25b454456 Mon Sep 17 00:00:00 2001 From: vincentysc Date: Mon, 24 Oct 2022 12:26:15 +0800 Subject: [PATCH 12/15] update error messages --- usecase/parser/msg.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usecase/parser/msg.go b/usecase/parser/msg.go index 9403c27e0..34e2c8a35 100644 --- a/usecase/parser/msg.go +++ b/usecase/parser/msg.go @@ -2178,10 +2178,10 @@ func ParseLegacyTx( } decoder, decoderErr := mapstructure.NewDecoder(decoderConfig) if decoderErr != nil { - panic(fmt.Errorf("error creating RawLegacyTx decoder: %v", decoderErr)) + panic(fmt.Errorf("error creating decoder: %v", decoderErr)) } if err := decoder.Decode(msg); err != nil { - panic(fmt.Errorf("error decoding RawLegacyTx: %v", err)) + panic(fmt.Errorf("error decoding: %v", err)) } rawMsg.From = utils.AddressParse(rawMsg.From) @@ -2240,10 +2240,10 @@ func ParseExtensionOptionDynamicFeeTx( decoder, decoderErr := mapstructure.NewDecoder(decoderConfig) if decoderErr != nil { - panic(fmt.Errorf("error creating RawLegacyTx decoder: %v", decoderErr)) + panic(fmt.Errorf("error creating decoder: %v", decoderErr)) } if err := decoder.Decode(msg); err != nil { - panic(fmt.Errorf("error decoding RawLegacyTx: %v", err)) + panic(fmt.Errorf("error decoding: %v", err)) } if !txSuccess { From 03b6cd4e84435fb38697daeddcea7fd4fed836e0 Mon Sep 17 00:00:00 2001 From: vincentysc Date: Mon, 24 Oct 2022 13:35:28 +0800 Subject: [PATCH 13/15] add ethereum access list tx type support --- usecase/model/msg_ethereum_tx.go | 61 ++++++++++++++++++++++-------- usecase/parser/msg.go | 64 ++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+), 15 deletions(-) diff --git a/usecase/model/msg_ethereum_tx.go b/usecase/model/msg_ethereum_tx.go index d45af2320..703659c33 100644 --- a/usecase/model/msg_ethereum_tx.go +++ b/usecase/model/msg_ethereum_tx.go @@ -36,24 +36,55 @@ type EthermintDynamicFeeTxParams struct { RawDynamicFeeTx } type RawDynamicFeeTx struct { - Type string `mapstructure:"@type" json:"@type"` - Size int `mapstructure:"size" json:"size"` - // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 + Type string `mapstructure:"@type" json:"@type"` + Size int `mapstructure:"size" json:"size"` Data DynamicFeeTx `mapstructure:"data" json:"data"` From string `mapstructure:"from" json:"from"` Hash string `mapstructure:"hash" json:"hash"` } type DynamicFeeTx struct { - Type string `mapstructure:"@type" json:"@type"` - ChainId string `mapstructure:"chain_id" json:"chainId"` - Nonce string `mapstructure:"nonce" json:"nonce"` - GasTipCap string `mapstructure:"gas_tip_cap" json:"gasTipCap"` - GasFeeCap string `mapstructure:"Gas_fee_cap" json:"gasFeeCap"` - Gas string `mapstructure:"gas" json:"gas"` - To string `mapstructure:"to" json:"to"` - Value string `mapstructure:"value" json:"value"` - Data string `mapstructure:"data" json:"data"` - V string `mapstructure:"v" json:"v"` - R string `mapstructure:"r" json:"r"` - S string `mapstructure:"s" json:"s"` + Type string `mapstructure:"@type" json:"@type"` + ChainId string `mapstructure:"chain_id" json:"chainId"` + Nonce string `mapstructure:"nonce" json:"nonce"` + GasTipCap string `mapstructure:"gas_tip_cap" json:"gasTipCap"` + GasFeeCap string `mapstructure:"Gas_fee_cap" json:"gasFeeCap"` + Gas string `mapstructure:"gas" json:"gas"` + To string `mapstructure:"to" json:"to"` + Value string `mapstructure:"value" json:"value"` + Data string `mapstructure:"data" json:"data"` + Accesses AccessList `mapstructure:"accesses" json:"accesses"` + V string `mapstructure:"v" json:"v"` + R string `mapstructure:"r" json:"r"` + S string `mapstructure:"s" json:"s"` +} +type EthermintAccessListTxParams struct { + RawAccessListTx +} +type RawAccessListTx struct { + Type string `mapstructure:"@type" json:"@type"` + Size int `mapstructure:"size" json:"size"` + Data AccessListTx `mapstructure:"data" json:"data"` + From string `mapstructure:"from" json:"from"` + Hash string `mapstructure:"hash" json:"hash"` +} +type AccessListTx struct { + Type string `mapstructure:"@type" json:"@type"` + ChainId string `mapstructure:"chain_id" json:"chainId"` + Nonce string `mapstructure:"nonce" json:"nonce"` + GasPrice string `mapstructure:"gas_price" json:"gasPrice"` + GasLimit string `mapstructure:"gas_limit" json:"gasLimit"` + To string `mapstructure:"to" json:"to"` + Amount string `mapstructure:"amount" json:"amount"` + Data string `mapstructure:"data" json:"data"` + Accesses AccessList `mapstructure:"accesses" json:"accesses"` + V string `mapstructure:"v" json:"v"` + R string `mapstructure:"r" json:"r"` + S string `mapstructure:"s" json:"s"` +} + +type AccessList []AccessTuple + +type AccessTuple struct { + Address string `mapstructure:"address" json:"address"` + StorageKeys []string `mapstructure:"storage_keys" json:"storageKeys"` } diff --git a/usecase/parser/msg.go b/usecase/parser/msg.go index 34e2c8a35..6ec5304ec 100644 --- a/usecase/parser/msg.go +++ b/usecase/parser/msg.go @@ -2151,6 +2151,10 @@ func ParseMsgEthereumTx( cmds, possibleSignerAddresses = ParseLegacyTx(parserParams.MsgCommonParams.TxSuccess, parserParams.MsgCommonParams, parserParams.Msg) } else if data["@type"] == "/ethermint.evm.v1.DynamicFeeTx" { cmds, possibleSignerAddresses = ParseExtensionOptionDynamicFeeTx(parserParams.MsgCommonParams.TxSuccess, parserParams.MsgCommonParams, parserParams.Msg) + } else if data["@type"] == "/ethermint.evm.v1.AccessListTx" { + cmds, possibleSignerAddresses = ParseAccessListTx(parserParams.MsgCommonParams.TxSuccess, parserParams.MsgCommonParams, parserParams.Msg) + } else { + parserParams.Logger.Errorf("error unsupported msg type: ", data["@type"]) } if !parserParams.MsgCommonParams.TxSuccess { @@ -2221,6 +2225,66 @@ func ParseLegacyTx( )}, possibleSignerAddresses } +func ParseAccessListTx( + txSuccess bool, + msgCommonParams event.MsgCommonParams, + msg map[string]interface{}, +) ([]command.Command, []string) { + var rawMsg model.RawAccessListTx + decoderConfig := &mapstructure.DecoderConfig{ + WeaklyTypedInput: true, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToTimeHookFunc(time.RFC3339), + mapstructure_utils.StringToDurationHookFunc(), + mapstructure_utils.StringToByteSliceHookFunc(), + ), + Result: &rawMsg, + } + decoder, decoderErr := mapstructure.NewDecoder(decoderConfig) + + if decoderErr != nil { + panic(fmt.Errorf("error creating decoder: %v", decoderErr)) + } + if err := decoder.Decode(msg); err != nil { + panic(fmt.Errorf("error decoding: %v", err)) + } + + if !txSuccess { + // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 + msgAccessListTxParams := model.EthermintAccessListTxParams{ + RawAccessListTx: rawMsg, + } + + // Getting possible signer address from Msg + var possibleSignerAddresses []string + // FIXME: https://github.com/crypto-com/chain-indexing/issues/729 + // possibleSignerAddresses = append(possibleSignerAddresses, msgDynamicFeeTxParams.From) + + return []command.Command{command_usecase.NewCreateMsgAccessListTx( + msgCommonParams, + + msgAccessListTxParams, + )}, possibleSignerAddresses + } + + // FIXME: https://github.com/crypto-com/chain-indexing/issues/730 + msgAccessListTxParams := model.EthermintAccessListTxParams{ + RawAccessListTx: rawMsg, + } + + // Getting possible signer address from Msg + var possibleSignerAddresses []string + // FIXME: https://github.com/crypto-com/chain-indexing/issues/729 + // possibleSignerAddresses = append(possibleSignerAddresses, msgDynamicFeeTxParams.From) + + return []command.Command{command_usecase.NewCreateMsgAccessListTx( + msgCommonParams, + + msgAccessListTxParams, + )}, possibleSignerAddresses +} + func ParseExtensionOptionDynamicFeeTx( txSuccess bool, msgCommonParams event.MsgCommonParams, From f0b67ebfdeceb622de0021ae2665dbd23087150b Mon Sep 17 00:00:00 2001 From: vincentysc Date: Mon, 24 Oct 2022 14:20:04 +0800 Subject: [PATCH 14/15] add access list tx command --- usecase/command/create_msg_access_list_tx.go | 35 +++++++++++ usecase/event/ethermint_access_list_tx.go | 62 ++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 usecase/command/create_msg_access_list_tx.go create mode 100644 usecase/event/ethermint_access_list_tx.go diff --git a/usecase/command/create_msg_access_list_tx.go b/usecase/command/create_msg_access_list_tx.go new file mode 100644 index 000000000..427983662 --- /dev/null +++ b/usecase/command/create_msg_access_list_tx.go @@ -0,0 +1,35 @@ +package command + +import ( + entity_event "github.com/crypto-com/chain-indexing/entity/event" + "github.com/crypto-com/chain-indexing/usecase/event" + "github.com/crypto-com/chain-indexing/usecase/model" +) + +type CreateMsgAccessListTx struct { + msgCommonParams event.MsgCommonParams + params model.EthermintAccessListTxParams +} + +func NewCreateMsgAccessListTx( + msgCommonParams event.MsgCommonParams, + params model.EthermintAccessListTxParams, +) *CreateMsgAccessListTx { + return &CreateMsgAccessListTx{ + msgCommonParams, + params, + } +} + +func (*CreateMsgAccessListTx) Name() string { + return "/ethermint.evm.v1.DynamicFeeTx.Create" +} + +func (*CreateMsgAccessListTx) Version() int { + return 1 +} + +func (cmd *CreateMsgAccessListTx) Exec() (entity_event.Event, error) { + event := event.NewEthermintAccessListTx(cmd.msgCommonParams, cmd.params) + return event, nil +} diff --git a/usecase/event/ethermint_access_list_tx.go b/usecase/event/ethermint_access_list_tx.go new file mode 100644 index 000000000..ec6ceec2c --- /dev/null +++ b/usecase/event/ethermint_access_list_tx.go @@ -0,0 +1,62 @@ +package event + +import ( + "bytes" + + "github.com/crypto-com/chain-indexing/usecase/model" + + entity_event "github.com/crypto-com/chain-indexing/entity/event" + jsoniter "github.com/json-iterator/go" + "github.com/luci/go-render/render" +) + +const ACCESS_LIST_TX = "/ethermint.evm.v1.AccessListTx" +const ACCESS_LIST_TX_CREATED = "/ethermint.evm.v1.AccessListTx.Created" +const ACCESS_LIST_TX_FAILED = "/ethermint.evm.v1.AccessListTx.Failed" + +type EthermintAccessListTx struct { + MsgBase + + Params model.EthermintAccessListTxParams `json:"params"` +} + +func NewEthermintAccessListTx( + msgCommonParams MsgCommonParams, + params model.EthermintAccessListTxParams, +) *EthermintAccessListTx { + return &EthermintAccessListTx{ + NewMsgBase(MsgBaseParams{ + MsgName: ACCESS_LIST_TX, + Version: 1, + MsgCommonParams: msgCommonParams, + }), + + params, + } +} + +// ToJSON encodes the event into JSON string payload +func (event *EthermintAccessListTx) ToJSON() (string, error) { + encoded, err := jsoniter.Marshal(event) + if err != nil { + return "", err + } + + return string(encoded), nil +} + +func (event *EthermintAccessListTx) String() string { + return render.Render(event) +} + +func DecodeEthermintAccessListTx(encoded []byte) (entity_event.Event, error) { + jsonDecoder := jsoniter.NewDecoder(bytes.NewReader(encoded)) + jsonDecoder.DisallowUnknownFields() + + var event *EthermintAccessListTx + if err := jsonDecoder.Decode(&event); err != nil { + return nil, err + } + + return event, nil +} From c0913aaec27edc333efa8c6ce422e8bcbb5706c5 Mon Sep 17 00:00:00 2001 From: vincentysc Date: Mon, 24 Oct 2022 14:28:45 +0800 Subject: [PATCH 15/15] update test case --- usecase/parser/msg_ethereum_tx_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/usecase/parser/msg_ethereum_tx_test.go b/usecase/parser/msg_ethereum_tx_test.go index 00b59a1ec..03a3b7482 100644 --- a/usecase/parser/msg_ethereum_tx_test.go +++ b/usecase/parser/msg_ethereum_tx_test.go @@ -125,6 +125,7 @@ var _ = Describe("ParseMsgCommands", func() { To: "0x904Bd5a5AAC0B9d88A0D47864724218986Ad4a3a", Value: "0", Data: "CV6nswAAAAAAAAAAAAAAAPVk7wA0u3182EQSJ14eUTZNTXc0//////////////////////////////////////////8=", + Accesses: model.AccessList{}, V: "", R: "HHigR02IN48gvEM991C/MOCmbVfOw9Sj804IhtI5z2Q=", S: "SspHmiOAoM4bQdvAig9I8PQzLv5GTzElhcROppO0WpU=",