@sentio/sdk 2.3.6-rc.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/aptos/tests/aptos.test.js.map +1 -1
- package/lib/eth/account-processor.d.ts +2 -2
- package/lib/eth/account-processor.js +2 -2
- package/lib/eth/account-processor.js.map +1 -1
- package/lib/eth/builtin/eacaggregatorproxy.d.ts +2 -2
- package/lib/eth/builtin/eacaggregatorproxy.js +2 -2
- package/lib/eth/builtin/eacaggregatorproxy.js.map +1 -1
- package/lib/eth/builtin/erc1155.d.ts +2 -2
- package/lib/eth/builtin/erc1155.js +2 -2
- package/lib/eth/builtin/erc1155.js.map +1 -1
- package/lib/eth/builtin/erc20.d.ts +2 -2
- package/lib/eth/builtin/erc20.js +2 -2
- package/lib/eth/builtin/erc20.js.map +1 -1
- package/lib/eth/builtin/erc20bytes.d.ts +2 -2
- package/lib/eth/builtin/erc20bytes.js +2 -2
- package/lib/eth/builtin/erc20bytes.js.map +1 -1
- package/lib/eth/builtin/erc721.d.ts +2 -2
- package/lib/eth/builtin/erc721.js +2 -2
- package/lib/eth/builtin/erc721.js.map +1 -1
- package/lib/eth/builtin/internal/{eacaggregatorproxy_processor.d.ts → eacaggregatorproxy-processor.d.ts} +0 -0
- package/lib/eth/builtin/internal/{eacaggregatorproxy_processor.js → eacaggregatorproxy-processor.js} +1 -1
- package/lib/eth/builtin/internal/{eacaggregatorproxy_processor.js.map → eacaggregatorproxy-processor.js.map} +1 -1
- package/lib/eth/builtin/internal/{eacaggregatorproxy_test-utils.d.ts → eacaggregatorproxy-test-utils.d.ts} +0 -0
- package/lib/eth/builtin/internal/{eacaggregatorproxy_test-utils.js → eacaggregatorproxy-test-utils.js} +2 -2
- package/lib/eth/builtin/internal/{eacaggregatorproxy_test-utils.js.map → eacaggregatorproxy-test-utils.js.map} +1 -1
- package/lib/eth/builtin/internal/{erc1155_processor.d.ts → erc1155-processor.d.ts} +0 -0
- package/lib/eth/builtin/internal/{erc1155_processor.js → erc1155-processor.js} +1 -1
- package/lib/eth/builtin/internal/{erc1155_processor.js.map → erc1155-processor.js.map} +1 -1
- package/lib/eth/builtin/internal/{erc1155_test-utils.d.ts → erc1155-test-utils.d.ts} +0 -0
- package/lib/eth/builtin/internal/{erc1155_test-utils.js → erc1155-test-utils.js} +2 -2
- package/lib/eth/builtin/internal/{erc1155_test-utils.js.map → erc1155-test-utils.js.map} +1 -1
- package/lib/eth/builtin/internal/{erc20_processor.d.ts → erc20-processor.d.ts} +0 -0
- package/lib/eth/builtin/internal/{erc20_processor.js → erc20-processor.js} +1 -1
- package/lib/eth/builtin/internal/{erc20_processor.js.map → erc20-processor.js.map} +1 -1
- package/lib/eth/builtin/internal/{erc20_test-utils.d.ts → erc20-test-utils.d.ts} +0 -0
- package/lib/eth/builtin/internal/{erc20_test-utils.js → erc20-test-utils.js} +2 -2
- package/lib/eth/builtin/internal/{erc20_test-utils.js.map → erc20-test-utils.js.map} +1 -1
- package/lib/eth/builtin/internal/{erc20bytes_processor.d.ts → erc20bytes-processor.d.ts} +0 -0
- package/lib/eth/builtin/internal/{erc20bytes_processor.js → erc20bytes-processor.js} +1 -1
- package/lib/eth/builtin/internal/{erc20bytes_processor.js.map → erc20bytes-processor.js.map} +1 -1
- package/lib/eth/builtin/internal/{erc20bytes_test-utils.d.ts → erc20bytes-test-utils.d.ts} +0 -0
- package/lib/eth/builtin/internal/{erc20bytes_test-utils.js → erc20bytes-test-utils.js} +2 -2
- package/lib/eth/builtin/internal/{erc20bytes_test-utils.js.map → erc20bytes-test-utils.js.map} +1 -1
- package/lib/eth/builtin/internal/{erc721_processor.d.ts → erc721-processor.d.ts} +0 -0
- package/lib/eth/builtin/internal/{erc721_processor.js → erc721-processor.js} +1 -1
- package/lib/eth/builtin/internal/{erc721_processor.js.map → erc721-processor.js.map} +1 -1
- package/lib/eth/builtin/internal/{erc721_test-utils.d.ts → erc721-test-utils.d.ts} +0 -0
- package/lib/eth/builtin/internal/{erc721_test-utils.js → erc721-test-utils.js} +2 -2
- package/lib/eth/builtin/internal/{erc721_test-utils.js.map → erc721-test-utils.js.map} +1 -1
- package/lib/eth/builtin/internal/{weth9_processor.d.ts → weth9-processor.d.ts} +0 -0
- package/lib/eth/builtin/internal/{weth9_processor.js → weth9-processor.js} +1 -1
- package/lib/eth/builtin/internal/{weth9_processor.js.map → weth9-processor.js.map} +1 -1
- package/lib/eth/builtin/internal/{weth9_test-utils.d.ts → weth9-test-utils.d.ts} +0 -0
- package/lib/eth/builtin/internal/{weth9_test-utils.js → weth9-test-utils.js} +2 -2
- package/lib/eth/builtin/internal/{weth9_test-utils.js.map → weth9-test-utils.js.map} +1 -1
- package/lib/eth/builtin/weth9.d.ts +2 -2
- package/lib/eth/builtin/weth9.js +2 -2
- package/lib/eth/builtin/weth9.js.map +1 -1
- package/lib/eth/codegen/ethers-sentio.js +2 -2
- package/lib/eth/codegen/ethers-sentio.js.map +1 -1
- package/lib/eth/codegen/file.js +3 -3
- package/lib/eth/codegen/file.js.map +1 -1
- package/lib/eth/generic-processor.test.js.map +1 -1
- package/lib/eth/tests/account.test.d.ts +1 -0
- package/lib/eth/tests/account.test.js.map +1 -0
- package/lib/eth/tests/codegen.test.d.ts +1 -0
- package/lib/eth/tests/codegen.test.js.map +1 -0
- package/lib/eth/tests/erc20-template.test.d.ts +1 -0
- package/lib/eth/tests/erc20-template.test.js.map +1 -0
- package/lib/eth/tests/erc20.d.ts +1 -0
- package/lib/eth/tests/erc20.js +52 -0
- package/lib/eth/tests/erc20.js.map +1 -0
- package/lib/eth/tests/erc20.test.d.ts +1 -0
- package/lib/eth/tests/erc20.test.js.map +1 -0
- package/lib/eth/tests/error-capture.test.d.ts +1 -0
- package/lib/eth/tests/error-capture.test.js.map +1 -0
- package/lib/eth/tests/logger.test.d.ts +1 -0
- package/lib/eth/tests/logger.test.js.map +1 -0
- package/lib/eth/tests/types/anyswaprouter.d.ts +3 -0
- package/lib/eth/tests/types/anyswaprouter.js +7 -0
- package/lib/eth/tests/types/anyswaprouter.js.map +1 -0
- package/lib/eth/tests/types/commitmentpool.d.ts +3 -0
- package/lib/eth/tests/types/commitmentpool.js +7 -0
- package/lib/eth/tests/types/commitmentpool.js.map +1 -0
- package/lib/eth/tests/types/index.d.ts +12 -0
- package/lib/eth/tests/types/index.js +16 -0
- package/lib/eth/tests/types/index.js.map +1 -0
- package/lib/eth/tests/types/internal/AnyswapRouter.d.ts +122 -0
- package/lib/eth/tests/types/internal/AnyswapRouter.js +2 -0
- package/lib/eth/tests/types/internal/AnyswapRouter.js.map +1 -0
- package/lib/eth/tests/types/internal/CommitmentPool.d.ts +176 -0
- package/lib/eth/tests/types/internal/CommitmentPool.js +2 -0
- package/lib/eth/tests/types/internal/CommitmentPool.js.map +1 -0
- package/lib/eth/tests/types/internal/MembershipStakerV3.d.ts +81 -0
- package/lib/eth/tests/types/internal/MembershipStakerV3.js +2 -0
- package/lib/eth/tests/types/internal/MembershipStakerV3.js.map +1 -0
- package/lib/eth/tests/types/internal/Pyth.d.ts +204 -0
- package/lib/eth/tests/types/internal/Pyth.js +2 -0
- package/lib/eth/tests/types/internal/Pyth.js.map +1 -0
- package/lib/eth/tests/types/internal/Seaport.d.ts +350 -0
- package/lib/eth/tests/types/internal/Seaport.js +2 -0
- package/lib/eth/tests/types/internal/Seaport.js.map +1 -0
- package/lib/eth/tests/types/internal/TokenExchange.d.ts +128 -0
- package/lib/eth/tests/types/internal/TokenExchange.js +2 -0
- package/lib/eth/tests/types/internal/TokenExchange.js.map +1 -0
- package/lib/eth/tests/types/internal/anyswaprouter-processor.d.ts +463 -0
- package/lib/eth/tests/types/internal/anyswaprouter-processor.js +425 -0
- package/lib/eth/tests/types/internal/anyswaprouter-processor.js.map +1 -0
- package/lib/eth/tests/types/internal/anyswaprouter-test-utils.d.ts +9 -0
- package/lib/eth/tests/types/internal/anyswaprouter-test-utils.js +124 -0
- package/lib/eth/tests/types/internal/anyswaprouter-test-utils.js.map +1 -0
- package/lib/eth/tests/types/internal/commitmentpool-processor.d.ts +348 -0
- package/lib/eth/tests/types/internal/commitmentpool-processor.js +607 -0
- package/lib/eth/tests/types/internal/commitmentpool-processor.js.map +1 -0
- package/lib/eth/tests/types/internal/commitmentpool-test-utils.d.ts +9 -0
- package/lib/eth/tests/types/internal/commitmentpool-test-utils.js +87 -0
- package/lib/eth/tests/types/internal/commitmentpool-test-utils.js.map +1 -0
- package/lib/eth/tests/types/internal/common.d.ts +10 -0
- package/lib/eth/tests/types/internal/common.js +8 -0
- package/lib/eth/tests/types/internal/common.js.map +1 -0
- package/lib/eth/tests/types/internal/factories/AnyswapRouter__factory.d.ts +988 -0
- package/lib/eth/tests/types/internal/factories/AnyswapRouter__factory.js +1269 -0
- package/lib/eth/tests/types/internal/factories/AnyswapRouter__factory.js.map +1 -0
- package/lib/eth/tests/types/internal/factories/CommitmentPool__factory.d.ts +792 -0
- package/lib/eth/tests/types/internal/factories/CommitmentPool__factory.js +1040 -0
- package/lib/eth/tests/types/internal/factories/CommitmentPool__factory.js.map +1 -0
- package/lib/eth/tests/types/internal/factories/MembershipStakerV3__factory.d.ts +549 -0
- package/lib/eth/tests/types/internal/factories/MembershipStakerV3__factory.js +721 -0
- package/lib/eth/tests/types/internal/factories/MembershipStakerV3__factory.js.map +1 -0
- package/lib/eth/tests/types/internal/factories/Pyth__factory.d.ts +1130 -0
- package/lib/eth/tests/types/internal/factories/Pyth__factory.js +1486 -0
- package/lib/eth/tests/types/internal/factories/Pyth__factory.js.map +1 -0
- package/lib/eth/tests/types/internal/factories/Seaport__factory.d.ts +2018 -0
- package/lib/eth/tests/types/internal/factories/Seaport__factory.js +2610 -0
- package/lib/eth/tests/types/internal/factories/Seaport__factory.js.map +1 -0
- package/lib/eth/tests/types/internal/factories/TokenExchange__factory.d.ts +651 -0
- package/lib/eth/tests/types/internal/factories/TokenExchange__factory.js +853 -0
- package/lib/eth/tests/types/internal/factories/TokenExchange__factory.js.map +1 -0
- package/lib/eth/tests/types/internal/factories/index.d.ts +6 -0
- package/lib/eth/tests/types/internal/factories/index.js +10 -0
- package/lib/eth/tests/types/internal/factories/index.js.map +1 -0
- package/lib/eth/tests/types/internal/index.d.ts +13 -0
- package/lib/eth/tests/types/internal/index.js +8 -0
- package/lib/eth/tests/types/internal/index.js.map +1 -0
- package/lib/eth/tests/types/internal/membershipstakerv3-processor.d.ts +287 -0
- package/lib/eth/tests/types/internal/membershipstakerv3-processor.js +596 -0
- package/lib/eth/tests/types/internal/membershipstakerv3-processor.js.map +1 -0
- package/lib/eth/tests/types/internal/membershipstakerv3-test-utils.d.ts +11 -0
- package/lib/eth/tests/types/internal/membershipstakerv3-test-utils.js +109 -0
- package/lib/eth/tests/types/internal/membershipstakerv3-test-utils.js.map +1 -0
- package/lib/eth/tests/types/internal/pyth-processor.d.ts +422 -0
- package/lib/eth/tests/types/internal/pyth-processor.js +890 -0
- package/lib/eth/tests/types/internal/pyth-processor.js.map +1 -0
- package/lib/eth/tests/types/internal/pyth-test-utils.d.ts +13 -0
- package/lib/eth/tests/types/internal/pyth-test-utils.js +131 -0
- package/lib/eth/tests/types/internal/pyth-test-utils.js.map +1 -0
- package/lib/eth/tests/types/internal/seaport-processor.d.ts +211 -0
- package/lib/eth/tests/types/internal/seaport-processor.js +237 -0
- package/lib/eth/tests/types/internal/seaport-processor.js.map +1 -0
- package/lib/eth/tests/types/internal/seaport-test-utils.d.ts +6 -0
- package/lib/eth/tests/types/internal/seaport-test-utils.js +61 -0
- package/lib/eth/tests/types/internal/seaport-test-utils.js.map +1 -0
- package/lib/eth/tests/types/internal/tokenexchange-processor.d.ts +334 -0
- package/lib/eth/tests/types/internal/tokenexchange-processor.js +667 -0
- package/lib/eth/tests/types/internal/tokenexchange-processor.js.map +1 -0
- package/lib/eth/tests/types/internal/tokenexchange-test-utils.d.ts +13 -0
- package/lib/eth/tests/types/internal/tokenexchange-test-utils.js +149 -0
- package/lib/eth/tests/types/internal/tokenexchange-test-utils.js.map +1 -0
- package/lib/eth/tests/types/membershipstakerv3.d.ts +3 -0
- package/lib/eth/tests/types/membershipstakerv3.js +7 -0
- package/lib/eth/tests/types/membershipstakerv3.js.map +1 -0
- package/lib/eth/tests/types/pyth.d.ts +3 -0
- package/lib/eth/tests/types/pyth.js +7 -0
- package/lib/eth/tests/types/pyth.js.map +1 -0
- package/lib/eth/tests/types/seaport.d.ts +3 -0
- package/lib/eth/tests/types/seaport.js +7 -0
- package/lib/eth/tests/types/seaport.js.map +1 -0
- package/lib/eth/tests/types/tokenexchange.d.ts +3 -0
- package/lib/eth/tests/types/tokenexchange.js +7 -0
- package/lib/eth/tests/types/tokenexchange.js.map +1 -0
- package/lib/solana/builtin/types.d.ts +8 -8
- package/lib/solana/tests/solana.test.js.map +1 -1
- package/lib/sui/sui-processor.js +2 -8
- package/lib/sui/sui-processor.js.map +1 -1
- package/lib/sui/tests/sui.test.js.map +1 -1
- package/lib/sui/utils.d.ts +2 -0
- package/lib/sui/utils.js +11 -0
- package/lib/sui/utils.js.map +1 -0
- package/lib/testing/aptos-facet.d.ts +12 -0
- package/lib/testing/aptos-facet.js +91 -0
- package/lib/testing/aptos-facet.js.map +1 -0
- package/lib/testing/eth-facet.d.ts +27 -0
- package/lib/testing/eth-facet.js +211 -0
- package/lib/testing/eth-facet.js.map +1 -0
- package/lib/testing/solana-facet.d.ts +7 -0
- package/lib/testing/solana-facet.js +22 -0
- package/lib/testing/solana-facet.js.map +1 -0
- package/lib/testing/sui-facet.d.ts +12 -0
- package/lib/testing/sui-facet.js +103 -0
- package/lib/testing/sui-facet.js.map +1 -0
- package/lib/testing/test-processor-server.d.ts +9 -23
- package/lib/testing/test-processor-server.js +13 -227
- package/lib/testing/test-processor-server.js.map +1 -1
- package/lib/utils/dex-price.js +1 -1
- package/lib/utils/dex-price.js.map +1 -1
- package/lib/utils/token.js +1 -1
- package/lib/utils/token.js.map +1 -1
- package/package.json +5 -5
- package/src/eth/account-processor.ts +2 -5
- package/src/eth/builtin/eacaggregatorproxy.ts +2 -2
- package/src/eth/builtin/erc1155.ts +2 -2
- package/src/eth/builtin/erc20.ts +2 -2
- package/src/eth/builtin/erc20bytes.ts +2 -2
- package/src/eth/builtin/erc721.ts +2 -2
- package/src/eth/builtin/internal/{eacaggregatorproxy_processor.ts → eacaggregatorproxy-processor.ts} +0 -0
- package/src/eth/builtin/internal/{eacaggregatorproxy_test-utils.ts → eacaggregatorproxy-test-utils.ts} +1 -1
- package/src/eth/builtin/internal/{erc1155_processor.ts → erc1155-processor.ts} +0 -0
- package/src/eth/builtin/internal/{erc1155_test-utils.ts → erc1155-test-utils.ts} +1 -1
- package/src/eth/builtin/internal/{erc20_processor.ts → erc20-processor.ts} +0 -0
- package/src/eth/builtin/internal/{erc20_test-utils.ts → erc20-test-utils.ts} +1 -1
- package/src/eth/builtin/internal/{erc20bytes_processor.ts → erc20bytes-processor.ts} +0 -0
- package/src/eth/builtin/internal/{erc20bytes_test-utils.ts → erc20bytes-test-utils.ts} +1 -1
- package/src/eth/builtin/internal/{erc721_processor.ts → erc721-processor.ts} +0 -0
- package/src/eth/builtin/internal/{erc721_test-utils.ts → erc721-test-utils.ts} +1 -1
- package/src/eth/builtin/internal/{weth9_processor.ts → weth9-processor.ts} +0 -0
- package/src/eth/builtin/internal/{weth9_test-utils.ts → weth9-test-utils.ts} +1 -1
- package/src/eth/builtin/weth9.ts +2 -2
- package/src/eth/codegen/ethers-sentio.ts +2 -2
- package/src/eth/codegen/file.ts +3 -3
- package/src/eth/tests/abis/eth/CommitmentPool.json +1034 -0
- package/src/eth/tests/abis/eth/MembershipStakerV3.json +706 -0
- package/src/eth/tests/abis/eth/Pyth.json +1471 -0
- package/src/eth/tests/abis/eth/Seaport.json +2595 -0
- package/src/eth/tests/abis/eth/TokenExchange.json +838 -0
- package/src/eth/tests/abis/eth/anyswapRouter.json +490 -0
- package/src/eth/tests/erc20.ts +63 -0
- package/src/eth/tests/types/anyswaprouter.ts +7 -0
- package/src/eth/tests/types/commitmentpool.ts +7 -0
- package/src/eth/tests/types/index.ts +33 -0
- package/src/eth/tests/types/internal/AnyswapRouter.ts +122 -0
- package/src/eth/tests/types/internal/CommitmentPool.ts +208 -0
- package/src/eth/tests/types/internal/MembershipStakerV3.ts +108 -0
- package/src/eth/tests/types/internal/Pyth.ts +246 -0
- package/src/eth/tests/types/internal/Seaport.ts +389 -0
- package/src/eth/tests/types/internal/TokenExchange.ts +142 -0
- package/src/eth/tests/types/internal/anyswaprouter-processor.ts +1396 -0
- package/src/eth/tests/types/internal/anyswaprouter-test-utils.ts +187 -0
- package/src/eth/tests/types/internal/commitmentpool-processor.ts +1575 -0
- package/src/eth/tests/types/internal/commitmentpool-test-utils.ts +150 -0
- package/src/eth/tests/types/internal/common.ts +23 -0
- package/src/eth/tests/types/internal/factories/AnyswapRouter__factory.ts +1278 -0
- package/src/eth/tests/types/internal/factories/CommitmentPool__factory.ts +1049 -0
- package/src/eth/tests/types/internal/factories/MembershipStakerV3__factory.ts +730 -0
- package/src/eth/tests/types/internal/factories/Pyth__factory.ts +1492 -0
- package/src/eth/tests/types/internal/factories/Seaport__factory.ts +2616 -0
- package/src/eth/tests/types/internal/factories/TokenExchange__factory.ts +862 -0
- package/src/eth/tests/types/internal/factories/index.ts +9 -0
- package/src/eth/tests/types/internal/index.ts +16 -0
- package/src/eth/tests/types/internal/membershipstakerv3-processor.ts +1399 -0
- package/src/eth/tests/types/internal/membershipstakerv3-test-utils.ts +188 -0
- package/src/eth/tests/types/internal/pyth-processor.ts +2043 -0
- package/src/eth/tests/types/internal/pyth-test-utils.ts +226 -0
- package/src/eth/tests/types/internal/seaport-processor.ts +678 -0
- package/src/eth/tests/types/internal/seaport-test-utils.ts +100 -0
- package/src/eth/tests/types/internal/tokenexchange-processor.ts +1570 -0
- package/src/eth/tests/types/internal/tokenexchange-test-utils.ts +244 -0
- package/src/eth/tests/types/membershipstakerv3.ts +7 -0
- package/src/eth/tests/types/pyth.ts +7 -0
- package/src/eth/tests/types/seaport.ts +7 -0
- package/src/eth/tests/types/tokenexchange.ts +7 -0
- package/src/sui/sui-processor.ts +2 -7
- package/src/sui/utils.ts +11 -0
- package/src/testing/aptos-facet.ts +111 -0
- package/src/testing/eth-facet.ts +233 -0
- package/src/testing/solana-facet.ts +25 -0
- package/src/testing/sui-facet.ts +119 -0
- package/src/testing/test-processor-server.ts +15 -252
- package/src/utils/dex-price.ts +1 -1
- package/src/utils/token.ts +1 -3
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { LogParams } from "ethers/providers";
|
|
5
|
+
import {
|
|
6
|
+
CommitmentIncludedEventObject,
|
|
7
|
+
CommitmentQueuedEventObject,
|
|
8
|
+
CommitmentSpentEventObject,
|
|
9
|
+
RollupWhitelistDisabledEventObject,
|
|
10
|
+
SanctionsCheckDisabledEventObject,
|
|
11
|
+
SanctionsListEventObject,
|
|
12
|
+
VerifierUpdateDisabledEventObject,
|
|
13
|
+
} from "./CommitmentPool.js";
|
|
14
|
+
import { getCommitmentPoolContract } from "./commitmentpool-processor.js";
|
|
15
|
+
const mockField = {
|
|
16
|
+
blockHash:
|
|
17
|
+
"0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
18
|
+
blockNumber: 0,
|
|
19
|
+
logIndex: 0,
|
|
20
|
+
removed: false,
|
|
21
|
+
transactionHash:
|
|
22
|
+
"0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
23
|
+
transactionIndex: 0,
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export function mockCommitmentIncludedLog(
|
|
27
|
+
contractAddress: string,
|
|
28
|
+
event: CommitmentIncludedEventObject
|
|
29
|
+
): LogParams {
|
|
30
|
+
const contract = getCommitmentPoolContract(contractAddress);
|
|
31
|
+
const encodedLog = contract.rawContract.interface.encodeEventLog(
|
|
32
|
+
"CommitmentIncluded(uint256)",
|
|
33
|
+
[event.commitment]
|
|
34
|
+
);
|
|
35
|
+
return {
|
|
36
|
+
...mockField,
|
|
37
|
+
index: 0,
|
|
38
|
+
address: contractAddress,
|
|
39
|
+
data: encodedLog.data,
|
|
40
|
+
topics: encodedLog.topics,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function mockCommitmentQueuedLog(
|
|
45
|
+
contractAddress: string,
|
|
46
|
+
event: CommitmentQueuedEventObject
|
|
47
|
+
): LogParams {
|
|
48
|
+
const contract = getCommitmentPoolContract(contractAddress);
|
|
49
|
+
const encodedLog = contract.rawContract.interface.encodeEventLog(
|
|
50
|
+
"CommitmentQueued(uint256,uint256,uint256,bytes)",
|
|
51
|
+
[event.commitment, event.rollupFee, event.leafIndex, event.encryptedNote]
|
|
52
|
+
);
|
|
53
|
+
return {
|
|
54
|
+
...mockField,
|
|
55
|
+
index: 0,
|
|
56
|
+
address: contractAddress,
|
|
57
|
+
data: encodedLog.data,
|
|
58
|
+
topics: encodedLog.topics,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function mockCommitmentSpentLog(
|
|
63
|
+
contractAddress: string,
|
|
64
|
+
event: CommitmentSpentEventObject
|
|
65
|
+
): LogParams {
|
|
66
|
+
const contract = getCommitmentPoolContract(contractAddress);
|
|
67
|
+
const encodedLog = contract.rawContract.interface.encodeEventLog(
|
|
68
|
+
"CommitmentSpent(uint256,uint256)",
|
|
69
|
+
[event.rootHash, event.serialNumber]
|
|
70
|
+
);
|
|
71
|
+
return {
|
|
72
|
+
...mockField,
|
|
73
|
+
index: 0,
|
|
74
|
+
address: contractAddress,
|
|
75
|
+
data: encodedLog.data,
|
|
76
|
+
topics: encodedLog.topics,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function mockRollupWhitelistDisabledLog(
|
|
81
|
+
contractAddress: string,
|
|
82
|
+
event: RollupWhitelistDisabledEventObject
|
|
83
|
+
): LogParams {
|
|
84
|
+
const contract = getCommitmentPoolContract(contractAddress);
|
|
85
|
+
const encodedLog = contract.rawContract.interface.encodeEventLog(
|
|
86
|
+
"RollupWhitelistDisabled(bool)",
|
|
87
|
+
[event.state]
|
|
88
|
+
);
|
|
89
|
+
return {
|
|
90
|
+
...mockField,
|
|
91
|
+
index: 0,
|
|
92
|
+
address: contractAddress,
|
|
93
|
+
data: encodedLog.data,
|
|
94
|
+
topics: encodedLog.topics,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function mockSanctionsCheckDisabledLog(
|
|
99
|
+
contractAddress: string,
|
|
100
|
+
event: SanctionsCheckDisabledEventObject
|
|
101
|
+
): LogParams {
|
|
102
|
+
const contract = getCommitmentPoolContract(contractAddress);
|
|
103
|
+
const encodedLog = contract.rawContract.interface.encodeEventLog(
|
|
104
|
+
"SanctionsCheckDisabled(bool)",
|
|
105
|
+
[event.state]
|
|
106
|
+
);
|
|
107
|
+
return {
|
|
108
|
+
...mockField,
|
|
109
|
+
index: 0,
|
|
110
|
+
address: contractAddress,
|
|
111
|
+
data: encodedLog.data,
|
|
112
|
+
topics: encodedLog.topics,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function mockSanctionsListLog(
|
|
117
|
+
contractAddress: string,
|
|
118
|
+
event: SanctionsListEventObject
|
|
119
|
+
): LogParams {
|
|
120
|
+
const contract = getCommitmentPoolContract(contractAddress);
|
|
121
|
+
const encodedLog = contract.rawContract.interface.encodeEventLog(
|
|
122
|
+
"SanctionsList(address)",
|
|
123
|
+
[event.sanctions]
|
|
124
|
+
);
|
|
125
|
+
return {
|
|
126
|
+
...mockField,
|
|
127
|
+
index: 0,
|
|
128
|
+
address: contractAddress,
|
|
129
|
+
data: encodedLog.data,
|
|
130
|
+
topics: encodedLog.topics,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function mockVerifierUpdateDisabledLog(
|
|
135
|
+
contractAddress: string,
|
|
136
|
+
event: VerifierUpdateDisabledEventObject
|
|
137
|
+
): LogParams {
|
|
138
|
+
const contract = getCommitmentPoolContract(contractAddress);
|
|
139
|
+
const encodedLog = contract.rawContract.interface.encodeEventLog(
|
|
140
|
+
"VerifierUpdateDisabled(bool)",
|
|
141
|
+
[event.state]
|
|
142
|
+
);
|
|
143
|
+
return {
|
|
144
|
+
...mockField,
|
|
145
|
+
index: 0,
|
|
146
|
+
address: contractAddress,
|
|
147
|
+
data: encodedLog.data,
|
|
148
|
+
topics: encodedLog.topics,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/* Autogenerated file. Do not edit manually. */
|
|
5
|
+
/* tslint:disable */
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
|
|
8
|
+
import type { DeferredTopicFilter } from "ethers";
|
|
9
|
+
import { LogParams } from "ethers/providers";
|
|
10
|
+
import { Result } from "ethers";
|
|
11
|
+
|
|
12
|
+
export interface TypedEvent<
|
|
13
|
+
TArgsArray extends Array<any> = any,
|
|
14
|
+
TArgsObject = any
|
|
15
|
+
> extends LogParams {
|
|
16
|
+
args: TArgsArray & TArgsObject & Result;
|
|
17
|
+
name: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface TypedEventFilter<_TEvent extends TypedEvent>
|
|
21
|
+
extends DeferredTopicFilter {}
|
|
22
|
+
|
|
23
|
+
export type PromiseOrValue<T> = T | Promise<T>;
|