@sentio/sdk 1.13.1 → 1.14.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/cli/commands/run-create.js +2 -0
- package/lib/cli/commands/run-create.js.map +1 -1
- package/lib/gen/processor/protos/processor.d.ts +0 -1
- package/lib/gen/processor/protos/processor.js +0 -10
- package/lib/gen/processor/protos/processor.js.map +1 -1
- package/lib/meter.js +0 -5
- package/lib/meter.js.map +1 -1
- package/lib/test/metric-utils.js +2 -2
- package/lib/test/metric-utils.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/commands/run-create.ts +3 -0
- package/src/gen/processor/protos/processor.ts +0 -11
- package/src/meter.ts +0 -5
- package/src/test/metric-utils.ts +2 -2
- package/template/package.json +2 -3
- package/template/src/processor.test.ts +1 -1
- package/template/src/processor.ts +20 -16
- package/template/node_modules/@sentio/sdk/lib/base-processor-template.d.ts +0 -27
- package/template/node_modules/@sentio/sdk/lib/base-processor-template.js +0 -80
- package/template/node_modules/@sentio/sdk/lib/base-processor-template.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/base-processor.d.ts +0 -30
- package/template/node_modules/@sentio/sdk/lib/base-processor.js +0 -148
- package/template/node_modules/@sentio/sdk/lib/base-processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/bind-options.d.ts +0 -21
- package/template/node_modules/@sentio/sdk/lib/bind-options.js +0 -42
- package/template/node_modules/@sentio/sdk/lib/bind-options.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/binds.d.ts +0 -10
- package/template/node_modules/@sentio/sdk/lib/binds.js +0 -59
- package/template/node_modules/@sentio/sdk/lib/binds.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20/index.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20/index.js +0 -22
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20/test-utils.d.ts +0 -5
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20/test-utils.js +0 -46
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20/test-utils.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20bytes/index.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20bytes/index.js +0 -22
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20bytes/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20bytes/test-utils.d.ts +0 -4
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20bytes/test-utils.js +0 -35
- package/template/node_modules/@sentio/sdk/lib/builtin/erc20bytes/test-utils.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/ERC20.d.ts +0 -307
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/ERC20.js +0 -3
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/ERC20.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/ERC20Bytes.d.ts +0 -166
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/ERC20Bytes.js +0 -3
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/ERC20Bytes.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/WETH9.d.ts +0 -221
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/WETH9.js +0 -3
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/WETH9.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/common.d.ts +0 -22
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/common.js +0 -3
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/common.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/erc20_processor.d.ts +0 -184
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/erc20_processor.js +0 -453
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/erc20_processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/erc20bytes_processor.d.ts +0 -110
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/erc20bytes_processor.js +0 -325
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/erc20bytes_processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/ERC20Bytes__factory.d.ts +0 -48
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/ERC20Bytes__factory.js +0 -254
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/ERC20Bytes__factory.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/ERC20__factory.d.ts +0 -42
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/ERC20__factory.js +0 -404
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/ERC20__factory.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/WETH9__factory.d.ts +0 -45
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/WETH9__factory.js +0 -297
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/WETH9__factory.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/index.d.ts +0 -3
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/index.js +0 -13
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/factories/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/index.d.ts +0 -7
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/index.js +0 -34
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/weth9_processor.d.ts +0 -126
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/weth9_processor.js +0 -361
- package/template/node_modules/@sentio/sdk/lib/builtin/internal/weth9_processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/weth9/index.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/builtin/weth9/index.js +0 -22
- package/template/node_modules/@sentio/sdk/lib/builtin/weth9/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/builtin/weth9/test-utils.d.ts +0 -6
- package/template/node_modules/@sentio/sdk/lib/builtin/weth9/test-utils.js +0 -57
- package/template/node_modules/@sentio/sdk/lib/builtin/weth9/test-utils.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/chain-config.d.ts +0 -6
- package/template/node_modules/@sentio/sdk/lib/chain-config.js +0 -3
- package/template/node_modules/@sentio/sdk/lib/chain-config.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/build.d.ts +0 -4
- package/template/node_modules/@sentio/sdk/lib/cli/build.js +0 -178
- package/template/node_modules/@sentio/sdk/lib/cli/build.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/cli.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/cli/cli.js +0 -163
- package/template/node_modules/@sentio/sdk/lib/cli/cli.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/commands/run-create.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/commands/run-create.js +0 -43
- package/template/node_modules/@sentio/sdk/lib/cli/commands/run-create.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/commands/run-login.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/commands/run-login.js +0 -77
- package/template/node_modules/@sentio/sdk/lib/cli/commands/run-login.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/config.d.ts +0 -16
- package/template/node_modules/@sentio/sdk/lib/cli/config.js +0 -36
- package/template/node_modules/@sentio/sdk/lib/cli/config.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/key.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/cli/key.js +0 -44
- package/template/node_modules/@sentio/sdk/lib/cli/key.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/solana-code-gen.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/cli/solana-code-gen.js +0 -19
- package/template/node_modules/@sentio/sdk/lib/cli/solana-code-gen.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/upload.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/cli/upload.js +0 -85
- package/template/node_modules/@sentio/sdk/lib/cli/upload.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/cli/webpack.config.js +0 -42
- package/template/node_modules/@sentio/sdk/lib/context.d.ts +0 -49
- package/template/node_modules/@sentio/sdk/lib/context.js +0 -93
- package/template/node_modules/@sentio/sdk/lib/context.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/contract-namer.d.ts +0 -6
- package/template/node_modules/@sentio/sdk/lib/contract-namer.js +0 -20
- package/template/node_modules/@sentio/sdk/lib/contract-namer.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/error.d.ts +0 -7
- package/template/node_modules/@sentio/sdk/lib/error.js +0 -43
- package/template/node_modules/@sentio/sdk/lib/error.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/gen/builtin.d.ts +0 -6
- package/template/node_modules/@sentio/sdk/lib/gen/builtin.js +0 -3
- package/template/node_modules/@sentio/sdk/lib/gen/builtin.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/gen/google/protobuf/empty.d.ts +0 -16
- package/template/node_modules/@sentio/sdk/lib/gen/google/protobuf/empty.js +0 -47
- package/template/node_modules/@sentio/sdk/lib/gen/google/protobuf/empty.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/gen/processor/protos/processor.d.ts +0 -666
- package/template/node_modules/@sentio/sdk/lib/gen/processor/protos/processor.js +0 -2837
- package/template/node_modules/@sentio/sdk/lib/gen/processor/protos/processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/generic-processor.d.ts +0 -10
- package/template/node_modules/@sentio/sdk/lib/generic-processor.js +0 -32
- package/template/node_modules/@sentio/sdk/lib/generic-processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/index.d.ts +0 -18
- package/template/node_modules/@sentio/sdk/lib/index.js +0 -63
- package/template/node_modules/@sentio/sdk/lib/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/loader.d.ts +0 -5
- package/template/node_modules/@sentio/sdk/lib/loader.js +0 -30
- package/template/node_modules/@sentio/sdk/lib/loader.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/meter.d.ts +0 -26
- package/template/node_modules/@sentio/sdk/lib/meter.js +0 -131
- package/template/node_modules/@sentio/sdk/lib/meter.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/meter.test.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/meter.test.js +0 -16
- package/template/node_modules/@sentio/sdk/lib/meter.test.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/numberish.d.ts +0 -6
- package/template/node_modules/@sentio/sdk/lib/numberish.js +0 -96
- package/template/node_modules/@sentio/sdk/lib/numberish.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/numberish.test.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/numberish.test.js +0 -70
- package/template/node_modules/@sentio/sdk/lib/numberish.test.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/processor-runner.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/processor-runner.js +0 -40
- package/template/node_modules/@sentio/sdk/lib/processor-runner.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/processor-state.d.ts +0 -16
- package/template/node_modules/@sentio/sdk/lib/processor-state.js +0 -20
- package/template/node_modules/@sentio/sdk/lib/processor-state.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/promise-or-void.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/promise-or-void.js +0 -3
- package/template/node_modules/@sentio/sdk/lib/promise-or-void.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/provider.d.ts +0 -6
- package/template/node_modules/@sentio/sdk/lib/provider.js +0 -66
- package/template/node_modules/@sentio/sdk/lib/provider.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/release.config.js +0 -31
- package/template/node_modules/@sentio/sdk/lib/service.d.ts +0 -25
- package/template/node_modules/@sentio/sdk/lib/service.js +0 -406
- package/template/node_modules/@sentio/sdk/lib/service.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/index.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/index.js +0 -19
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/spl-token-processor.d.ts +0 -26
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/spl-token-processor.js +0 -138
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/spl-token-processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/types.d.ts +0 -330
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/types.js +0 -203
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/types.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/wormhole-processor.d.ts +0 -18
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/wormhole-processor.js +0 -192
- package/template/node_modules/@sentio/sdk/lib/solana/builtin/wormhole-processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/solana-processor.d.ts +0 -34
- package/template/node_modules/@sentio/sdk/lib/solana-processor.js +0 -95
- package/template/node_modules/@sentio/sdk/lib/solana-processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/codegen.d.ts +0 -4
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/codegen.js +0 -292
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/codegen.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/functions.d.ts +0 -3
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/functions.js +0 -61
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/functions.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/index.d.ts +0 -6
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/index.js +0 -51
- package/template/node_modules/@sentio/sdk/lib/target-ethers-sentio/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/codegen.test.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/codegen.test.js +0 -49
- package/template/node_modules/@sentio/sdk/lib/test/codegen.test.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/erc20-template.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/erc20-template.js +0 -23
- package/template/node_modules/@sentio/sdk/lib/test/erc20-template.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/erc20-template.test.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/erc20-template.test.js +0 -37
- package/template/node_modules/@sentio/sdk/lib/test/erc20-template.test.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/erc20.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/erc20.js +0 -44
- package/template/node_modules/@sentio/sdk/lib/test/erc20.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/erc20.test.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/erc20.test.js +0 -96
- package/template/node_modules/@sentio/sdk/lib/test/erc20.test.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/generic-processor.test.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/generic-processor.test.js +0 -59
- package/template/node_modules/@sentio/sdk/lib/test/generic-processor.test.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/index.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/test/index.js +0 -8
- package/template/node_modules/@sentio/sdk/lib/test/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/metric-utils.d.ts +0 -6
- package/template/node_modules/@sentio/sdk/lib/test/metric-utils.js +0 -50
- package/template/node_modules/@sentio/sdk/lib/test/metric-utils.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/mirrorworld.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/mirrorworld.js +0 -42
- package/template/node_modules/@sentio/sdk/lib/test/mirrorworld.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/solana.test.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/solana.test.js +0 -90
- package/template/node_modules/@sentio/sdk/lib/test/solana.test.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/test-processor-server.d.ts +0 -34
- package/template/node_modules/@sentio/sdk/lib/test/test-processor-server.js +0 -205
- package/template/node_modules/@sentio/sdk/lib/test/test-processor-server.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/test-provider.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/test-provider.js +0 -25
- package/template/node_modules/@sentio/sdk/lib/test/test-provider.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/types/game_wallet.d.ts +0 -45
- package/template/node_modules/@sentio/sdk/lib/test/types/game_wallet.js +0 -1396
- package/template/node_modules/@sentio/sdk/lib/test/types/game_wallet.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/types/game_wallet_processor.d.ts +0 -107
- package/template/node_modules/@sentio/sdk/lib/test/types/game_wallet_processor.js +0 -105
- package/template/node_modules/@sentio/sdk/lib/test/types/game_wallet_processor.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/wormhole-token-bridge.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/test/wormhole-token-bridge.js +0 -22
- package/template/node_modules/@sentio/sdk/lib/test/wormhole-token-bridge.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/trace.d.ts +0 -35
- package/template/node_modules/@sentio/sdk/lib/trace.js +0 -43
- package/template/node_modules/@sentio/sdk/lib/trace.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/utils/chainmap.d.ts +0 -2
- package/template/node_modules/@sentio/sdk/lib/utils/chainmap.js +0 -98
- package/template/node_modules/@sentio/sdk/lib/utils/chainmap.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/utils/convert.d.ts +0 -5
- package/template/node_modules/@sentio/sdk/lib/utils/convert.js +0 -27
- package/template/node_modules/@sentio/sdk/lib/utils/convert.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/utils/erc20.d.ts +0 -14
- package/template/node_modules/@sentio/sdk/lib/utils/erc20.js +0 -62
- package/template/node_modules/@sentio/sdk/lib/utils/erc20.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/utils/erc20.test.d.ts +0 -1
- package/template/node_modules/@sentio/sdk/lib/utils/erc20.test.js +0 -23
- package/template/node_modules/@sentio/sdk/lib/utils/erc20.test.js.map +0 -1
- package/template/node_modules/@sentio/sdk/lib/utils/index.d.ts +0 -3
- package/template/node_modules/@sentio/sdk/lib/utils/index.js +0 -14
- package/template/node_modules/@sentio/sdk/lib/utils/index.js.map +0 -1
- package/template/node_modules/@sentio/sdk/package.json +0 -78
- package/template/node_modules/@sentio/sdk/src/abis/ERC20.json +0 -174
- package/template/node_modules/@sentio/sdk/src/abis/ERC20Bytes.json +0 -236
- package/template/node_modules/@sentio/sdk/src/abis/WETH9.json +0 -153
- package/template/node_modules/@sentio/sdk/src/base-processor-template.ts +0 -105
- package/template/node_modules/@sentio/sdk/src/base-processor.ts +0 -172
- package/template/node_modules/@sentio/sdk/src/bind-options.ts +0 -41
- package/template/node_modules/@sentio/sdk/src/binds.ts +0 -73
- package/template/node_modules/@sentio/sdk/src/builtin/erc20/index.ts +0 -6
- package/template/node_modules/@sentio/sdk/src/builtin/erc20/test-utils.ts +0 -71
- package/template/node_modules/@sentio/sdk/src/builtin/erc20bytes/index.ts +0 -6
- package/template/node_modules/@sentio/sdk/src/builtin/erc20bytes/test-utils.ts +0 -53
- package/template/node_modules/@sentio/sdk/src/builtin/internal/ERC20.ts +0 -679
- package/template/node_modules/@sentio/sdk/src/builtin/internal/ERC20Bytes.ts +0 -384
- package/template/node_modules/@sentio/sdk/src/builtin/internal/WETH9.ts +0 -480
- package/template/node_modules/@sentio/sdk/src/builtin/internal/common.ts +0 -46
- package/template/node_modules/@sentio/sdk/src/builtin/internal/erc20_processor.ts +0 -762
- package/template/node_modules/@sentio/sdk/src/builtin/internal/erc20bytes_processor.ts +0 -531
- package/template/node_modules/@sentio/sdk/src/builtin/internal/factories/ERC20Bytes__factory.ts +0 -257
- package/template/node_modules/@sentio/sdk/src/builtin/internal/factories/ERC20__factory.ts +0 -404
- package/template/node_modules/@sentio/sdk/src/builtin/internal/factories/WETH9__factory.ts +0 -297
- package/template/node_modules/@sentio/sdk/src/builtin/internal/factories/index.ts +0 -6
- package/template/node_modules/@sentio/sdk/src/builtin/internal/index.ts +0 -10
- package/template/node_modules/@sentio/sdk/src/builtin/internal/weth9_processor.ts +0 -589
- package/template/node_modules/@sentio/sdk/src/builtin/weth9/index.ts +0 -6
- package/template/node_modules/@sentio/sdk/src/builtin/weth9/test-utils.ts +0 -89
- package/template/node_modules/@sentio/sdk/src/chain-config.ts +0 -6
- package/template/node_modules/@sentio/sdk/src/cli/build.ts +0 -196
- package/template/node_modules/@sentio/sdk/src/cli/cli.ts +0 -160
- package/template/node_modules/@sentio/sdk/src/cli/commands/run-create.ts +0 -36
- package/template/node_modules/@sentio/sdk/src/cli/commands/run-login.ts +0 -70
- package/template/node_modules/@sentio/sdk/src/cli/config.ts +0 -45
- package/template/node_modules/@sentio/sdk/src/cli/key.ts +0 -43
- package/template/node_modules/@sentio/sdk/src/cli/solana-code-gen.ts +0 -16
- package/template/node_modules/@sentio/sdk/src/cli/upload.ts +0 -88
- package/template/node_modules/@sentio/sdk/src/cli/webpack.config.js +0 -42
- package/template/node_modules/@sentio/sdk/src/context.ts +0 -103
- package/template/node_modules/@sentio/sdk/src/contract-namer.ts +0 -17
- package/template/node_modules/@sentio/sdk/src/error.ts +0 -45
- package/template/node_modules/@sentio/sdk/src/gen/builtin.ts +0 -22
- package/template/node_modules/@sentio/sdk/src/gen/google/protobuf/empty.ts +0 -70
- package/template/node_modules/@sentio/sdk/src/gen/processor/protos/processor.ts +0 -3626
- package/template/node_modules/@sentio/sdk/src/generic-processor.ts +0 -35
- package/template/node_modules/@sentio/sdk/src/index.ts +0 -21
- package/template/node_modules/@sentio/sdk/src/loader.ts +0 -24
- package/template/node_modules/@sentio/sdk/src/meter.test.ts +0 -16
- package/template/node_modules/@sentio/sdk/src/meter.ts +0 -140
- package/template/node_modules/@sentio/sdk/src/numberish.test.ts +0 -82
- package/template/node_modules/@sentio/sdk/src/numberish.ts +0 -100
- package/template/node_modules/@sentio/sdk/src/processor-runner.ts +0 -46
- package/template/node_modules/@sentio/sdk/src/processor-state.ts +0 -24
- package/template/node_modules/@sentio/sdk/src/promise-or-void.ts +0 -1
- package/template/node_modules/@sentio/sdk/src/provider.ts +0 -74
- package/template/node_modules/@sentio/sdk/src/service.ts +0 -491
- package/template/node_modules/@sentio/sdk/src/solana/builtin/index.ts +0 -2
- package/template/node_modules/@sentio/sdk/src/solana/builtin/spl-token-processor.ts +0 -164
- package/template/node_modules/@sentio/sdk/src/solana/builtin/types.ts +0 -268
- package/template/node_modules/@sentio/sdk/src/solana/builtin/wormhole-processor.ts +0 -178
- package/template/node_modules/@sentio/sdk/src/solana-processor.ts +0 -106
- package/template/node_modules/@sentio/sdk/src/target-ethers-sentio/codegen.ts +0 -315
- package/template/node_modules/@sentio/sdk/src/target-ethers-sentio/functions.ts +0 -68
- package/template/node_modules/@sentio/sdk/src/target-ethers-sentio/index.ts +0 -50
- package/template/node_modules/@sentio/sdk/src/target-ethers-sentio/tsconfig.json +0 -9
- package/template/node_modules/@sentio/sdk/src/test/abis/evm/CommitmentPool.json +0 -1034
- package/template/node_modules/@sentio/sdk/src/test/abis/evm/anyswapRouter.json +0 -490
- package/template/node_modules/@sentio/sdk/src/test/abis/solana/mirrorworld.json +0 -1392
- package/template/node_modules/@sentio/sdk/src/test/codegen.test.ts +0 -29
- package/template/node_modules/@sentio/sdk/src/test/erc20-template.test.ts +0 -37
- package/template/node_modules/@sentio/sdk/src/test/erc20-template.ts +0 -25
- package/template/node_modules/@sentio/sdk/src/test/erc20.test.ts +0 -117
- package/template/node_modules/@sentio/sdk/src/test/erc20.ts +0 -50
- package/template/node_modules/@sentio/sdk/src/test/generic-processor.test.ts +0 -70
- package/template/node_modules/@sentio/sdk/src/test/index.ts +0 -2
- package/template/node_modules/@sentio/sdk/src/test/metric-utils.ts +0 -49
- package/template/node_modules/@sentio/sdk/src/test/mirrorworld.ts +0 -40
- package/template/node_modules/@sentio/sdk/src/test/sentio.yaml +0 -4
- package/template/node_modules/@sentio/sdk/src/test/solana.test.ts +0 -93
- package/template/node_modules/@sentio/sdk/src/test/test-processor-server.ts +0 -258
- package/template/node_modules/@sentio/sdk/src/test/test-provider.ts +0 -25
- package/template/node_modules/@sentio/sdk/src/test/types/game_wallet.ts +0 -1392
- package/template/node_modules/@sentio/sdk/src/test/types/game_wallet_processor.ts +0 -113
- package/template/node_modules/@sentio/sdk/src/test/wormhole-token-bridge.ts +0 -21
- package/template/node_modules/@sentio/sdk/src/trace.ts +0 -86
- package/template/node_modules/@sentio/sdk/src/types/global.d.ts +0 -17
- package/template/node_modules/@sentio/sdk/src/utils/chainmap.ts +0 -95
- package/template/node_modules/@sentio/sdk/src/utils/convert.ts +0 -26
- package/template/node_modules/@sentio/sdk/src/utils/erc20.test.ts +0 -26
- package/template/node_modules/@sentio/sdk/src/utils/erc20.ts +0 -66
- package/template/node_modules/@sentio/sdk/src/utils/index.ts +0 -3
- package/template/node_modules/base-x/LICENSE.md +0 -22
- package/template/node_modules/base-x/README.md +0 -73
- package/template/node_modules/base-x/package.json +0 -46
- package/template/node_modules/base-x/src/index.d.ts +0 -9
- package/template/node_modules/base-x/src/index.js +0 -121
- package/template/node_modules/bs58/CHANGELOG.md +0 -65
- package/template/node_modules/bs58/LICENSE +0 -21
- package/template/node_modules/bs58/README.md +0 -91
- package/template/node_modules/bs58/index.d.ts +0 -5
- package/template/node_modules/bs58/index.js +0 -4
- package/template/node_modules/bs58/package.json +0 -39
- package/template/src/types/internal/X2y2.ts +0 -684
- package/template/src/types/internal/common.ts +0 -46
- package/template/src/types/internal/factories/X2y2__factory.ts +0 -436
- package/template/src/types/internal/factories/index.ts +0 -4
- package/template/src/types/internal/index.ts +0 -6
- package/template/src/types/internal/x2y2_processor.ts +0 -1004
- package/template/src/types/x2y2/index.ts +0 -6
- package/template/src/types/x2y2/test-utils.ts +0 -89
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-processor.js","sourceRoot":"","sources":["../src/base-processor.ts"],"names":[],"mappings":";;;;;;AAEA,wDAAiE;AAEjE,gDAAuB;AAEvB,uCAAoE;AAMpE,MAAa,aAAa;IACxB,OAAO,CAAe;IACtB,OAAO,CAAwC;CAChD;AAHD,sCAGC;AAED,MAAa,YAAY;IACvB,SAAS,CAAQ;IACjB,OAAO,CAA0C;CAClD;AAHD,oCAGC;AAED,MAAsB,aAAa;IAIjC,aAAa,GAAiD,EAAE,CAAA;IAChE,aAAa,GAAoB,EAAE,CAAA;IACnC,aAAa,GAAmB,EAAE,CAAA;IAElC,IAAI,CAAQ;IACZ,MAAM,CAAqB;IAE3B,YAAY,MAAmB;QAC7B,IAAI,CAAC,MAAM,GAAG;YACZ,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE;YACvB,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAC5C,UAAU,EAAE,IAAI,cAAI,CAAC,CAAC,CAAC;SACxB,CAAA;QACD,IAAI,MAAM,CAAC,UAAU,EAAE;YACrB,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,QAAQ,EAAE;gBACzC,IAAI,CAAC,MAAM,CAAC,UAAU,GA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,EAAE,SAAS,CAAC,CAAA;gBAE3E,MAAM,GAAG,GAAG,IAAI,iBAAO,CAAgC,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;gBAC1G,MAAM,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;gBACzB,OAAO;oBACL,MAAM,EAAE,GAAG,CAAC,MAAM;oBAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;oBACtB,IAAI,EAAE,EAAE;iBACT,CAAA;YACH,CAAC;SACF,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AArJD,sCAqJC","sourcesContent":["import { Event } from '@ethersproject/contracts'\nimport { BytesLike } from '@ethersproject/bytes'\nimport { Block, Log, getNetwork } from '@ethersproject/providers'\nimport { BaseContract, EventFilter } from '@ethersproject/contracts'\nimport Long from 'long'\n\nimport { BoundContractView, Context, ContractView } from './context'\nimport { ProcessResult } from './gen/processor/protos/processor'\nimport { BindInternalOptions, BindOptions } from './bind-options'\nimport { PromiseOrVoid } from './promise-or-void'\nimport { Trace } from './trace'\n\nexport class EventsHandler {\n filters: EventFilter[]\n handler: (event: Log) => Promise<ProcessResult>\n}\n\nexport class TraceHandler {\n signature: string\n handler: (trace: Trace) => Promise<ProcessResult>\n}\n\nexport abstract class BaseProcessor<\n TContract extends BaseContract,\n TBoundContractView extends BoundContractView<TContract, ContractView<TContract>>\n> {\n blockHandlers: ((block: Block) => Promise<ProcessResult>)[] = []\n eventHandlers: EventsHandler[] = []\n traceHandlers: TraceHandler[] = []\n\n name: string\n config: BindInternalOptions\n\n constructor(config: BindOptions) {\n this.config = {\n address: config.address,\n name: config.name || '',\n network: config.network ? config.network : 1,\n startBlock: new Long(0),\n }\n if (config.startBlock) {\n if (typeof config.startBlock === 'number') {\n this.config.startBlock = Long.fromNumber(config.startBlock)\n } else {\n this.config.startBlock = config.startBlock\n }\n }\n if (config.endBlock) {\n if (typeof config.endBlock === 'number') {\n this.config.endBlock = Long.fromNumber(config.endBlock)\n } else {\n this.config.endBlock = config.endBlock\n }\n }\n }\n\n protected abstract CreateBoundContractView(): TBoundContractView\n\n public getChainId(): number {\n return getNetwork(this.config.network).chainId\n }\n\n public onEvent(\n handler: (event: Event, ctx: Context<TContract, TBoundContractView>) => PromiseOrVoid,\n filter: EventFilter | EventFilter[]\n ) {\n const chainId = this.getChainId()\n\n let _filters: EventFilter[] = []\n\n if (Array.isArray(filter)) {\n _filters = filter\n } else {\n _filters.push(filter)\n }\n\n const contractView = this.CreateBoundContractView()\n this.eventHandlers.push({\n filters: _filters,\n handler: async function (log) {\n const ctx = new Context<TContract, TBoundContractView>(contractView, chainId, undefined, log)\n // let event: Event = <Event>deepCopy(log);\n const event: Event = <Event>log\n const parsed = contractView.rawContract.interface.parseLog(log)\n if (parsed) {\n event.args = parsed.args\n event.decode = (data: BytesLike, topics?: Array<any>) => {\n return contractView.rawContract.interface.decodeEventLog(parsed.eventFragment, data, topics)\n }\n event.event = parsed.name\n event.eventSignature = parsed.signature\n\n // TODO fix this bug\n await handler(event, ctx)\n return {\n gauges: ctx.gauges,\n counters: ctx.counters,\n logs: [],\n }\n }\n return {\n gauges: [],\n counters: [],\n logs: [],\n }\n },\n })\n return this\n }\n\n public onBlock(handler: (block: Block, ctx: Context<TContract, TBoundContractView>) => PromiseOrVoid) {\n const chainId = this.getChainId()\n const contractView = this.CreateBoundContractView()\n\n this.blockHandlers.push(async function (block: Block) {\n const ctx = new Context<TContract, TBoundContractView>(contractView, chainId, block, undefined)\n await handler(block, ctx)\n return {\n gauges: ctx.gauges,\n counters: ctx.counters,\n logs: [],\n }\n })\n return this\n }\n\n public onAllEvents(handler: (event: Log, ctx: Context<TContract, TBoundContractView>) => PromiseOrVoid) {\n const _filters: EventFilter[] = []\n const tmpContract = this.CreateBoundContractView()\n\n for (const key in tmpContract.filters) {\n _filters.push(tmpContract.filters[key]())\n }\n return this.onEvent(function (log, ctx) {\n return handler(log, ctx)\n }, _filters)\n }\n\n protected onTrace(\n signature: string,\n handler: (trace: Trace, ctx: Context<TContract, TBoundContractView>) => PromiseOrVoid\n ) {\n const chainId = this.getChainId()\n const contractView = this.CreateBoundContractView()\n\n this.traceHandlers.push({\n signature,\n handler: async function (trace: Trace) {\n const contractInterface = contractView.rawContract.interface\n const fragment = contractInterface.getFunction(signature)\n if (!trace.action.input) {\n return {\n gauges: [],\n counters: [],\n logs: [],\n }\n }\n const traceData = '0x' + trace.action.input.slice(10)\n trace.args = contractInterface._abiCoder.decode(fragment.inputs, traceData)\n\n const ctx = new Context<TContract, TBoundContractView>(contractView, chainId, undefined, undefined, trace)\n await handler(trace, ctx)\n return {\n gauges: ctx.gauges,\n counters: ctx.counters,\n logs: [],\n }\n },\n })\n return this\n }\n}\n"]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Networkish } from '@ethersproject/networks';
|
|
2
|
-
import Long from 'long';
|
|
3
|
-
export declare class BindOptions {
|
|
4
|
-
address: string;
|
|
5
|
-
network?: Networkish;
|
|
6
|
-
name?: string;
|
|
7
|
-
startBlock?: Long | number;
|
|
8
|
-
endBlock?: Long | number;
|
|
9
|
-
}
|
|
10
|
-
export declare function getOptionsSignature(opts: BindOptions): string;
|
|
11
|
-
export declare class BindInternalOptions {
|
|
12
|
-
address: string;
|
|
13
|
-
network: Networkish;
|
|
14
|
-
name: string;
|
|
15
|
-
startBlock: Long;
|
|
16
|
-
endBlock?: Long;
|
|
17
|
-
}
|
|
18
|
-
export declare class SolanaBindOptions extends BindOptions {
|
|
19
|
-
network?: string;
|
|
20
|
-
processInnerInstruction?: boolean;
|
|
21
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SolanaBindOptions = exports.BindInternalOptions = exports.getOptionsSignature = exports.BindOptions = void 0;
|
|
4
|
-
const providers_1 = require("@ethersproject/providers");
|
|
5
|
-
class BindOptions {
|
|
6
|
-
address;
|
|
7
|
-
network = 1;
|
|
8
|
-
name;
|
|
9
|
-
startBlock;
|
|
10
|
-
endBlock;
|
|
11
|
-
}
|
|
12
|
-
exports.BindOptions = BindOptions;
|
|
13
|
-
function getOptionsSignature(opts) {
|
|
14
|
-
const sig = [opts.address];
|
|
15
|
-
if (opts.network) {
|
|
16
|
-
sig.push((0, providers_1.getNetwork)(opts.network).chainId.toString());
|
|
17
|
-
}
|
|
18
|
-
if (opts.name) {
|
|
19
|
-
sig.push(opts.name);
|
|
20
|
-
}
|
|
21
|
-
if (opts.startBlock) {
|
|
22
|
-
sig.push(opts.startBlock.toString());
|
|
23
|
-
}
|
|
24
|
-
if (opts.endBlock) {
|
|
25
|
-
sig.push(opts.endBlock.toString());
|
|
26
|
-
}
|
|
27
|
-
return sig.join('_');
|
|
28
|
-
}
|
|
29
|
-
exports.getOptionsSignature = getOptionsSignature;
|
|
30
|
-
class BindInternalOptions {
|
|
31
|
-
address;
|
|
32
|
-
network;
|
|
33
|
-
name;
|
|
34
|
-
startBlock;
|
|
35
|
-
endBlock;
|
|
36
|
-
}
|
|
37
|
-
exports.BindInternalOptions = BindInternalOptions;
|
|
38
|
-
class SolanaBindOptions extends BindOptions {
|
|
39
|
-
processInnerInstruction;
|
|
40
|
-
}
|
|
41
|
-
exports.SolanaBindOptions = SolanaBindOptions;
|
|
42
|
-
//# sourceMappingURL=bind-options.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bind-options.js","sourceRoot":"","sources":["../src/bind-options.ts"],"names":[],"mappings":";;;AAEA,wDAAqD;AAErD,MAAa,WAAW;IACtB,OAAO,CAAQ;IACf,OAAO,GAAgB,CAAC,CAAA;IACxB,IAAI,CAAS;IACb,UAAU,CAAgB;IAC1B,QAAQ,CAAgB;CACzB;AAND,kCAMC;AAED,SAAgB,mBAAmB,CAAC,IAAiB;IACnD,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC1B,IAAI,IAAI,CAAC,OAAO,EAAE;QAChB,GAAG,CAAC,IAAI,CAAC,IAAA,sBAAU,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;KACtD;IACD,IAAI,IAAI,CAAC,IAAI,EAAE;QACb,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KACpB;IACD,IAAI,IAAI,CAAC,UAAU,EAAE;QACnB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAA;KACrC;IACD,IAAI,IAAI,CAAC,QAAQ,EAAE;QACjB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAA;KACnC;IACD,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACtB,CAAC;AAfD,kDAeC;AAED,MAAa,mBAAmB;IAC9B,OAAO,CAAQ;IACf,OAAO,CAAY;IACnB,IAAI,CAAQ;IACZ,UAAU,CAAM;IAChB,QAAQ,CAAO;CAChB;AAND,kDAMC;AAED,MAAa,iBAAkB,SAAQ,WAAW;IAEhD,uBAAuB,CAAU;CAClC;AAHD,8CAGC","sourcesContent":["import { Networkish } from '@ethersproject/networks'\nimport Long from 'long'\nimport { getNetwork } from '@ethersproject/providers'\n\nexport class BindOptions {\n address: string\n network?: Networkish = 1\n name?: string\n startBlock?: Long | number\n endBlock?: Long | number\n}\n\nexport function getOptionsSignature(opts: BindOptions): string {\n const sig = [opts.address]\n if (opts.network) {\n sig.push(getNetwork(opts.network).chainId.toString())\n }\n if (opts.name) {\n sig.push(opts.name)\n }\n if (opts.startBlock) {\n sig.push(opts.startBlock.toString())\n }\n if (opts.endBlock) {\n sig.push(opts.endBlock.toString())\n }\n return sig.join('_')\n}\n\nexport class BindInternalOptions {\n address: string\n network: Networkish\n name: string\n startBlock: Long\n endBlock?: Long\n}\n\nexport class SolanaBindOptions extends BindOptions {\n declare network?: string\n processInnerInstruction?: boolean\n}\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BindOptions } from './bind-options';
|
|
2
|
-
import { BaseProcessor } from './base-processor';
|
|
3
|
-
import { Networkish } from '@ethersproject/networks';
|
|
4
|
-
import { ContractView } from './context';
|
|
5
|
-
import { BaseContract } from 'ethers';
|
|
6
|
-
export declare function getContractName(abiName: string, contractName: string | undefined, address: string, network?: Networkish): string;
|
|
7
|
-
export declare function getProcessor(abiName: string, opts: BindOptions): BaseProcessor<any, any> | undefined;
|
|
8
|
-
export declare function addProcessor(abiName: string, opts: BindOptions, processor: BaseProcessor<any, any>): void;
|
|
9
|
-
export declare function getContractByABI(abiName: string, address: string, network: Networkish): ContractView<BaseContract> | undefined;
|
|
10
|
-
export declare function addContractByABI(abiName: string, address: string, network: Networkish, contract: ContractView<BaseContract>): Map<string, ContractView<BaseContract>>;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addContractByABI = exports.getContractByABI = exports.addProcessor = exports.getProcessor = exports.getContractName = void 0;
|
|
4
|
-
const bind_options_1 = require("./bind-options");
|
|
5
|
-
const providers_1 = require("@ethersproject/providers");
|
|
6
|
-
const contract_namer_1 = require("./contract-namer");
|
|
7
|
-
function getKey(abiName, address, network) {
|
|
8
|
-
const chainId = (0, providers_1.getNetwork)(network).chainId.toString();
|
|
9
|
-
return [abiName, address.toLowerCase(), chainId].join('_');
|
|
10
|
-
}
|
|
11
|
-
// TODO move to processor state
|
|
12
|
-
const addressToName = new Map();
|
|
13
|
-
const namerMap = new Map();
|
|
14
|
-
// Get contract name by ABI, and other options
|
|
15
|
-
// If there is contract using same ABI and different (address, network) pair
|
|
16
|
-
// It will be renamed as ABI, ABI_1, ABI_2
|
|
17
|
-
// Otherwise just use same contract name
|
|
18
|
-
function getContractName(abiName, contractName, address, network = 1) {
|
|
19
|
-
const key = getKey(abiName, address, network);
|
|
20
|
-
let name = addressToName.get(key);
|
|
21
|
-
if (name) {
|
|
22
|
-
return name;
|
|
23
|
-
}
|
|
24
|
-
if (contractName) {
|
|
25
|
-
addressToName.set(key, contractName);
|
|
26
|
-
return contractName;
|
|
27
|
-
}
|
|
28
|
-
let namer = namerMap.get(abiName);
|
|
29
|
-
if (!namer) {
|
|
30
|
-
namer = new contract_namer_1.ContractNamer(abiName);
|
|
31
|
-
namerMap.set(abiName, namer);
|
|
32
|
-
}
|
|
33
|
-
name = namer.nextName();
|
|
34
|
-
addressToName.set(key, name);
|
|
35
|
-
return name;
|
|
36
|
-
}
|
|
37
|
-
exports.getContractName = getContractName;
|
|
38
|
-
function getProcessor(abiName, opts) {
|
|
39
|
-
const sig = abiName + '_' + (0, bind_options_1.getOptionsSignature)(opts);
|
|
40
|
-
return global.PROCESSOR_STATE.processorMap.get(sig);
|
|
41
|
-
}
|
|
42
|
-
exports.getProcessor = getProcessor;
|
|
43
|
-
function addProcessor(abiName, opts, processor) {
|
|
44
|
-
const sig = abiName + '_' + (0, bind_options_1.getOptionsSignature)(opts);
|
|
45
|
-
global.PROCESSOR_STATE.processors.push(processor);
|
|
46
|
-
global.PROCESSOR_STATE.processorMap.set(sig, processor);
|
|
47
|
-
}
|
|
48
|
-
exports.addProcessor = addProcessor;
|
|
49
|
-
function getContractByABI(abiName, address, network) {
|
|
50
|
-
const key = getKey(abiName, address, network);
|
|
51
|
-
return global.PROCESSOR_STATE.contracts.get(key);
|
|
52
|
-
}
|
|
53
|
-
exports.getContractByABI = getContractByABI;
|
|
54
|
-
function addContractByABI(abiName, address, network, contract) {
|
|
55
|
-
const key = getKey(abiName, address, network);
|
|
56
|
-
return global.PROCESSOR_STATE.contracts.set(key, contract);
|
|
57
|
-
}
|
|
58
|
-
exports.addContractByABI = addContractByABI;
|
|
59
|
-
//# sourceMappingURL=binds.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3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C,GAAG,EAAE,IAAI,CAAC,CAAA;IAC5B,OAAO,IAAI,CAAA;AACb,CAAC;AAxBD,0CAwBC;AAED,SAAgB,YAAY,CAAC,OAAe,EAAE,IAAiB;IAC7D,MAAM,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,IAAA,kCAAmB,EAAC,IAAI,CAAC,CAAA;IACrD,OAAO,MAAM,CAAC,eAAe,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACrD,CAAC;AAHD,oCAGC;AAED,SAAgB,YAAY,CAAC,OAAe,EAAE,IAAiB,EAAE,SAAkC;IACjG,MAAM,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,IAAA,kCAAmB,EAAC,IAAI,CAAC,CAAA;IAErD,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACjD,MAAM,CAAC,eAAe,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAA;AACzD,CAAC;AALD,oCAKC;AAED,SAAgB,gBAAgB,CAAC,OAAe,EAAE,OAAe,EAAE,OAAmB;IACpF,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;IAC7C,OAAO,MAAM,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAClD,CAAC;AAHD,4CAGC;AAED,SAAgB,gBAAgB,CAC9B,OAAe,EACf,OAAe,EACf,OAAmB,EACnB,QAAoC;IAEpC,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;IAC7C,OAAO,MAAM,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;AAC5D,CAAC;AARD,4CAQC","sourcesContent":["import { BindOptions, getOptionsSignature } from './bind-options'\nimport { BaseProcessor } from './base-processor'\nimport { Networkish } from '@ethersproject/networks'\nimport { getNetwork } from '@ethersproject/providers'\nimport { ContractView } from './context'\nimport { BaseContract } from 'ethers'\nimport { ContractNamer } from './contract-namer'\n\nfunction getKey(abiName: string, address: string, network: Networkish) {\n const chainId = getNetwork(network).chainId.toString()\n return [abiName, address.toLowerCase(), chainId].join('_')\n}\n\n// TODO move to processor state\nconst addressToName = new Map<string, string>()\nconst namerMap = new Map<string, ContractNamer>()\n\n// Get contract name by ABI, and other options\n// If there is contract using same ABI and different (address, network) pair\n// It will be renamed as ABI, ABI_1, ABI_2\n// Otherwise just use same contract name\nexport function getContractName(\n abiName: string,\n contractName: string | undefined,\n address: string,\n network: Networkish = 1\n): string {\n const key = getKey(abiName, address, network)\n let name = addressToName.get(key)\n if (name) {\n return name\n }\n if (contractName) {\n addressToName.set(key, contractName)\n return contractName\n }\n\n let namer = namerMap.get(abiName)\n if (!namer) {\n namer = new ContractNamer(abiName)\n namerMap.set(abiName, namer)\n }\n name = namer.nextName()\n addressToName.set(key, name)\n return name\n}\n\nexport function getProcessor(abiName: string, opts: BindOptions) {\n const sig = abiName + '_' + getOptionsSignature(opts)\n return global.PROCESSOR_STATE.processorMap.get(sig)\n}\n\nexport function addProcessor(abiName: string, opts: BindOptions, processor: BaseProcessor<any, any>) {\n const sig = abiName + '_' + getOptionsSignature(opts)\n\n global.PROCESSOR_STATE.processors.push(processor)\n global.PROCESSOR_STATE.processorMap.set(sig, processor)\n}\n\nexport function getContractByABI(abiName: string, address: string, network: Networkish) {\n const key = getKey(abiName, address, network)\n return global.PROCESSOR_STATE.contracts.get(key)\n}\n\nexport function addContractByABI(\n abiName: string,\n address: string,\n network: Networkish,\n contract: ContractView<BaseContract>\n) {\n const key = getKey(abiName, address, network)\n return global.PROCESSOR_STATE.contracts.set(key, contract)\n}\n"]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* Autogenerated file. Do not edit manually. */
|
|
3
|
-
/* tslint:disable */
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
-
};
|
|
19
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
__exportStar(require("../internal/erc20_processor"), exports);
|
|
21
|
-
__exportStar(require("../internal/ERC20"), exports);
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/builtin/erc20/index.ts"],"names":[],"mappings":";AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;;;;;;;;;;;;;;;;AAEpB,8DAA4C;AAC5C,oDAAkC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nexport * from \"../internal/erc20_processor\";\nexport * from \"../internal/ERC20\";\n"]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Log } from "@ethersproject/providers";
|
|
2
|
-
import { ApprovalEventObject, OwnershipTransferredEventObject, TransferEventObject } from ".";
|
|
3
|
-
export declare function mockApprovalLog(contractAddress: string, event: ApprovalEventObject): Log;
|
|
4
|
-
export declare function mockOwnershipTransferredLog(contractAddress: string, event: OwnershipTransferredEventObject): Log;
|
|
5
|
-
export declare function mockTransferLog(contractAddress: string, event: TransferEventObject): Log;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mockTransferLog = exports.mockOwnershipTransferredLog = exports.mockApprovalLog = void 0;
|
|
4
|
-
const _1 = require(".");
|
|
5
|
-
const mockField = {
|
|
6
|
-
blockHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
7
|
-
blockNumber: 0,
|
|
8
|
-
logIndex: 0,
|
|
9
|
-
removed: false,
|
|
10
|
-
transactionHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
11
|
-
transactionIndex: 0,
|
|
12
|
-
};
|
|
13
|
-
function mockApprovalLog(contractAddress, event) {
|
|
14
|
-
const contract = (0, _1.getERC20Contract)(contractAddress);
|
|
15
|
-
const encodedLog = contract.rawContract.interface.encodeEventLog(contract.rawContract.interface.getEvent("Approval"), Object.values(event));
|
|
16
|
-
return {
|
|
17
|
-
...mockField,
|
|
18
|
-
address: contractAddress,
|
|
19
|
-
data: encodedLog.data,
|
|
20
|
-
topics: encodedLog.topics,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
exports.mockApprovalLog = mockApprovalLog;
|
|
24
|
-
function mockOwnershipTransferredLog(contractAddress, event) {
|
|
25
|
-
const contract = (0, _1.getERC20Contract)(contractAddress);
|
|
26
|
-
const encodedLog = contract.rawContract.interface.encodeEventLog(contract.rawContract.interface.getEvent("OwnershipTransferred"), Object.values(event));
|
|
27
|
-
return {
|
|
28
|
-
...mockField,
|
|
29
|
-
address: contractAddress,
|
|
30
|
-
data: encodedLog.data,
|
|
31
|
-
topics: encodedLog.topics,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
exports.mockOwnershipTransferredLog = mockOwnershipTransferredLog;
|
|
35
|
-
function mockTransferLog(contractAddress, event) {
|
|
36
|
-
const contract = (0, _1.getERC20Contract)(contractAddress);
|
|
37
|
-
const encodedLog = contract.rawContract.interface.encodeEventLog(contract.rawContract.interface.getEvent("Transfer"), Object.values(event));
|
|
38
|
-
return {
|
|
39
|
-
...mockField,
|
|
40
|
-
address: contractAddress,
|
|
41
|
-
data: encodedLog.data,
|
|
42
|
-
topics: encodedLog.topics,
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
exports.mockTransferLog = mockTransferLog;
|
|
46
|
-
//# sourceMappingURL=test-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.js","sourceRoot":"","sources":["../../../src/builtin/erc20/test-utils.ts"],"names":[],"mappings":";;;AAIA,wBAKW;AACX,MAAM,SAAS,GAAG;IAChB,SAAS,EACP,oEAAoE;IACtE,WAAW,EAAE,CAAC;IACd,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,KAAK;IACd,eAAe,EACb,oEAAoE;IACtE,gBAAgB,EAAE,CAAC;CACpB,CAAC;AAEF,SAAgB,eAAe,CAC7B,eAAuB,EACvB,KAA0B;IAE1B,MAAM,QAAQ,GAAG,IAAA,mBAAgB,EAAC,eAAe,CAAC,CAAC;IACnD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,EACnD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CACrB,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC;AAfD,0CAeC;AAED,SAAgB,2BAA2B,CACzC,eAAuB,EACvB,KAAsC;IAEtC,MAAM,QAAQ,GAAG,IAAA,mBAAgB,EAAC,eAAe,CAAC,CAAC;IACnD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC,sBAAsB,CAAC,EAC/D,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CACrB,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC;AAfD,kEAeC;AAED,SAAgB,eAAe,CAC7B,eAAuB,EACvB,KAA0B;IAE1B,MAAM,QAAQ,GAAG,IAAA,mBAAgB,EAAC,eAAe,CAAC,CAAC;IACnD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,EACnD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CACrB,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC;AAfD,0CAeC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { Log } from \"@ethersproject/providers\";\nimport {\n getERC20Contract,\n ApprovalEventObject,\n OwnershipTransferredEventObject,\n TransferEventObject,\n} from \".\";\nconst mockField = {\n blockHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n blockNumber: 0,\n logIndex: 0,\n removed: false,\n transactionHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n transactionIndex: 0,\n};\n\nexport function mockApprovalLog(\n contractAddress: string,\n event: ApprovalEventObject\n): Log {\n const contract = getERC20Contract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n contract.rawContract.interface.getEvent(\"Approval\"),\n Object.values(event)\n );\n return {\n ...mockField,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n\nexport function mockOwnershipTransferredLog(\n contractAddress: string,\n event: OwnershipTransferredEventObject\n): Log {\n const contract = getERC20Contract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n contract.rawContract.interface.getEvent(\"OwnershipTransferred\"),\n Object.values(event)\n );\n return {\n ...mockField,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n\nexport function mockTransferLog(\n contractAddress: string,\n event: TransferEventObject\n): Log {\n const contract = getERC20Contract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n contract.rawContract.interface.getEvent(\"Transfer\"),\n Object.values(event)\n );\n return {\n ...mockField,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n"]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* Autogenerated file. Do not edit manually. */
|
|
3
|
-
/* tslint:disable */
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
-
};
|
|
19
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
__exportStar(require("../internal/erc20bytes_processor"), exports);
|
|
21
|
-
__exportStar(require("../internal/ERC20Bytes"), exports);
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/builtin/erc20bytes/index.ts"],"names":[],"mappings":";AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;;;;;;;;;;;;;;;;AAEpB,mEAAiD;AACjD,yDAAuC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nexport * from \"../internal/erc20bytes_processor\";\nexport * from \"../internal/ERC20Bytes\";\n"]}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Log } from "@ethersproject/providers";
|
|
2
|
-
import { ApprovalEventObject, TransferEventObject } from ".";
|
|
3
|
-
export declare function mockApprovalLog(contractAddress: string, event: ApprovalEventObject): Log;
|
|
4
|
-
export declare function mockTransferLog(contractAddress: string, event: TransferEventObject): Log;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mockTransferLog = exports.mockApprovalLog = void 0;
|
|
4
|
-
const _1 = require(".");
|
|
5
|
-
const mockField = {
|
|
6
|
-
blockHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
7
|
-
blockNumber: 0,
|
|
8
|
-
logIndex: 0,
|
|
9
|
-
removed: false,
|
|
10
|
-
transactionHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
11
|
-
transactionIndex: 0,
|
|
12
|
-
};
|
|
13
|
-
function mockApprovalLog(contractAddress, event) {
|
|
14
|
-
const contract = (0, _1.getERC20BytesContract)(contractAddress);
|
|
15
|
-
const encodedLog = contract.rawContract.interface.encodeEventLog(contract.rawContract.interface.getEvent("Approval"), Object.values(event));
|
|
16
|
-
return {
|
|
17
|
-
...mockField,
|
|
18
|
-
address: contractAddress,
|
|
19
|
-
data: encodedLog.data,
|
|
20
|
-
topics: encodedLog.topics,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
exports.mockApprovalLog = mockApprovalLog;
|
|
24
|
-
function mockTransferLog(contractAddress, event) {
|
|
25
|
-
const contract = (0, _1.getERC20BytesContract)(contractAddress);
|
|
26
|
-
const encodedLog = contract.rawContract.interface.encodeEventLog(contract.rawContract.interface.getEvent("Transfer"), Object.values(event));
|
|
27
|
-
return {
|
|
28
|
-
...mockField,
|
|
29
|
-
address: contractAddress,
|
|
30
|
-
data: encodedLog.data,
|
|
31
|
-
topics: encodedLog.topics,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
exports.mockTransferLog = mockTransferLog;
|
|
35
|
-
//# sourceMappingURL=test-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.js","sourceRoot":"","sources":["../../../src/builtin/erc20bytes/test-utils.ts"],"names":[],"mappings":";;;AAIA,wBAIW;AACX,MAAM,SAAS,GAAG;IAChB,SAAS,EACP,oEAAoE;IACtE,WAAW,EAAE,CAAC;IACd,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,KAAK;IACd,eAAe,EACb,oEAAoE;IACtE,gBAAgB,EAAE,CAAC;CACpB,CAAC;AAEF,SAAgB,eAAe,CAC7B,eAAuB,EACvB,KAA0B;IAE1B,MAAM,QAAQ,GAAG,IAAA,wBAAqB,EAAC,eAAe,CAAC,CAAC;IACxD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,EACnD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CACrB,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC;AAfD,0CAeC;AAED,SAAgB,eAAe,CAC7B,eAAuB,EACvB,KAA0B;IAE1B,MAAM,QAAQ,GAAG,IAAA,wBAAqB,EAAC,eAAe,CAAC,CAAC;IACxD,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAC9D,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,EACnD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CACrB,CAAC;IACF,OAAO;QACL,GAAG,SAAS;QACZ,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC;AAfD,0CAeC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { Log } from \"@ethersproject/providers\";\nimport {\n getERC20BytesContract,\n ApprovalEventObject,\n TransferEventObject,\n} from \".\";\nconst mockField = {\n blockHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n blockNumber: 0,\n logIndex: 0,\n removed: false,\n transactionHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n transactionIndex: 0,\n};\n\nexport function mockApprovalLog(\n contractAddress: string,\n event: ApprovalEventObject\n): Log {\n const contract = getERC20BytesContract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n contract.rawContract.interface.getEvent(\"Approval\"),\n Object.values(event)\n );\n return {\n ...mockField,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n\nexport function mockTransferLog(\n contractAddress: string,\n event: TransferEventObject\n): Log {\n const contract = getERC20BytesContract(contractAddress);\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n contract.rawContract.interface.getEvent(\"Transfer\"),\n Object.values(event)\n );\n return {\n ...mockField,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n };\n}\n"]}
|