@sentio/sdk 4.0.0-rc.1 → 4.0.0-rc.3
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/aptos-plugin.d.ts +1 -1
- package/lib/aptos/aptos-plugin.d.ts.map +1 -1
- package/lib/aptos/aptos-plugin.js +43 -42
- package/lib/aptos/aptos-plugin.js.map +1 -1
- package/lib/aptos/aptos-processor.d.ts +1 -1
- package/lib/aptos/aptos-processor.d.ts.map +1 -1
- package/lib/aptos/aptos-processor.js +25 -25
- package/lib/aptos/aptos-processor.js.map +1 -1
- package/lib/aptos/aptos-resource-processor-template.d.ts +1 -1
- package/lib/aptos/aptos-resource-processor-template.d.ts.map +1 -1
- package/lib/aptos/aptos-resource-processor-template.js +10 -5
- package/lib/aptos/aptos-resource-processor-template.js.map +1 -1
- package/lib/aptos/context.d.ts +1 -1
- package/lib/aptos/context.d.ts.map +1 -1
- package/lib/aptos/context.js +8 -6
- package/lib/aptos/context.js.map +1 -1
- package/lib/aptos/data.d.ts +4 -4
- package/lib/aptos/data.d.ts.map +1 -1
- package/lib/core/base-context.d.ts +3 -2
- package/lib/core/base-context.d.ts.map +1 -1
- package/lib/core/base-context.js +12 -11
- package/lib/core/base-context.js.map +1 -1
- package/lib/core/core-plugin.d.ts.map +1 -1
- package/lib/core/core-plugin.js +6 -4
- package/lib/core/core-plugin.js.map +1 -1
- package/lib/core/event-logger.d.ts +10 -2
- package/lib/core/event-logger.d.ts.map +1 -1
- package/lib/core/event-logger.js +42 -26
- package/lib/core/event-logger.js.map +1 -1
- package/lib/core/exporter.d.ts.map +1 -1
- package/lib/core/exporter.js +5 -3
- package/lib/core/exporter.js.map +1 -1
- package/lib/core/handler-options.d.ts +1 -1
- package/lib/core/handler-options.d.ts.map +1 -1
- package/lib/core/handler-register.d.ts +1 -1
- package/lib/core/handler-register.d.ts.map +1 -1
- package/lib/core/handler-register.js +2 -2
- package/lib/core/handler-register.js.map +1 -1
- package/lib/core/meter.d.ts +4 -3
- package/lib/core/meter.d.ts.map +1 -1
- package/lib/core/meter.js +5 -4
- package/lib/core/meter.js.map +1 -1
- package/lib/core/normalization.d.ts +1 -1
- package/lib/core/normalization.d.ts.map +1 -1
- package/lib/core/normalization.js +41 -31
- package/lib/core/normalization.js.map +1 -1
- package/lib/core/numberish.d.ts +1 -1
- package/lib/core/numberish.d.ts.map +1 -1
- package/lib/core/numberish.js +35 -30
- package/lib/core/numberish.js.map +1 -1
- package/lib/core/partition-handler-manager.d.ts +1 -1
- package/lib/core/partition-handler-manager.d.ts.map +1 -1
- package/lib/core/partition-handler-manager.js +10 -9
- package/lib/core/partition-handler-manager.js.map +1 -1
- package/lib/cosmos/context.d.ts.map +1 -1
- package/lib/cosmos/context.js +4 -2
- package/lib/cosmos/context.js.map +1 -1
- package/lib/cosmos/cosmos-plugin.d.ts.map +1 -1
- package/lib/cosmos/cosmos-plugin.js +11 -10
- package/lib/cosmos/cosmos-plugin.js.map +1 -1
- package/lib/cosmos/cosmos-processor.js.map +1 -1
- package/lib/eth/abi-decoder/decode-worker.js +2 -2
- package/lib/eth/abi-decoder/decode-worker.js.map +1 -1
- package/lib/eth/account-processor.d.ts +2 -2
- package/lib/eth/account-processor.d.ts.map +1 -1
- package/lib/eth/account-processor.js +10 -9
- package/lib/eth/account-processor.js.map +1 -1
- package/lib/eth/base-processor-template.d.ts +3 -3
- package/lib/eth/base-processor-template.d.ts.map +1 -1
- package/lib/eth/base-processor-template.js +12 -8
- package/lib/eth/base-processor-template.js.map +1 -1
- package/lib/eth/base-processor.d.ts +1 -1
- package/lib/eth/base-processor.d.ts.map +1 -1
- package/lib/eth/base-processor.js +53 -46
- package/lib/eth/base-processor.js.map +1 -1
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js +48 -46
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc1155-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc1155-processor.js +18 -16
- package/lib/eth/builtin/internal/erc1155-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc20-processor.js +38 -36
- package/lib/eth/builtin/internal/erc20-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20bytes-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc20bytes-processor.js +20 -18
- package/lib/eth/builtin/internal/erc20bytes-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc721-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc721-processor.js +30 -28
- package/lib/eth/builtin/internal/erc721-processor.js.map +1 -1
- package/lib/eth/builtin/internal/weth9-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/weth9-processor.js +24 -22
- package/lib/eth/builtin/internal/weth9-processor.js.map +1 -1
- package/lib/eth/codegen/file.d.ts.map +1 -1
- package/lib/eth/codegen/file.js +2 -1
- package/lib/eth/codegen/file.js.map +1 -1
- package/lib/eth/codegen/function-calls.js +1 -1
- package/lib/eth/context.d.ts +1 -1
- package/lib/eth/context.d.ts.map +1 -1
- package/lib/eth/context.js +17 -11
- package/lib/eth/context.js.map +1 -1
- package/lib/eth/eth-plugin.d.ts.map +1 -1
- package/lib/eth/eth-plugin.js +83 -75
- package/lib/eth/eth-plugin.js.map +1 -1
- package/lib/eth/eth.d.ts +6 -6
- package/lib/eth/eth.d.ts.map +1 -1
- package/lib/eth/eth.js +39 -26
- package/lib/eth/eth.js.map +1 -1
- package/lib/eth/index.d.ts +1 -1
- package/lib/eth/index.d.ts.map +1 -1
- package/lib/eth/index.js +0 -1
- package/lib/eth/index.js.map +1 -1
- package/lib/fuel/asset-processor.d.ts +2 -2
- package/lib/fuel/asset-processor.d.ts.map +1 -1
- package/lib/fuel/asset-processor.js +5 -3
- package/lib/fuel/asset-processor.js.map +1 -1
- package/lib/fuel/context.d.ts.map +1 -1
- package/lib/fuel/context.js +4 -2
- package/lib/fuel/context.js.map +1 -1
- package/lib/fuel/fuel-plugin.d.ts.map +1 -1
- package/lib/fuel/fuel-plugin.js +41 -53
- package/lib/fuel/fuel-plugin.js.map +1 -1
- package/lib/fuel/fuel-processor-template.d.ts.map +1 -1
- package/lib/fuel/fuel-processor-template.js +7 -5
- package/lib/fuel/fuel-processor-template.js.map +1 -1
- package/lib/fuel/fuel-processor.d.ts.map +1 -1
- package/lib/fuel/fuel-processor.js +30 -20
- package/lib/fuel/fuel-processor.js.map +1 -1
- package/lib/fuel/global-processor.d.ts.map +1 -1
- package/lib/fuel/global-processor.js +2 -1
- package/lib/fuel/global-processor.js.map +1 -1
- package/lib/fuel/types.d.ts +10 -4
- package/lib/fuel/types.d.ts.map +1 -1
- package/lib/fuel/types.js.map +1 -1
- package/lib/iota/context.d.ts +1 -1
- package/lib/iota/context.d.ts.map +1 -1
- package/lib/iota/context.js +8 -6
- package/lib/iota/context.js.map +1 -1
- package/lib/iota/iota-object-processor-template.d.ts +1 -1
- package/lib/iota/iota-object-processor-template.d.ts.map +1 -1
- package/lib/iota/iota-object-processor-template.js +17 -12
- package/lib/iota/iota-object-processor-template.js.map +1 -1
- package/lib/iota/iota-object-processor.d.ts +1 -1
- package/lib/iota/iota-object-processor.d.ts.map +1 -1
- package/lib/iota/iota-object-processor.js +23 -16
- package/lib/iota/iota-object-processor.js.map +1 -1
- package/lib/iota/iota-plugin-part.d.ts +1 -1
- package/lib/iota/iota-plugin-part.d.ts.map +1 -1
- package/lib/iota/iota-plugin-part.js +16 -15
- package/lib/iota/iota-plugin-part.js.map +1 -1
- package/lib/iota/iota-processor.d.ts +1 -1
- package/lib/iota/iota-processor.d.ts.map +1 -1
- package/lib/iota/iota-processor.js +18 -17
- package/lib/iota/iota-processor.js.map +1 -1
- package/lib/iota/network.js +2 -2
- package/lib/iota/network.js.map +1 -1
- package/lib/move/filter.d.ts +1 -1
- package/lib/move/filter.d.ts.map +1 -1
- package/lib/move/index.d.ts +1 -1
- package/lib/move/index.d.ts.map +1 -1
- package/lib/move/index.js +0 -1
- package/lib/move/index.js.map +1 -1
- package/lib/solana/builtin/types.d.ts +4 -4
- package/lib/solana/solana-context.d.ts.map +1 -1
- package/lib/solana/solana-context.js +4 -3
- package/lib/solana/solana-context.js.map +1 -1
- package/lib/solana/solana-plugin.d.ts.map +1 -1
- package/lib/solana/solana-plugin.js +19 -18
- package/lib/solana/solana-plugin.js.map +1 -1
- package/lib/solana/solana-processor.d.ts.map +1 -1
- package/lib/solana/solana-processor.js +8 -3
- package/lib/solana/solana-processor.js.map +1 -1
- package/lib/store/cache.d.ts.map +1 -1
- package/lib/store/cache.js +22 -17
- package/lib/store/cache.js.map +1 -1
- package/lib/store/convert.d.ts +1 -1
- package/lib/store/convert.d.ts.map +1 -1
- package/lib/store/convert.js +67 -104
- package/lib/store/convert.js.map +1 -1
- package/lib/store/decorators.d.ts +1 -1
- package/lib/store/decorators.d.ts.map +1 -1
- package/lib/store/decorators.js +3 -1
- package/lib/store/decorators.js.map +1 -1
- package/lib/store/store.d.ts.map +1 -1
- package/lib/store/store.js +24 -16
- package/lib/store/store.js.map +1 -1
- package/lib/store/types.js +24 -32
- package/lib/store/types.js.map +1 -1
- package/lib/store/util.d.ts +1 -1
- package/lib/store/util.d.ts.map +1 -1
- package/lib/store/util.js +13 -17
- package/lib/store/util.js.map +1 -1
- package/lib/sui/context.d.ts +1 -1
- package/lib/sui/context.d.ts.map +1 -1
- package/lib/sui/context.js +8 -6
- package/lib/sui/context.js.map +1 -1
- package/lib/sui/sui-object-processor-template.d.ts +1 -1
- package/lib/sui/sui-object-processor-template.d.ts.map +1 -1
- package/lib/sui/sui-object-processor-template.js +17 -12
- package/lib/sui/sui-object-processor-template.js.map +1 -1
- package/lib/sui/sui-object-processor.d.ts +1 -1
- package/lib/sui/sui-object-processor.d.ts.map +1 -1
- package/lib/sui/sui-object-processor.js +23 -16
- package/lib/sui/sui-object-processor.js.map +1 -1
- package/lib/sui/sui-plugin-part.d.ts +1 -1
- package/lib/sui/sui-plugin-part.d.ts.map +1 -1
- package/lib/sui/sui-plugin-part.js +16 -15
- package/lib/sui/sui-plugin-part.js.map +1 -1
- package/lib/sui/sui-plugin.d.ts +1 -1
- package/lib/sui/sui-plugin.d.ts.map +1 -1
- package/lib/sui/sui-plugin.js +35 -34
- package/lib/sui/sui-plugin.js.map +1 -1
- package/lib/sui/sui-processor.d.ts +1 -1
- package/lib/sui/sui-processor.d.ts.map +1 -1
- package/lib/sui/sui-processor.js +18 -17
- package/lib/sui/sui-processor.js.map +1 -1
- package/lib/testing/aptos-facet.d.ts.map +1 -1
- package/lib/testing/aptos-facet.js +18 -11
- package/lib/testing/aptos-facet.js.map +1 -1
- package/lib/testing/cosmos-facet.d.ts.map +1 -1
- package/lib/testing/cosmos-facet.js +10 -6
- package/lib/testing/cosmos-facet.js.map +1 -1
- package/lib/testing/eth-facet.d.ts +1 -1
- package/lib/testing/eth-facet.d.ts.map +1 -1
- package/lib/testing/eth-facet.js +34 -18
- package/lib/testing/eth-facet.js.map +1 -1
- package/lib/testing/fuel-facet.d.ts.map +1 -1
- package/lib/testing/fuel-facet.js +28 -18
- package/lib/testing/fuel-facet.js.map +1 -1
- package/lib/testing/iota-facet.d.ts.map +1 -1
- package/lib/testing/iota-facet.js +32 -20
- package/lib/testing/iota-facet.js.map +1 -1
- package/lib/testing/memory-database.d.ts +11 -3
- package/lib/testing/memory-database.d.ts.map +1 -1
- package/lib/testing/memory-database.js +84 -71
- package/lib/testing/memory-database.js.map +1 -1
- package/lib/testing/metric-utils.d.ts +2 -2
- package/lib/testing/metric-utils.d.ts.map +1 -1
- package/lib/testing/metric-utils.js +13 -12
- package/lib/testing/metric-utils.js.map +1 -1
- package/lib/testing/solana-facet.d.ts +3 -2
- package/lib/testing/solana-facet.d.ts.map +1 -1
- package/lib/testing/solana-facet.js +8 -5
- package/lib/testing/solana-facet.js.map +1 -1
- package/lib/testing/sui-facet.d.ts.map +1 -1
- package/lib/testing/sui-facet.js +30 -20
- package/lib/testing/sui-facet.js.map +1 -1
- package/lib/testing/test-processor-server.d.ts +1453 -16
- package/lib/testing/test-processor-server.d.ts.map +1 -1
- package/lib/testing/test-processor-server.js +108 -45
- package/lib/testing/test-processor-server.js.map +1 -1
- package/lib/utils/price.d.ts +1 -1
- package/lib/utils/price.d.ts.map +1 -1
- package/lib/utils/price.js +19 -12
- package/lib/utils/price.js.map +1 -1
- package/package.json +5 -7
- package/src/aptos/aptos-plugin.ts +105 -91
- package/src/aptos/aptos-processor.ts +33 -25
- package/src/aptos/aptos-resource-processor-template.ts +15 -6
- package/src/aptos/context.ts +8 -7
- package/src/aptos/data.ts +4 -4
- package/src/core/base-context.ts +19 -12
- package/src/core/core-plugin.ts +10 -7
- package/src/core/event-logger.ts +63 -34
- package/src/core/exporter.ts +5 -4
- package/src/core/handler-options.ts +1 -1
- package/src/core/handler-register.ts +3 -3
- package/src/core/meter.ts +9 -7
- package/src/core/normalization.ts +53 -31
- package/src/core/numberish.ts +46 -30
- package/src/core/partition-handler-manager.ts +13 -11
- package/src/cosmos/context.ts +4 -3
- package/src/cosmos/cosmos-plugin.ts +19 -15
- package/src/cosmos/cosmos-processor.ts +2 -2
- package/src/eth/abi-decoder/decode-worker.ts +2 -2
- package/src/eth/account-processor.ts +21 -12
- package/src/eth/base-processor-template.ts +22 -10
- package/src/eth/base-processor.ts +66 -54
- package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +177 -116
- package/src/eth/builtin/internal/erc1155-processor.ts +73 -38
- package/src/eth/builtin/internal/erc20-processor.ts +152 -91
- package/src/eth/builtin/internal/erc20bytes-processor.ts +80 -46
- package/src/eth/builtin/internal/erc721-processor.ts +109 -65
- package/src/eth/builtin/internal/weth9-processor.ts +95 -56
- package/src/eth/codegen/file.ts +2 -1
- package/src/eth/codegen/function-calls.ts +1 -1
- package/src/eth/context.ts +29 -13
- package/src/eth/eth-plugin.ts +135 -118
- package/src/eth/eth.ts +46 -32
- package/src/eth/index.ts +1 -1
- package/src/fuel/asset-processor.ts +16 -8
- package/src/fuel/context.ts +4 -3
- package/src/fuel/fuel-plugin.ts +71 -73
- package/src/fuel/fuel-processor-template.ts +7 -6
- package/src/fuel/fuel-processor.ts +35 -23
- package/src/fuel/global-processor.ts +3 -3
- package/src/fuel/types.ts +10 -4
- package/src/iota/context.ts +8 -7
- package/src/iota/iota-object-processor-template.ts +25 -15
- package/src/iota/iota-object-processor.ts +33 -22
- package/src/iota/iota-plugin-part.ts +41 -34
- package/src/iota/iota-processor.ts +25 -17
- package/src/iota/network.ts +2 -2
- package/src/move/filter.ts +1 -1
- package/src/move/index.ts +1 -1
- package/src/solana/solana-context.ts +4 -3
- package/src/solana/solana-plugin.ts +27 -24
- package/src/solana/solana-processor.ts +14 -6
- package/src/store/cache.ts +22 -18
- package/src/store/convert.ts +68 -104
- package/src/store/decorators.ts +3 -2
- package/src/store/store.ts +30 -22
- package/src/store/types.ts +24 -33
- package/src/store/util.ts +13 -18
- package/src/sui/context.ts +8 -7
- package/src/sui/sui-object-processor-template.ts +25 -15
- package/src/sui/sui-object-processor.ts +33 -22
- package/src/sui/sui-plugin-part.ts +41 -34
- package/src/sui/sui-plugin.ts +49 -47
- package/src/sui/sui-processor.ts +25 -17
- package/src/testing/aptos-facet.ts +18 -11
- package/src/testing/cosmos-facet.ts +10 -6
- package/src/testing/eth-facet.ts +40 -18
- package/src/testing/fuel-facet.ts +28 -18
- package/src/testing/iota-facet.ts +32 -20
- package/src/testing/memory-database.ts +126 -88
- package/src/testing/metric-utils.ts +15 -14
- package/src/testing/solana-facet.ts +11 -6
- package/src/testing/sui-facet.ts +30 -20
- package/src/testing/test-processor-server.ts +169 -79
- package/src/utils/price.ts +20 -13
|
@@ -24,7 +24,13 @@ import {
|
|
|
24
24
|
PreprocessResult,
|
|
25
25
|
encodeCallData,
|
|
26
26
|
} from "@sentio/sdk/eth";
|
|
27
|
-
import {
|
|
27
|
+
import {
|
|
28
|
+
EthCallParam,
|
|
29
|
+
EthCallContext,
|
|
30
|
+
EthCallContextSchema,
|
|
31
|
+
PreparedData,
|
|
32
|
+
} from "@sentio/protos";
|
|
33
|
+
import { create } from "@bufbuild/protobuf";
|
|
28
34
|
|
|
29
35
|
import { ERC20__factory } from "./index.js";
|
|
30
36
|
import {
|
|
@@ -859,136 +865,183 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
|
859
865
|
spender: string,
|
|
860
866
|
overrides?: Overrides,
|
|
861
867
|
): EthCallParam {
|
|
862
|
-
return this.view.encodeCall.allowance(
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
868
|
+
return this.view.encodeCall.allowance(
|
|
869
|
+
owner,
|
|
870
|
+
spender,
|
|
871
|
+
create(EthCallContextSchema, {
|
|
872
|
+
chainId: this.context.chainId.toString(),
|
|
873
|
+
address: this.context.address,
|
|
874
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
875
|
+
}),
|
|
876
|
+
);
|
|
867
877
|
},
|
|
868
878
|
approve(
|
|
869
879
|
spender: string,
|
|
870
880
|
amount: BigNumberish,
|
|
871
881
|
overrides?: Overrides,
|
|
872
882
|
): EthCallParam {
|
|
873
|
-
return this.view.encodeCall.approve(
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
883
|
+
return this.view.encodeCall.approve(
|
|
884
|
+
spender,
|
|
885
|
+
amount,
|
|
886
|
+
create(EthCallContextSchema, {
|
|
887
|
+
chainId: this.context.chainId.toString(),
|
|
888
|
+
address: this.context.address,
|
|
889
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
890
|
+
}),
|
|
891
|
+
);
|
|
878
892
|
},
|
|
879
893
|
balanceOf(account: string, overrides?: Overrides): EthCallParam {
|
|
880
|
-
return this.view.encodeCall.balanceOf(
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
894
|
+
return this.view.encodeCall.balanceOf(
|
|
895
|
+
account,
|
|
896
|
+
create(EthCallContextSchema, {
|
|
897
|
+
chainId: this.context.chainId.toString(),
|
|
898
|
+
address: this.context.address,
|
|
899
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
900
|
+
}),
|
|
901
|
+
);
|
|
885
902
|
},
|
|
886
903
|
burn(amount: BigNumberish, overrides?: Overrides): EthCallParam {
|
|
887
|
-
return this.view.encodeCall.burn(
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
904
|
+
return this.view.encodeCall.burn(
|
|
905
|
+
amount,
|
|
906
|
+
create(EthCallContextSchema, {
|
|
907
|
+
chainId: this.context.chainId.toString(),
|
|
908
|
+
address: this.context.address,
|
|
909
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
910
|
+
}),
|
|
911
|
+
);
|
|
892
912
|
},
|
|
893
913
|
burnFrom(
|
|
894
914
|
account: string,
|
|
895
915
|
amount: BigNumberish,
|
|
896
916
|
overrides?: Overrides,
|
|
897
917
|
): EthCallParam {
|
|
898
|
-
return this.view.encodeCall.burnFrom(
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
918
|
+
return this.view.encodeCall.burnFrom(
|
|
919
|
+
account,
|
|
920
|
+
amount,
|
|
921
|
+
create(EthCallContextSchema, {
|
|
922
|
+
chainId: this.context.chainId.toString(),
|
|
923
|
+
address: this.context.address,
|
|
924
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
925
|
+
}),
|
|
926
|
+
);
|
|
903
927
|
},
|
|
904
928
|
decimals(overrides?: Overrides): EthCallParam {
|
|
905
|
-
return this.view.encodeCall.decimals(
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
929
|
+
return this.view.encodeCall.decimals(
|
|
930
|
+
create(EthCallContextSchema, {
|
|
931
|
+
chainId: this.context.chainId.toString(),
|
|
932
|
+
address: this.context.address,
|
|
933
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
934
|
+
}),
|
|
935
|
+
);
|
|
910
936
|
},
|
|
911
937
|
decreaseAllowance(
|
|
912
938
|
spender: string,
|
|
913
939
|
subtractedValue: BigNumberish,
|
|
914
940
|
overrides?: Overrides,
|
|
915
941
|
): EthCallParam {
|
|
916
|
-
return this.view.encodeCall.decreaseAllowance(
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
942
|
+
return this.view.encodeCall.decreaseAllowance(
|
|
943
|
+
spender,
|
|
944
|
+
subtractedValue,
|
|
945
|
+
create(EthCallContextSchema, {
|
|
946
|
+
chainId: this.context.chainId.toString(),
|
|
947
|
+
address: this.context.address,
|
|
948
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
949
|
+
}),
|
|
950
|
+
);
|
|
921
951
|
},
|
|
922
952
|
increaseAllowance(
|
|
923
953
|
spender: string,
|
|
924
954
|
addedValue: BigNumberish,
|
|
925
955
|
overrides?: Overrides,
|
|
926
956
|
): EthCallParam {
|
|
927
|
-
return this.view.encodeCall.increaseAllowance(
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
957
|
+
return this.view.encodeCall.increaseAllowance(
|
|
958
|
+
spender,
|
|
959
|
+
addedValue,
|
|
960
|
+
create(EthCallContextSchema, {
|
|
961
|
+
chainId: this.context.chainId.toString(),
|
|
962
|
+
address: this.context.address,
|
|
963
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
964
|
+
}),
|
|
965
|
+
);
|
|
932
966
|
},
|
|
933
967
|
locker(overrides?: Overrides): EthCallParam {
|
|
934
|
-
return this.view.encodeCall.locker(
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
968
|
+
return this.view.encodeCall.locker(
|
|
969
|
+
create(EthCallContextSchema, {
|
|
970
|
+
chainId: this.context.chainId.toString(),
|
|
971
|
+
address: this.context.address,
|
|
972
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
973
|
+
}),
|
|
974
|
+
);
|
|
939
975
|
},
|
|
940
976
|
name(overrides?: Overrides): EthCallParam {
|
|
941
|
-
return this.view.encodeCall.name(
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
977
|
+
return this.view.encodeCall.name(
|
|
978
|
+
create(EthCallContextSchema, {
|
|
979
|
+
chainId: this.context.chainId.toString(),
|
|
980
|
+
address: this.context.address,
|
|
981
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
982
|
+
}),
|
|
983
|
+
);
|
|
946
984
|
},
|
|
947
985
|
owner(overrides?: Overrides): EthCallParam {
|
|
948
|
-
return this.view.encodeCall.owner(
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
986
|
+
return this.view.encodeCall.owner(
|
|
987
|
+
create(EthCallContextSchema, {
|
|
988
|
+
chainId: this.context.chainId.toString(),
|
|
989
|
+
address: this.context.address,
|
|
990
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
991
|
+
}),
|
|
992
|
+
);
|
|
953
993
|
},
|
|
954
994
|
renounceOwnership(overrides?: Overrides): EthCallParam {
|
|
955
|
-
return this.view.encodeCall.renounceOwnership(
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
995
|
+
return this.view.encodeCall.renounceOwnership(
|
|
996
|
+
create(EthCallContextSchema, {
|
|
997
|
+
chainId: this.context.chainId.toString(),
|
|
998
|
+
address: this.context.address,
|
|
999
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
1000
|
+
}),
|
|
1001
|
+
);
|
|
960
1002
|
},
|
|
961
1003
|
setLocker(_locker: string, overrides?: Overrides): EthCallParam {
|
|
962
|
-
return this.view.encodeCall.setLocker(
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
1004
|
+
return this.view.encodeCall.setLocker(
|
|
1005
|
+
_locker,
|
|
1006
|
+
create(EthCallContextSchema, {
|
|
1007
|
+
chainId: this.context.chainId.toString(),
|
|
1008
|
+
address: this.context.address,
|
|
1009
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
1010
|
+
}),
|
|
1011
|
+
);
|
|
967
1012
|
},
|
|
968
1013
|
symbol(overrides?: Overrides): EthCallParam {
|
|
969
|
-
return this.view.encodeCall.symbol(
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
1014
|
+
return this.view.encodeCall.symbol(
|
|
1015
|
+
create(EthCallContextSchema, {
|
|
1016
|
+
chainId: this.context.chainId.toString(),
|
|
1017
|
+
address: this.context.address,
|
|
1018
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
1019
|
+
}),
|
|
1020
|
+
);
|
|
974
1021
|
},
|
|
975
1022
|
totalSupply(overrides?: Overrides): EthCallParam {
|
|
976
|
-
return this.view.encodeCall.totalSupply(
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1023
|
+
return this.view.encodeCall.totalSupply(
|
|
1024
|
+
create(EthCallContextSchema, {
|
|
1025
|
+
chainId: this.context.chainId.toString(),
|
|
1026
|
+
address: this.context.address,
|
|
1027
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
1028
|
+
}),
|
|
1029
|
+
);
|
|
981
1030
|
},
|
|
982
1031
|
transfer(
|
|
983
1032
|
recipient: string,
|
|
984
1033
|
amount: BigNumberish,
|
|
985
1034
|
overrides?: Overrides,
|
|
986
1035
|
): EthCallParam {
|
|
987
|
-
return this.view.encodeCall.transfer(
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
1036
|
+
return this.view.encodeCall.transfer(
|
|
1037
|
+
recipient,
|
|
1038
|
+
amount,
|
|
1039
|
+
create(EthCallContextSchema, {
|
|
1040
|
+
chainId: this.context.chainId.toString(),
|
|
1041
|
+
address: this.context.address,
|
|
1042
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
1043
|
+
}),
|
|
1044
|
+
);
|
|
992
1045
|
},
|
|
993
1046
|
transferFrom(
|
|
994
1047
|
sender: string,
|
|
@@ -996,18 +1049,26 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
|
996
1049
|
amount: BigNumberish,
|
|
997
1050
|
overrides?: Overrides,
|
|
998
1051
|
): EthCallParam {
|
|
999
|
-
return this.view.encodeCall.transferFrom(
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1052
|
+
return this.view.encodeCall.transferFrom(
|
|
1053
|
+
sender,
|
|
1054
|
+
recipient,
|
|
1055
|
+
amount,
|
|
1056
|
+
create(EthCallContextSchema, {
|
|
1057
|
+
chainId: this.context.chainId.toString(),
|
|
1058
|
+
address: this.context.address,
|
|
1059
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
1060
|
+
}),
|
|
1061
|
+
);
|
|
1004
1062
|
},
|
|
1005
1063
|
transferOwnership(newOwner: string, overrides?: Overrides): EthCallParam {
|
|
1006
|
-
return this.view.encodeCall.transferOwnership(
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1064
|
+
return this.view.encodeCall.transferOwnership(
|
|
1065
|
+
newOwner,
|
|
1066
|
+
create(EthCallContextSchema, {
|
|
1067
|
+
chainId: this.context.chainId.toString(),
|
|
1068
|
+
address: this.context.address,
|
|
1069
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
1070
|
+
}),
|
|
1071
|
+
);
|
|
1011
1072
|
},
|
|
1012
1073
|
};
|
|
1013
1074
|
}
|
|
@@ -24,7 +24,13 @@ import {
|
|
|
24
24
|
PreprocessResult,
|
|
25
25
|
encodeCallData,
|
|
26
26
|
} from "@sentio/sdk/eth";
|
|
27
|
-
import {
|
|
27
|
+
import {
|
|
28
|
+
EthCallParam,
|
|
29
|
+
EthCallContext,
|
|
30
|
+
EthCallContextSchema,
|
|
31
|
+
PreparedData,
|
|
32
|
+
} from "@sentio/protos";
|
|
33
|
+
import { create } from "@bufbuild/protobuf";
|
|
28
34
|
|
|
29
35
|
import { ERC20Bytes__factory } from "./index.js";
|
|
30
36
|
import {
|
|
@@ -464,29 +470,37 @@ export class ERC20BytesBoundContractView extends BoundContractView<
|
|
|
464
470
|
context: this.context,
|
|
465
471
|
|
|
466
472
|
name(overrides?: Overrides): EthCallParam {
|
|
467
|
-
return this.view.encodeCall.name(
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
473
|
+
return this.view.encodeCall.name(
|
|
474
|
+
create(EthCallContextSchema, {
|
|
475
|
+
chainId: this.context.chainId.toString(),
|
|
476
|
+
address: this.context.address,
|
|
477
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
478
|
+
}),
|
|
479
|
+
);
|
|
472
480
|
},
|
|
473
481
|
approve(
|
|
474
482
|
spender: string,
|
|
475
483
|
value: BigNumberish,
|
|
476
484
|
overrides?: Overrides,
|
|
477
485
|
): EthCallParam {
|
|
478
|
-
return this.view.encodeCall.approve(
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
486
|
+
return this.view.encodeCall.approve(
|
|
487
|
+
spender,
|
|
488
|
+
value,
|
|
489
|
+
create(EthCallContextSchema, {
|
|
490
|
+
chainId: this.context.chainId.toString(),
|
|
491
|
+
address: this.context.address,
|
|
492
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
493
|
+
}),
|
|
494
|
+
);
|
|
483
495
|
},
|
|
484
496
|
totalSupply(overrides?: Overrides): EthCallParam {
|
|
485
|
-
return this.view.encodeCall.totalSupply(
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
497
|
+
return this.view.encodeCall.totalSupply(
|
|
498
|
+
create(EthCallContextSchema, {
|
|
499
|
+
chainId: this.context.chainId.toString(),
|
|
500
|
+
address: this.context.address,
|
|
501
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
502
|
+
}),
|
|
503
|
+
);
|
|
490
504
|
},
|
|
491
505
|
transferFrom(
|
|
492
506
|
from: string,
|
|
@@ -494,54 +508,74 @@ export class ERC20BytesBoundContractView extends BoundContractView<
|
|
|
494
508
|
value: BigNumberish,
|
|
495
509
|
overrides?: Overrides,
|
|
496
510
|
): EthCallParam {
|
|
497
|
-
return this.view.encodeCall.transferFrom(
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
511
|
+
return this.view.encodeCall.transferFrom(
|
|
512
|
+
from,
|
|
513
|
+
to,
|
|
514
|
+
value,
|
|
515
|
+
create(EthCallContextSchema, {
|
|
516
|
+
chainId: this.context.chainId.toString(),
|
|
517
|
+
address: this.context.address,
|
|
518
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
519
|
+
}),
|
|
520
|
+
);
|
|
502
521
|
},
|
|
503
522
|
decimals(overrides?: Overrides): EthCallParam {
|
|
504
|
-
return this.view.encodeCall.decimals(
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
523
|
+
return this.view.encodeCall.decimals(
|
|
524
|
+
create(EthCallContextSchema, {
|
|
525
|
+
chainId: this.context.chainId.toString(),
|
|
526
|
+
address: this.context.address,
|
|
527
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
528
|
+
}),
|
|
529
|
+
);
|
|
509
530
|
},
|
|
510
531
|
balanceOf(who: string, overrides?: Overrides): EthCallParam {
|
|
511
|
-
return this.view.encodeCall.balanceOf(
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
532
|
+
return this.view.encodeCall.balanceOf(
|
|
533
|
+
who,
|
|
534
|
+
create(EthCallContextSchema, {
|
|
535
|
+
chainId: this.context.chainId.toString(),
|
|
536
|
+
address: this.context.address,
|
|
537
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
538
|
+
}),
|
|
539
|
+
);
|
|
516
540
|
},
|
|
517
541
|
symbol(overrides?: Overrides): EthCallParam {
|
|
518
|
-
return this.view.encodeCall.symbol(
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
542
|
+
return this.view.encodeCall.symbol(
|
|
543
|
+
create(EthCallContextSchema, {
|
|
544
|
+
chainId: this.context.chainId.toString(),
|
|
545
|
+
address: this.context.address,
|
|
546
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
547
|
+
}),
|
|
548
|
+
);
|
|
523
549
|
},
|
|
524
550
|
transfer(
|
|
525
551
|
to: string,
|
|
526
552
|
value: BigNumberish,
|
|
527
553
|
overrides?: Overrides,
|
|
528
554
|
): EthCallParam {
|
|
529
|
-
return this.view.encodeCall.transfer(
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
555
|
+
return this.view.encodeCall.transfer(
|
|
556
|
+
to,
|
|
557
|
+
value,
|
|
558
|
+
create(EthCallContextSchema, {
|
|
559
|
+
chainId: this.context.chainId.toString(),
|
|
560
|
+
address: this.context.address,
|
|
561
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
562
|
+
}),
|
|
563
|
+
);
|
|
534
564
|
},
|
|
535
565
|
allowance(
|
|
536
566
|
owner: string,
|
|
537
567
|
spender: string,
|
|
538
568
|
overrides?: Overrides,
|
|
539
569
|
): EthCallParam {
|
|
540
|
-
return this.view.encodeCall.allowance(
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
570
|
+
return this.view.encodeCall.allowance(
|
|
571
|
+
owner,
|
|
572
|
+
spender,
|
|
573
|
+
create(EthCallContextSchema, {
|
|
574
|
+
chainId: this.context.chainId.toString(),
|
|
575
|
+
address: this.context.address,
|
|
576
|
+
blockTag: this.context.getBlockTag(overrides),
|
|
577
|
+
}),
|
|
578
|
+
);
|
|
545
579
|
},
|
|
546
580
|
};
|
|
547
581
|
}
|