From cc56b470a46f2395354783406b63bd076e8e946e Mon Sep 17 00:00:00 2001 From: Alex Browne Date: Tue, 16 Jun 2020 12:11:56 -0700 Subject: [PATCH 1/3] Optimize FindMiniHeaders by using gob encoding for event logs --- db/db_bench_test.go | 1174 +++++++++++++++++++++++++ db/db_test.go | 34 +- db/dexie_implementation.go | 37 +- db/dexietypes/dexietypes.go | 105 ++- db/types_js.go | 12 +- packages/browser-lite/src/database.ts | 4 +- 6 files changed, 1264 insertions(+), 102 deletions(-) create mode 100644 db/db_bench_test.go diff --git a/db/db_bench_test.go b/db/db_bench_test.go new file mode 100644 index 000000000..eb88967fe --- /dev/null +++ b/db/db_bench_test.go @@ -0,0 +1,1174 @@ +package db + +import ( + "context" + "testing" + + "github.com/0xProject/0x-mesh/common/types" + "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/stretchr/testify/require" +) + +func BenchmarkFindMiniHeaders(b *testing.B) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + db := newTestDB(b, ctx) + + numMiniHeaders := 20 + storedMiniHeaders := []*types.MiniHeader{} + for i := 0; i < numMiniHeaders; i++ { + miniHeader := newTestMiniHeader() + miniHeader.Logs = largeEventLogs + storedMiniHeaders = append(storedMiniHeaders, miniHeader) + } + _, _, err := db.AddMiniHeaders(storedMiniHeaders) + require.NoError(b, err) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + _, _ = db.FindMiniHeaders(nil) + } +} + +// largeEventLogs is a large set of event logs taken from the real world, with only the block number, +// tx index, and index changed. +var largeEventLogs = []ethtypes.Log{ + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x00000000000000000000000046705dfff24256421a05d056c29e81bdc09723b8"), + common.HexToHash("0x0000000000000000000000006065aa35f3463089a766aea22cc277b5c3892139"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000000000000000c3d1755e"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x7d73919e3e7eadeb046ffe185dcac95aab0e9792d9029aee05480e0e0d8796a0"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x00000000000000000000000056caecee1bf89c9bc955890a8f129f32c13f6aa7"), + common.HexToHash("0x000000000000000000000000b95acf2273d0713f4a97e0b613458d26b3cfb2ed"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000000000000029b92700"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x1ffcd2be0ed95b82f4f0bc6686c49efca221dd6251c6f24ec9f8c78c0c3f7142"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x00000000000000000000000064ad7f47ce062d464f6968cc94f799d3030743fc"), + common.HexToHash("0x000000000000000000000000faef93cccf61f03630ff2ffb13b3601a0b0a7eb2"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000000000000001f3b9b00"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xb20bf78ecd24a8ab5dd103a7a1a7a1e47d5f5286f3d9b60fa4a9108e8e27c46e"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x7654915a1b82d6d2d0afc37c52af556ea8983c7e"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x00000000000000000000000016da6668a91dc636120a9f23dbc4630881c0facd"), + common.HexToHash("0x0000000000000000000000009bf89107a3cb3c2deb4576401be1e823c6e40ee8"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000e6f80cb7bdc4ae80000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x18f6bcd5494fe47a6a6bc25e164d727d55a2fd4b7b2c62073659f775e75b3970"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000d6a062cae6123c158768a5c444ca0896cc60d6b1"), + common.HexToHash("0x0000000000000000000000002a3cc2fe73a24cfa41d1aec5f55dc1d41e33897c"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000000000000000990c98"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xf386c75fec7f54f903815296ae9017c515d2b9809b530265ebbede2b1c4dee9c"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x514910771af9ca656af840dff83e8264ecf986ca"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000003b3a90a4433804032c0b61c4d3d58812d29a5dec"), + common.HexToHash("0x00000000000000000000000095151e4615c5c0924b918c85ad8d8a94d6644ab3"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000005cc86600b1c4d000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x40bd553d26653f5c37e8de1027d96aa72e09866aeaf8ae8bdd5b661f1e418276"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x2405ddd626d6769610b19c261311830777a311a7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000af74fe97b42a224e8760a589b0ae454c7b1a28c2"), + common.HexToHash("0x000000000000000000000000f3a935a406c7727c052d7526804507935323d7d8"), + }, + Data: []byte("0x000000000000000000000000000000000000000000084158e2526dd2e5800000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xac985217ca60e6094618d64bb5ac4b33287ca02c4bc28b71811b99b5b9f828b5"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000841f8c3184b716b099e976628dd98fdcfb0bb5ef"), + common.HexToHash("0x0000000000000000000000001a99239df30f3ffbb07d873559d20eee338ea01b"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000000000000002886448"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x511a3859cb449c130a79157defc3828670f872e7c34fb23fa0b9aed2c69da0da"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000a42dc77e5e1e0098ed70ee067f764935d1aef180"), + common.HexToHash("0x000000000000000000000000e4476dca07189f276e65c1d01c696852ce02fe3e"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000000000000002719c40"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x2bbd507e8cc84087b1d86d609af61e8c42c8fc5fb9cb0415c431ed0f2c661c58"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000006b1c478263438c74afc0175020dec1fdeb541661"), + common.HexToHash("0x000000000000000000000000088a3e0d2ffc008be5bc6a0e3c00e9fa6d12f2f1"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000000000000014ed5c60"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xff29d927dc46a0824d319c0510d75379cbe65e6cfe3200344da7ae0a3487147c"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000f7049cd674d72a5a16ef57c118c1613477640307"), + common.HexToHash("0x0000000000000000000000007908abdf030b799f573775582a63df61f6a02dc9"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000000000000087d6c7c0"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xb32c7c71488421d34d1a738dbe90d69ad48a348b58023e6dd23fde795016b1b1"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000c391250ada88f9a8ab8dc56f0bc9fa0594c9f90e"), + common.HexToHash("0x00000000000000000000000078884d57a620fa09d92e7cedbe570cf33ac9bfc1"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000000000000010089d40"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x29afa7d99bd36d2b558fd69e40c64f8217ebdb5ad34e0986ce16d95436b70159"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000c4907980e8352d75a4666d1f4e7e380808383de6"), + common.HexToHash("0x0000000000000000000000006167e12afb5eecfcd784ae6f34a0aa0fd994facd"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000000000000012703ca3c"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x2c6caa36d5df30b857a9c18fb467bffc703a170983fda4ac69640143f6e7cc99"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdd8a513d11bd563e009f8e561c488ba7969470e1"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000ac9210af076dd69781667231c279eac6091684fc"), + common.HexToHash("0x0000000000000000000000009a069d42f385147293f710ab3d73d3ecd967604d"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000202fefbf2d7c2f00000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x8acba59d20e7248e8df97c85ee5d43847cc26b91f4b8bb6a34cb57c9c96b0b64"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdd8a513d11bd563e009f8e561c488ba7969470e1"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000ac9210af076dd69781667231c279eac6091684fc"), + common.HexToHash("0x0000000000000000000000009a2337f44ff1eec540754afac3bb866f9c4748bf"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000011e1116154178540000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x95d31c94d7785df13ee53bd35fbad1faba95090f4d39a84054590b96806c099d"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000bc73dc59d5e55656a8bf817e4d80d097e5d3adca"), + common.HexToHash("0x000000000000000000000000ea0e4efa5df7b943eeea20b058b0e6b5adb49f25"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000000000000001a39de00"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xca63101bbfa591c4526366a92c511018e9aa2d02a4c7bfefb22b184de5e920b3"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000e1bc0344e703099d2495b814a33884b93e120241"), + common.HexToHash("0x000000000000000000000000b1e15fdbe88b7e7c47552e2d33cd5a9b2e0fd478"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000000000000165a0bc00"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x2bdf15533a81c6aa2e6ce61a641b4087ac0b3f4cc8d2cafdcf84cec2d1237479"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000d736cb0821239cd892bc1ed2c10f635c6ab18a95"), + common.HexToHash("0x0000000000000000000000003b1843376b872375fc69f7717a5992d373b67809"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000000000000000085efc5b"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x57912bcb418eaf48181351a646a4da51d07debdbdba56719118ed34e943825c8"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000d1b33cae89d0f924ba01a1a7f3f12fc77d00b4f3"), + common.HexToHash("0x00000000000000000000000009165e6b871b17099e756086d0e12372938656f8"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000000000000001dcd6500"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xe13448adc6867e969212bba33a73c151a6b162b5cfa1c420c4f9bb4cd793379c"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x9dffe202df7f82ba57a7f8d571628805eff7fed9"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000009e7b1939182b0f45c27f85c350efd7e5e6a2a865"), + common.HexToHash("0x0000000000000000000000005946115aac13463d2cfa68a4dc78ab8b5ff5d02c"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000006c4ad9d082e58cf4000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x44294e524704571a3b07305d51de4e2b61bc8e55fb96cbcc9e68108d3a93b884"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000008fec037ebb7d39ce1dfc85a00c186ec5e00a6bba"), + common.HexToHash("0x00000000000000000000000097dec872013f6b5fb443861090ad931542878126"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000000000000001312d00"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xa39469b5bb75bce93f2b34ad407fc3a7bca6d9b291a0dcd417eac56a5e7e2413"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xa7de087329bfcda5639247f96140f9dabe3deed1"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000006ae23c5edaad107026a3dabb74396e1ff4d5695d"), + common.HexToHash("0x0000000000000000000000008fec037ebb7d39ce1dfc85a00c186ec5e00a6bba"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000016ecf5f4fa52d40ac6"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xa39469b5bb75bce93f2b34ad407fc3a7bca6d9b291a0dcd417eac56a5e7e2413"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xa7de087329bfcda5639247f96140f9dabe3deed1"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000006ae23c5edaad107026a3dabb74396e1ff4d5695d"), + common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000003b484d76e464678c"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xa39469b5bb75bce93f2b34ad407fc3a7bca6d9b291a0dcd417eac56a5e7e2413"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x9dffe202df7f82ba57a7f8d571628805eff7fed9"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000009f26146822f0a3b685e89f7e693ebb3793a6bec1"), + common.HexToHash("0x0000000000000000000000005946115aac13463d2cfa68a4dc78ab8b5ff5d02c"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000003cfc82e37e9a7400000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x487558cbe3f67e2dfa90d84ad4562685b39ceebbf880c76704f199734160aa49"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000eea95c422f48ff742aa7afe406d963d80377e477"), + common.HexToHash("0x00000000000000000000000054478b93a220c251f2614008a8a935bf5b15193f"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000000000000004b571c0"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x365e29866a7ff6ec3da0ab2e454837cf0b8ed5ddca146da5b8a4e1f55e501b7a"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x2a46f2ffd99e19a89476e2f62270e0a35bbf0756"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"), + common.HexToHash("0x0000000000000000000000007651c1bd4b3da94c190db1819c29fe64691b5cf9"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000000000000000005dc9"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xeea06e0aa70775d0fff9908e8edfa2b4a9e40d497a4ed93a31abcd865c347ac2"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xf51ebf9a26dbc02b13f8b3a9110dac47a4d62d78"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000c0a6e10a2befc9fe2387d83e3e48a164f9f56556"), + common.HexToHash("0x000000000000000000000000278039493c4072d5341ab542ce0a0986e94908da"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000021e19e0c9bab2400000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xf3437da6f8f0f32f7d0380a77e0562db504927197514a59ddd001e1f199f95ee"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x138ce468a16dca01d39f1e142894f0e001fe598c"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000acce7045fbc1df7fbe277e9cbcdc1a20f412ca79"), + common.HexToHash("0x0000000000000000000000000c8d5f31836b414929f03c0db22c58a3ca5bc271"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000002b5e3af16b1880000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x0442fa642a8d1e8526e4e4521ecaf4e6c46590ba8e5124168faa8a8450363a2f"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x1b6c5864375b34af3ff5bd2e5f40bc425b4a8d79"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000dd5e10555a0d4ba9fc17bcdccd33159a69730309"), + common.HexToHash("0x000000000000000000000000a09109c7ca8894348c9e924ce776ed24909afc9d"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000000000001005fddd00"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xe574ef7d202bdcc13aabf9d2b2eb72ede5e8a8e66d59602195b03547fe9b37f6"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x06012c8cf97bead5deae237070f9587f8e7a266d"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + }, + Data: []byte("0x000000000000000000000000b1690c08e213a35ed9bab7b318de14420fb57d8c0000000000000000000000001c2581e734a8b35e4c5f3077b5c2271157de5b94000000000000000000000000000000000000000000000000000000000012f7c9"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x68f2d52761cda71d072f0baf57c8a9a0bfa0dc224030246da38ba48e7134f9bb"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000f2bdd9bf9f62948711af924d2832ea4c4b998d1b"), + common.HexToHash("0x000000000000000000000000ecd4c012f61d7eb59d1694d1cdb0a886fdcbff3d"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000000000000047fdb7d0"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xe60745f4a6b52e065d388472a6a5fadbc4c0874d0ea26147b62f3f1c4ce7d001"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000008193c2b585f3de9f0b54179351d3e31ad18377e8"), + common.HexToHash("0x000000000000000000000000f3e36ad56aa85abdacc18c02d19509ae4f7d5899"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000000000000017ef5b8400"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x8422d81ff60014383f6839ae07f5bba38fce7e3925b18edb9b4ed016fc8451ec"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xd26114cd6ee289accf82350c8d8487fedb8a0c07"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000227cb64bf95c6de5dbe418d31179ccac02723c1c"), + common.HexToHash("0x000000000000000000000000446d3d6a95a92eedc32171f31ffe1f2666bb2014"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000008a63377aaf9930000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x64b85663c336e4b668ae3ae9d57a40d6215dee60bf9b94596b02e2da1c8e2109"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x2b591e99afe9f32eaa6214f7b7629768c40eeb39"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000baa0b0b82f325d3a81367526febea0bea8edf4b0"), + common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000000000000746a528800"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xcfff45534f761c270f1c90ddda9de756ca992da0f006bd92f8065da00cff7d3d"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xa2f156bcd978e06b714af8d6e7caf65511a58c8b"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000cab151544aa6f7ee37831b4611d25e38e2e0a59d"), + common.HexToHash("0x000000000000000000000000a2f156bcd978e06b714af8d6e7caf65511a58c8b"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000085917fbd690fd0451"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x289d54e1986e7a6c5c037cdeb3d20827f96690185ef75efba0e9b389d7ab291d"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xa2f156bcd978e06b714af8d6e7caf65511a58c8b"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000a2f156bcd978e06b714af8d6e7caf65511a58c8b"), + common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000085917fbd690fd0451"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x289d54e1986e7a6c5c037cdeb3d20827f96690185ef75efba0e9b389d7ab291d"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000a2f156bcd978e06b714af8d6e7caf65511a58c8b"), + common.HexToHash("0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000000003e78026d4a81059"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x289d54e1986e7a6c5c037cdeb3d20827f96690185ef75efba0e9b389d7ab291d"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xfa91f4177476633f100c59d336c0f2ffad414cba"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000a2f156bcd978e06b714af8d6e7caf65511a58c8b"), + common.HexToHash("0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000152d09ee069736c17eda"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x289d54e1986e7a6c5c037cdeb3d20827f96690185ef75efba0e9b389d7ab291d"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xfa91f4177476633f100c59d336c0f2ffad414cba"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d"), + common.HexToHash("0x000000000000000000000000cab151544aa6f7ee37831b4611d25e38e2e0a59d"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000152d09ee069736c17eda"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x289d54e1986e7a6c5c037cdeb3d20827f96690185ef75efba0e9b389d7ab291d"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"), + Topics: []common.Hash{ + common.HexToHash("0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65"), + common.HexToHash("0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000000003e78026d4a81059"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x289d54e1986e7a6c5c037cdeb3d20827f96690185ef75efba0e9b389d7ab291d"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x256845e721c0c46d54e6afbd4fa3b52cb72353ea"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000256845e721c0c46d54e6afbd4fa3b52cb72353ea"), + common.HexToHash("0x000000000000000000000000b9c02bb6b16386da29107b8de1f472152ee47f48"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000100b91a362d3e17281"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xcc5dce51689fb3be0478b9df63d06251dda0b01fa43097407c8da9aaaee82095"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x2afd9ce07d4186e8f3671d52200850760a8e1f70"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000000b2a092cfac76dd3a6fabc89f1c31278e8b41d1f"), + common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000049b034261f3925d6c"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xb19f611e220ec926dd818f2df1f3b459faaeec2a83b609e51e8ba0e8a1617dd3"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x2afd9ce07d4186e8f3671d52200850760a8e1f70"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000000b2a092cfac76dd3a6fabc89f1c31278e8b41d1f"), + common.HexToHash("0x0000000000000000000000000fd9c18518fe793e02e20adebf4515600cbf8ba4"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000094e969625f18d1cd05"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xb19f611e220ec926dd818f2df1f3b459faaeec2a83b609e51e8ba0e8a1617dd3"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x0fd9c18518fe793e02e20adebf4515600cbf8ba4"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"), + common.HexToHash("0x0000000000000000000000000b2a092cfac76dd3a6fabc89f1c31278e8b41d1f"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000000000471a5743fa1b69"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xb19f611e220ec926dd818f2df1f3b459faaeec2a83b609e51e8ba0e8a1617dd3"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x9dffe202df7f82ba57a7f8d571628805eff7fed9"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000580f17f82996d822a81ec0e49c92d4a019430675"), + common.HexToHash("0x0000000000000000000000005946115aac13463d2cfa68a4dc78ab8b5ff5d02c"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000042118dcbc9275300000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x5a03cd61d3aff12989e4744160e08ca2479eb19753d7594f91015646a56d295d"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xc7e43a1c8e118aa2965f5eabe0e718d83db7a63c"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x00000000000000000000000059995ce128624f291ed98d042cea65ea6b190f4c"), + common.HexToHash("0x000000000000000000000000886f1539b8f1a7199ec152e74708b7b3c655dd87"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000001df9dc8e4ad80100"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xe04214dde174eb2c359a31e29a92cf2e241fb9c61d6c8f2cfbffbb895a100cd2"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x04abeda201850ac0124161f037efd70c74ddc74c"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000005bedc5bb577e3125f0dfd6069c9aedbed9f0df39"), + common.HexToHash("0x000000000000000000000000561d0d6c498a379574eaaa4a5f2532b223ffaebf"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000095885c1adb8cbb100000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x4d2cb9a93accf6dbee58553bbf25611181458e45a943fcab3748493e727c0dcd"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x9dffe202df7f82ba57a7f8d571628805eff7fed9"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000009b8e293c2d3b454a081edb0c6a18dd1a85a048e9"), + common.HexToHash("0x0000000000000000000000005946115aac13463d2cfa68a4dc78ab8b5ff5d02c"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000041e1d957bf97eb40000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x103fdfcb8e94580cfccc7b23c8061284d26ff330bf89ace6b0a6e027fc714992"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x00000000000000000000000004f81086355009e563b458c43638b61075cbf090"), + common.HexToHash("0x000000000000000000000000a9bff538a906154c80a8dbccd229f3deddfa52d6"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000000000000002a60ffc0"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x457b7d1742c52da96a1b4d0ebc3071456921a7a8447ed6f02a58a20027193d56"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x507096e1c7f6b8632de56a12c74c343fca3651e4"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x00000000000000000000000095f14f583c531bbcdda9c6977a3423d1642078ad"), + common.HexToHash("0x000000000000000000000000f9816cfefa7b0f6d25ebb4ddc9902170afe7433f"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000000000000002540be400"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x4d1c57f0bca75607ea8580a0a67bc32564037e4fbffaa656edca0cc6bfe82d4e"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x9dffe202df7f82ba57a7f8d571628805eff7fed9"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x00000000000000000000000064cbaf7c0de9e9fff1803f24e9f0e6e2cf1628f8"), + common.HexToHash("0x0000000000000000000000005946115aac13463d2cfa68a4dc78ab8b5ff5d02c"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000042118dcbc9275300000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x219c69ee6a3f5c029b54961e431cc1f3201719794384f1d0c61b51d661c1f94a"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000005cee1fb68b8ea6b42ebceece47627e7692d222bf"), + common.HexToHash("0x000000000000000000000000f890317b8ccb178e2000d7e34edb21fc991c9132"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000000000000008ad64c20"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x101039193ad657255a396c344e1b4c04ed22c6398b23f1b9ad1bb096b5888f1f"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x04abeda201850ac0124161f037efd70c74ddc74c"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000923f80828663e44e0ffd5eb499686dc1ccc78476"), + common.HexToHash("0x00000000000000000000000043d99d54f14c64994fd9666beab6023b0069de20"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000270801d946c9400000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x101039193ad657255a396c344e1b4c04ed22c6398b23f1b9ad1bb096b5888f1f"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x04abeda201850ac0124161f037efd70c74ddc74c"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x00000000000000000000000043d99d54f14c64994fd9666beab6023b0069de20"), + common.HexToHash("0x000000000000000000000000f890317b8ccb178e2000d7e34edb21fc991c9132"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000001f399b1438a1000000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x101039193ad657255a396c344e1b4c04ed22c6398b23f1b9ad1bb096b5888f1f"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x04abeda201850ac0124161f037efd70c74ddc74c"), + Topics: []common.Hash{ + common.HexToHash("0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925"), + common.HexToHash("0x00000000000000000000000043d99d54f14c64994fd9666beab6023b0069de20"), + common.HexToHash("0x000000000000000000000000472c31697633dacd24c4674b4571d4a393d54870"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000005dacd13ca9e300000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x101039193ad657255a396c344e1b4c04ed22c6398b23f1b9ad1bb096b5888f1f"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x04abeda201850ac0124161f037efd70c74ddc74c"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x00000000000000000000000043d99d54f14c64994fd9666beab6023b0069de20"), + common.HexToHash("0x000000000000000000000000101d8b63a081dfff2b1364864345b7f071b052ac"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000005dacd13ca9e300000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x101039193ad657255a396c344e1b4c04ed22c6398b23f1b9ad1bb096b5888f1f"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x04abeda201850ac0124161f037efd70c74ddc74c"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x00000000000000000000000043d99d54f14c64994fd9666beab6023b0069de20"), + common.HexToHash("0x0000000000000000000000006756927922d2a32cb799f261e4abc47652cde54b"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000001f399b1438a100000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x101039193ad657255a396c344e1b4c04ed22c6398b23f1b9ad1bb096b5888f1f"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000003bc4b23c177840653ecd4cf1fa71f55079805183"), + common.HexToHash("0x0000000000000000000000005e2b841cef6dba67293cfc9136a5c009862a13fc"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000000000000000017058e0"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xcfb71b61e22dc163bfd38a092e8909964b8d9d1decd633b0da9c4c952eca9332"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x9dffe202df7f82ba57a7f8d571628805eff7fed9"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000f05102092837484612ec23d9a66db4a84084b190"), + common.HexToHash("0x0000000000000000000000005946115aac13463d2cfa68a4dc78ab8b5ff5d02c"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000032d26d12e980b600000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x23b78bbce9380b6a750c94289213c44bb264768d1adebf8ccf43eca770e611e9"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x9dffe202df7f82ba57a7f8d571628805eff7fed9"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000009194d8c035806e8b848794bfbf05d4db0b273c7e"), + common.HexToHash("0x0000000000000000000000005946115aac13463d2cfa68a4dc78ab8b5ff5d02c"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000057a24fb4d5b56840000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xf6989444523dbf54cac299905bfa3de1cc302f3739c6685cac57d23770c27e28"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x10402816bbf93c89c07239134a9a3cb77466349f"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000ad1364a9e3ed9aab2f3d079a33c226af62e292c7"), + common.HexToHash("0x000000000000000000000000407aab1edd95623d7f7ee1d7bd09dbee3fa619db"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000001b36a6444a3e180000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xbe8bdeb5071edb6a711a4d7f6a93a14107c2fda2b72eac6a403957ed34cf24d8"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x10402816bbf93c89c07239134a9a3cb77466349f"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000ad1364a9e3ed9aab2f3d079a33c226af62e292c7"), + common.HexToHash("0x00000000000000000000000073a2ece87bb396ee1764221898c17d691017b747"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000018650127cc3dc80000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xb6f3e80367a9030f5da0cb4bfd6a56910d797d5e89774b6d1140a3ebe4a06720"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000000a72fd86af91679867bda49e57c6c5cc5423d019"), + common.HexToHash("0x0000000000000000000000008079ab429ae79b4ae0002a12b934b601c5e9cce7"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000000000000012a05f200"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x8555fa6b429260aa02a8856f4ff3b81e5e67e9c0a64a674ab1c76fe2309f3bcd"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000e6df6040c49f3a2456f6c9cf817547862e6557f0"), + common.HexToHash("0x000000000000000000000000740ec0e6cd54eeec3828abc1aab332f209f4c168"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000000000000002a2738bc"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xf5c50e913c7288e1cbd21d7a49bca972762a35c56fdf6d97cbc6fd73fae1609c"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000398011980ad32db73f48413ee891fdabb318b097"), + common.HexToHash("0x000000000000000000000000b8608719c9b5c1fb888a93b4b1f1669b0052b4c1"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000000000000000038444c0"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x7a89c35d2e546f5c4d799277094828642b039d934144caadcdfce8c07963f075"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000d52f1c1b25d5aa13e1d85fe99b178b6b0c418ad8"), + common.HexToHash("0x0000000000000000000000000f2b02a6cbade3b9b06d3f4bc07585d47d96d29e"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000000000000001659b64d0"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x8eaca5b1b5ba07f2d565a656f3919114230d4821d53dccaf4ecc5fe81ab6bf85"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x9dffe202df7f82ba57a7f8d571628805eff7fed9"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000d6e2826678454936e2d38cb7f5d01e5cab4d5f34"), + common.HexToHash("0x0000000000000000000000005946115aac13463d2cfa68a4dc78ab8b5ff5d02c"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000004249eeb202ff5940000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x079f1a821b929831a400d6322456f04ed327ebfcd020817e3838cc5b7a3f7708"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000944680402b2ba554f978714b6039755ed10e7466"), + common.HexToHash("0x000000000000000000000000571dbf6106e04266ecb1394b6518228afad4b31d"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000000000000000012b1280"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x8c1fa21aea3e592997c1e4b1b55e501c0d66c622658257c8f87080ff9ac1856b"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000b9f72c758ff83414fcf3978e3b2b8d078029acec"), + common.HexToHash("0x00000000000000000000000087b99ffd0fdafba829e57029f5c7fef953d2bc67"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000000000000013c9eb00"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x40ac2ede3d966ac2a99f5aee0e3b29f4dccb5ed97e699370cf8639089ff291f7"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x8971f9fd7196e5cee2c1032b50f656855af7dd26"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000811fa2d3b05e1477882bffd9dc042c75d60df1d0"), + common.HexToHash("0x0000000000000000000000001062a747393198f70f71ec65a582423dba7e5ab3"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000c2980dd6da059280000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x273e6c743b25b073e82ce6f854024dc75bbc4a16f18972e86f7aeca0fa5a2771"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x8e870d67f660d95d5be530380d0ec0bd388289e1"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000566d726f3feeaba6c5db1933d512a80564959ee8"), + common.HexToHash("0x000000000000000000000000fa4b5be3f2f84f56703c42eb22142744e95a2c58"), + }, + Data: []byte("0x00000000000000000000000000000000000000000000003635c9adc5dea00000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xf20c795b17252b7575179557fdc2bd60abdee36057a49f1e0a909b73528b17ed"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000c253fb7e8946d97bd70935af2cb7974c50d2f594"), + common.HexToHash("0x00000000000000000000000046705dfff24256421a05d056c29e81bdc09723b8"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000000000000129e76d80"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x9f6a71b74193cf8faab695a2791370f713acd19f8630194f0d0bf6216facfa0a"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdd974d5c2e2928dea5f71b9825b8b646686bd200"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000009e6527a83aab6829174ec1746920bd9e3050a49a"), + common.HexToHash("0x000000000000000000000000fa4b5be3f2f84f56703c42eb22142744e95a2c58"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000d8d726b7177a800000"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xfde7ec8ede79f4e80470184bb95e593159fea07ff42e38be600734ce498f4fde"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x000000000000000000000000a42dc77e5e1e0098ed70ee067f764935d1aef180"), + common.HexToHash("0x0000000000000000000000003c74e1086193e0207db83cb8424122987388ed8d"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000000000000000af79e00"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0x8a63e11fd759c1359692d79b8ba096411c316a66fd5d2de1255342207bdd8489"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0x8eb24319393716668d768dcec29356ae9cffe285"), + Topics: []common.Hash{ + common.HexToHash("0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925"), + common.HexToHash("0x00000000000000000000000078125b3e785d957e6a14dc11f1e5f8d66cb312f2"), + common.HexToHash("0x0000000000000000000000003c9d954a5e9fff8a3b9495094adee9b5c2233e5c"), + }, + Data: []byte("0x000000000000000000000000000000000000000000000000000004a1cea278c0"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xe3c5ca0233c5418d5ef8e1b93885a0930ffda1cd744031962b22025d6452def0"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, + { + Address: common.HexToAddress("0xdac17f958d2ee523a2206206994597c13d831ec7"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000009a581d017651d9589fbdee3f24be19cc247914d5"), + common.HexToHash("0x000000000000000000000000793c453adb2835a327a3480834b5ce989b20f424"), + }, + Data: []byte("0x0000000000000000000000000000000000000000000000000000000002886448"), + BlockNumber: 10248179, + TxHash: common.HexToHash("0xbb219b6e1ef9115ae15737960b0fcb3469776342a484672b6d40db46639194df"), + TxIndex: 42, + BlockHash: common.HexToHash("0xffad54f732f7bb3e50a26defa1e491185e2dd58bf88a34a1249d38165e46991c"), + Index: 123, + Removed: false, + }, +} diff --git a/db/db_test.go b/db/db_test.go index e484617f0..f98318398 100644 --- a/db/db_test.go +++ b/db/db_test.go @@ -1128,7 +1128,7 @@ func TestParseContractAddressesAndTokenIdsFromAssetData(t *testing.T) { } } -func newTestDB(t *testing.T, ctx context.Context) *DB { +func newTestDB(t testing.TB, ctx context.Context) *DB { db, err := New(ctx, TestOptions()) require.NoError(t, err) count, err := db.CountOrders(nil) @@ -1722,33 +1722,9 @@ func makeMiniHeaderFilterTestCases(t *testing.T, db *DB) ([]*types.MiniHeader, [ expectedMatchingMiniHeaders: storedMiniHeaders[5:], }, - // Filter on Logs (type ParsedAssetData/TEXT) - { - name: "Logs CONTAINS query that matches all", - filters: []MiniHeaderFilter{ - { - Field: MFLogs, - Kind: Contains, - Value: `"address":"0x21ab6c9fac80c59d401b37cb43f81ea9dde7fe34"`, - }, - }, - expectedMatchingMiniHeaders: storedMiniHeaders, - }, - { - name: "Logs CONTAINS query that matches one", - filters: []MiniHeaderFilter{ - { - Field: MFLogs, - Kind: Contains, - Value: `"blockNumber":"0x5"`, - }, - }, - expectedMatchingMiniHeaders: storedMiniHeaders[5:6], - }, - // Combining two or more filters { - name: "Number >= 3 AND Timestamp < h", + name: "Number >= 3 AND Timestamp < 700", filters: []MiniHeaderFilter{ { Field: MFNumber, @@ -1963,7 +1939,7 @@ func lessByTimestampDescAndNumberDesc(miniHeaders []*types.MiniHeader) func(i, j } } -func assertMiniHeaderSlicesAreEqual(t *testing.T, expected, actual []*types.MiniHeader) { +func assertMiniHeaderSlicesAreEqual(t testing.TB, expected, actual []*types.MiniHeader) { assert.Len(t, actual, len(expected), "wrong number of miniheaders") for i, expectedMiniHeader := range expected { if i >= len(actual) { @@ -1983,7 +1959,7 @@ func assertMiniHeaderSlicesAreEqual(t *testing.T, expected, actual []*types.Mini } } -func assertMiniHeaderSlicesAreUnsortedEqual(t *testing.T, expected, actual []*types.MiniHeader) { +func assertMiniHeaderSlicesAreUnsortedEqual(t testing.TB, expected, actual []*types.MiniHeader) { // Make a copy of the given mini headers so we don't mess up the original when sorting them. expectedCopy := make([]*types.MiniHeader, len(expected)) copy(expectedCopy, expected) @@ -1994,7 +1970,7 @@ func assertMiniHeaderSlicesAreUnsortedEqual(t *testing.T, expected, actual []*ty assertMiniHeaderSlicesAreEqual(t, expected, actual) } -func assertMiniHeadersAreEqual(t *testing.T, expected, actual *types.MiniHeader) { +func assertMiniHeadersAreEqual(t testing.TB, expected, actual *types.MiniHeader) { if expected.Timestamp.Equal(actual.Timestamp) { // HACK(albrow): In this case, the two values represent the same time. // This is what we care about, but the assert package might consider diff --git a/db/dexie_implementation.go b/db/dexie_implementation.go index 6a51dc41c..58a2a1a74 100644 --- a/db/dexie_implementation.go +++ b/db/dexie_implementation.go @@ -8,6 +8,7 @@ import ( "fmt" "math/big" "path/filepath" + "runtime/debug" "syscall/js" "github.com/0xProject/0x-mesh/common/types" @@ -230,25 +231,14 @@ func (db *DB) AddMiniHeaders(miniHeaders []*types.MiniHeader) (added []*types.Mi err = recoverError(r) } }() - jsMiniHeaders, err := jsutil.InefficientlyConvertToJS(dexietypes.MiniHeadersFromCommonType(miniHeaders)) - if err != nil { - return nil, nil, err - } + jsMiniHeaders := dexietypes.MiniHeadersFromCommonType(miniHeaders) jsResult, err := jsutil.AwaitPromiseContext(db.ctx, db.dexie.Call("addMiniHeadersAsync", jsMiniHeaders)) if err != nil { return nil, nil, convertJSError(err) } jsAdded := jsResult.Get("added") - var dexieAdded []*dexietypes.MiniHeader - if err := jsutil.InefficientlyConvertFromJS(jsAdded, &dexieAdded); err != nil { - return nil, nil, err - } jsRemoved := jsResult.Get("removed") - var dexieRemoved []*dexietypes.MiniHeader - if err := jsutil.InefficientlyConvertFromJS(jsRemoved, &dexieRemoved); err != nil { - return nil, nil, err - } - return dexietypes.MiniHeadersToCommonType(dexieAdded), dexietypes.MiniHeadersToCommonType(dexieRemoved), nil + return dexietypes.MiniHeadersToCommonType(jsAdded), dexietypes.MiniHeadersToCommonType(jsRemoved), nil } func (db *DB) GetMiniHeader(hash common.Hash) (miniHeader *types.MiniHeader, err error) { @@ -261,11 +251,7 @@ func (db *DB) GetMiniHeader(hash common.Hash) (miniHeader *types.MiniHeader, err if err != nil { return nil, convertJSError(err) } - var dexieMiniHeader dexietypes.MiniHeader - if err := jsutil.InefficientlyConvertFromJS(jsMiniHeader, &dexieMiniHeader); err != nil { - return nil, err - } - return dexietypes.MiniHeaderToCommonType(&dexieMiniHeader), nil + return dexietypes.MiniHeaderToCommonType(jsMiniHeader), nil } func (db *DB) FindMiniHeaders(query *MiniHeaderQuery) (miniHeaders []*types.MiniHeader, err error) { @@ -282,11 +268,7 @@ func (db *DB) FindMiniHeaders(query *MiniHeaderQuery) (miniHeaders []*types.Mini if err != nil { return nil, convertJSError(err) } - var dexieMiniHeaders []*dexietypes.MiniHeader - if err := jsutil.InefficientlyConvertFromJS(jsMiniHeaders, &dexieMiniHeaders); err != nil { - return nil, err - } - return dexietypes.MiniHeadersToCommonType(dexieMiniHeaders), nil + return dexietypes.MiniHeadersToCommonType(jsMiniHeaders), nil } func (db *DB) DeleteMiniHeader(hash common.Hash) (err error) { @@ -316,11 +298,7 @@ func (db *DB) DeleteMiniHeaders(query *MiniHeaderQuery) (deleted []*types.MiniHe if err != nil { return nil, convertJSError(err) } - var dexieMiniHeaders []*dexietypes.MiniHeader - if err := jsutil.InefficientlyConvertFromJS(jsMiniHeaders, &dexieMiniHeaders); err != nil { - return nil, err - } - return dexietypes.MiniHeadersToCommonType(dexieMiniHeaders), nil + return dexietypes.MiniHeadersToCommonType(jsMiniHeaders), nil } func (db *DB) GetMetadata() (metadata *types.Metadata, err error) { @@ -387,6 +365,9 @@ func (db *DB) UpdateMetadata(updateFunc func(oldmetadata *types.Metadata) (newMe } func recoverError(e interface{}) error { + if e != nil { + debug.PrintStack() + } switch e := e.(type) { case error: return e diff --git a/db/dexietypes/dexietypes.go b/db/dexietypes/dexietypes.go index 00aa11e6f..a9b57a5e0 100644 --- a/db/dexietypes/dexietypes.go +++ b/db/dexietypes/dexietypes.go @@ -1,16 +1,24 @@ +// +build js,wasm + package dexietypes // Note(albrow): Could be optimized if needed by more directly converting between // Go types and JavaScript types instead of using jsutil.IneffecientlyConvertX. +// The technique we used for MiniHeaders could be used in more places if needed. import ( + "bytes" + "encoding/gob" "encoding/json" + "errors" "fmt" "math/big" "strconv" + "syscall/js" "time" "github.com/0xProject/0x-mesh/common/types" + "github.com/0xProject/0x-mesh/packages/browser/go/jsutil" "github.com/ethereum/go-ethereum/common" ethmath "github.com/ethereum/go-ethereum/common/math" ethtypes "github.com/ethereum/go-ethereum/core/types" @@ -87,15 +95,19 @@ func SortedBigIntFromInt64(v int64) *SortedBigInt { return NewSortedBigInt(big.NewInt(v)) } -func (i *SortedBigInt) MarshalJSON() ([]byte, error) { - if i == nil || i.Int == nil { - return json.Marshal(nil) - } +func (i *SortedBigInt) FixedLengthString() string { // Note(albrow), strings in Dexie.js are sorted in alphanumerical order, not // numerical order. In order to sort by numerical order, we need to pad with // zeroes. The maximum length of an unsigned 256 bit integer is 80, so we // pad with zeroes such that the length of the number is always 80. - return json.Marshal(fmt.Sprintf("%080s", i.Int.String())) + return fmt.Sprintf("%080s", i.Int.String()) +} + +func (i *SortedBigInt) MarshalJSON() ([]byte, error) { + if i == nil || i.Int == nil { + return json.Marshal(nil) + } + return json.Marshal(i.FixedLengthString()) } func (i *SortedBigInt) UnmarshalJSON(data []byte) error { @@ -149,14 +161,6 @@ type Order struct { ParsedMakerFeeAssetData string `json:"parsedMakerFeeAssetData"` } -type MiniHeader struct { - Hash common.Hash `json:"hash"` - Parent common.Hash `json:"parent"` - Number *SortedBigInt `json:"number"` - Timestamp time.Time `json:"timestamp"` - Logs string `json:"logs"` -} - type Metadata struct { EthereumChainID int `json:"ethereumChainID"` EthRPCRequestsSentInCurrentUTCDay int `json:"ethRPCRequestsSentInCurrentUTCDay"` @@ -294,57 +298,76 @@ func SingleAssetDataFromCommonType(singleAssetData *types.SingleAssetData) *Sing } } -func MiniHeaderToCommonType(miniHeader *MiniHeader) *types.MiniHeader { - if miniHeader == nil { +func MiniHeaderToCommonType(miniHeader js.Value) *types.MiniHeader { + if jsutil.IsNullOrUndefined(miniHeader) { return nil } + number, ok := ethmath.ParseBig256(miniHeader.Get("number").String()) + if !ok { + panic(errors.New("could not convert number to uint64")) + } + timestamp, err := time.Parse(time.RFC3339Nano, miniHeader.Get("timestamp").String()) + if err != nil { + panic(errors.New("could not convert timestamp: " + err.Error())) + } return &types.MiniHeader{ - Hash: miniHeader.Hash, - Parent: miniHeader.Parent, - Number: miniHeader.Number.Int, - Timestamp: miniHeader.Timestamp, - Logs: EventLogsToCommonType(miniHeader.Logs), + Hash: common.HexToHash(miniHeader.Get("hash").String()), + Parent: common.HexToHash(miniHeader.Get("parent").String()), + Number: number, + Timestamp: timestamp, + Logs: EventLogsToCommonType(miniHeader.Get("logs")), } } -func MiniHeaderFromCommonType(miniHeader *types.MiniHeader) *MiniHeader { +func MiniHeaderFromCommonType(miniHeader *types.MiniHeader) js.Value { if miniHeader == nil { - return nil - } - return &MiniHeader{ - Hash: miniHeader.Hash, - Parent: miniHeader.Parent, - Number: NewSortedBigInt(miniHeader.Number), - Timestamp: miniHeader.Timestamp, - Logs: EventLogsFromCommonType(miniHeader.Logs), + return js.Null() } + return js.ValueOf( + map[string]interface{}{ + "hash": miniHeader.Hash.Hex(), + "parent": miniHeader.Parent.Hex(), + "number": NewSortedBigInt(miniHeader.Number).FixedLengthString(), + "timestamp": miniHeader.Timestamp.Format(time.RFC3339Nano), + "logs": EventLogsFromCommonType(miniHeader.Logs), + }, + ) } -func MiniHeadersToCommonType(miniHeaders []*MiniHeader) []*types.MiniHeader { - result := make([]*types.MiniHeader, len(miniHeaders)) - for i, miniHeader := range miniHeaders { - result[i] = MiniHeaderToCommonType(miniHeader) +func MiniHeadersToCommonType(miniHeaders js.Value) []*types.MiniHeader { + result := make([]*types.MiniHeader, miniHeaders.Length()) + for i := range result { + result[i] = MiniHeaderToCommonType(miniHeaders.Index(i)) } return result } -func MiniHeadersFromCommonType(miniHeaders []*types.MiniHeader) []*MiniHeader { - result := make([]*MiniHeader, len(miniHeaders)) +func MiniHeadersFromCommonType(miniHeaders []*types.MiniHeader) js.Value { + result := make([]interface{}, len(miniHeaders)) for i, miniHeader := range miniHeaders { result[i] = MiniHeaderFromCommonType(miniHeader) } - return result + return js.ValueOf(result) } -func EventLogsToCommonType(eventLogs string) []ethtypes.Log { +func EventLogsToCommonType(eventLogs js.Value) []ethtypes.Log { var result []ethtypes.Log - _ = json.Unmarshal([]byte(eventLogs), &result) + buf := make([]byte, eventLogs.Get("length").Int()) + js.CopyBytesToGo(buf, eventLogs) + if err := gob.NewDecoder(bytes.NewBuffer(buf)).Decode(&result); err != nil { + panic(err) + } return result } -func EventLogsFromCommonType(eventLogs []ethtypes.Log) string { - result, _ := json.Marshal(eventLogs) - return string(result) +func EventLogsFromCommonType(eventLogs []ethtypes.Log) js.Value { + buf := &bytes.Buffer{} + if err := gob.NewEncoder(buf).Encode(eventLogs); err != nil { + panic(err) + } + result := js.Global().Get("Uint8Array").New(len(buf.Bytes())) + js.CopyBytesToJS(result, buf.Bytes()) + return result } func MetadataToCommonType(metadata *Metadata) *types.Metadata { diff --git a/db/types_js.go b/db/types_js.go index d50350dcd..08345e86d 100644 --- a/db/types_js.go +++ b/db/types_js.go @@ -17,7 +17,11 @@ func (query *OrderQuery) JSValue() js.Value { if query == nil { return js.Null() } - value, _ := jsutil.InefficientlyConvertToJS(query) + value, err := jsutil.InefficientlyConvertToJS(query) + if err != nil { + // Should never happen + panic(err) + } return value } @@ -25,6 +29,10 @@ func (query *MiniHeaderQuery) JSValue() js.Value { if query == nil { return js.Null() } - value, _ := jsutil.InefficientlyConvertToJS(query) + value, err := jsutil.InefficientlyConvertToJS(query) + if err != nil { + // Should never happen + panic(err) + } return value } diff --git a/packages/browser-lite/src/database.ts b/packages/browser-lite/src/database.ts index 0ff79f174..e5eec07f1 100644 --- a/packages/browser-lite/src/database.ts +++ b/packages/browser-lite/src/database.ts @@ -98,7 +98,7 @@ export interface MiniHeader { parent: string; number: string; timestamp: string; - logs: string; + logs: Uint8Array; } export type MiniHeaderField = keyof MiniHeader; @@ -153,7 +153,7 @@ export class Database { this._db.version(1).stores({ orders: '&hash,chainId,makerAddress,makerAssetData,makerAssetAmount,makerFee,makerFeeAssetData,takerAddress,takerAssetData,takerFeeAssetData,takerAssetAmount,takerFee,senderAddress,feeRecipientAddress,expirationTimeSeconds,salt,signature,exchangeAddress,fillableTakerAssetAmount,lastUpdated,isRemoved,isPinned,parsedMakerAssetData,parsedMakerFeeAssetData,[isNotPinned+expirationTimeSeconds]', - miniHeaders: '&hash,parent,number,timestamp,logs', + miniHeaders: '&hash,parent,number,timestamp', metadata: 'ðereumChainID', }); From e8afa0d4e2f9e7b460f8ea37aba61f50bacda3df Mon Sep 17 00:00:00 2001 From: Alex Browne Date: Tue, 16 Jun 2020 18:01:57 -0700 Subject: [PATCH 2/3] Add test for MiniHeaderToCommonType and MiniHeaderFromCommonType --- db/dexietypes/dexietypes_test.go | 59 ++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 db/dexietypes/dexietypes_test.go diff --git a/db/dexietypes/dexietypes_test.go b/db/dexietypes/dexietypes_test.go new file mode 100644 index 000000000..d994049b6 --- /dev/null +++ b/db/dexietypes/dexietypes_test.go @@ -0,0 +1,59 @@ +// +build js,wasm + +package dexietypes + +import ( + "testing" + "time" + + "github.com/0xProject/0x-mesh/common/types" + "github.com/ethereum/go-ethereum/common" + ethmath "github.com/ethereum/go-ethereum/common/math" + ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/stretchr/testify/assert" +) + +func TestMiniHeadersConversion(t *testing.T) { + originalMiniHeader := &types.MiniHeader{ + Hash: common.HexToHash("0x00a3ce0e9cbcb5c4d79c1c19df276a0db954a487b895dca1d4deb35e39859eb8"), + Parent: common.HexToHash("0x302febf685d86eaa2339e6f9b226e36d69ebf48b1bfd10b44fc51fcaaefbf148"), + Number: ethmath.MaxBig256, + Timestamp: time.Date(1992, time.September, 29, 8, 45, 15, 1230, time.UTC), + Logs: []ethtypes.Log{ + { + Address: common.HexToAddress("0x21ab6c9fac80c59d401b37cb43f81ea9dde7fe34"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000004d8a4aa1f304f9632cf3877473445d85c577fe5d"), + common.HexToHash("0x0000000000000000000000004bdd0d16cfa18e33860470fc4d65c6f5cee60959"), + }, + Data: common.Hex2Bytes("0000000000000000000000000000000000000000000000000000000337ad34c0"), + BlockNumber: 30, + TxHash: common.HexToHash("0xd9bb5f9e888ee6f74bedcda811c2461230f247c205849d6f83cb6c3925e54586"), + TxIndex: 0, + BlockHash: common.HexToHash("0x6bbf9b6e836207ab25379c20e517a89090cbbaf8877746f6ed7fb6820770816b"), + Index: 0, + Removed: false, + }, + { + Address: common.HexToAddress("0x21ab6c9fac80c59d401b37cb43f81ea9dde7fe34"), + Topics: []common.Hash{ + common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), + common.HexToHash("0x0000000000000000000000004d8a4aa1f304f9632cf3877473445d85c577fe5d"), + common.HexToHash("0x0000000000000000000000004bdd0d16cfa18e33860470fc4d65c6f5cee60959"), + }, + Data: common.Hex2Bytes("00000000000000000000000000000000000000000000000000000000deadbeef"), + BlockNumber: 31, + TxHash: common.HexToHash("0xd9bb5f9e888ee6f74bedcda811c2461230f247c205849d6f83cb6c3925e54586"), + TxIndex: 1, + BlockHash: common.HexToHash("0x6bbf9b6e836207ab25379c20e517a89090cbbaf8877746f6ed7fb6820770816b"), + Index: 2, + Removed: true, + }, + }, + } + + // Convert to JS/Dexie type and back. Make sure we get back the same values that we started with. + gotMiniHeader := MiniHeaderToCommonType(MiniHeaderFromCommonType(originalMiniHeader)) + assert.Equal(t, originalMiniHeader, gotMiniHeader) +} From 2b47622c09c7c06846bca11aec40b1e77f3e913f Mon Sep 17 00:00:00 2001 From: Alex Browne Date: Wed, 17 Jun 2020 11:18:39 -0700 Subject: [PATCH 3/3] Rename a variable --- db/dexietypes/dexietypes_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/dexietypes/dexietypes_test.go b/db/dexietypes/dexietypes_test.go index d994049b6..0b29ded53 100644 --- a/db/dexietypes/dexietypes_test.go +++ b/db/dexietypes/dexietypes_test.go @@ -54,6 +54,6 @@ func TestMiniHeadersConversion(t *testing.T) { } // Convert to JS/Dexie type and back. Make sure we get back the same values that we started with. - gotMiniHeader := MiniHeaderToCommonType(MiniHeaderFromCommonType(originalMiniHeader)) - assert.Equal(t, originalMiniHeader, gotMiniHeader) + convertedMiniHeader := MiniHeaderToCommonType(MiniHeaderFromCommonType(originalMiniHeader)) + assert.Equal(t, originalMiniHeader, convertedMiniHeader) }