@sentio/sdk 2.18.0-rc.3 → 2.18.1-rc.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"erc20bytes-processor.js","sourceRoot":"","sources":["../../../../src/eth/builtin/internal/erc20bytes-processor.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,mBAAmB,EAEnB,aAAa,EACb,qBAAqB,EACrB,iBAAiB,EAEjB,YAAY,EACZ,aAAa,GAKd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAwEjD,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;AAE3E,MAAM,OAAO,sBAAuB,SAAQ,YAAwB;IAClE,YAAY,QAAoB;QAC9B,KAAK,CAAC,QAAQ,CAAC,CAAC;QAChB,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,SAAqB;QAC9B,IAAI;YACF,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;SACnE;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,mBAAmB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;SACzC;IACH,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,SAAqB;QACrC,IAAI;YACF,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;SAC1E;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,mBAAmB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;SACzC;IACH,CAAC;IAED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B,CAAC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { BigNumberish, Overrides } from \"ethers\";\nimport {\n addContractByABI,\n getContractByABI,\n addProcessor,\n getProcessor,\n getProvider,\n transformEtherError,\n BindOptions,\n BaseProcessor,\n BaseProcessorTemplate,\n BoundContractView,\n ContractContext,\n ContractView,\n DummyProvider,\n EthChainId,\n TypedCallTrace,\n EthContext,\n EthFetchConfig,\n} from \"@sentio/sdk/eth\";\n\nimport { ERC20Bytes__factory } from \"./index.js\";\nimport {\n ERC20Bytes,\n ApprovalEvent,\n ApprovalEventFilter,\n TransferEvent,\n TransferEventFilter,\n} from \"./ERC20Bytes.js\";\n\nexport interface NameCallObject {}\n\nexport type NameCallTrace = TypedCallTrace<[], NameCallObject>;\n\nexport interface ApproveCallObject {\n spender: string;\n value: bigint;\n}\n\nexport type ApproveCallTrace = TypedCallTrace<\n [string, bigint],\n ApproveCallObject\n>;\n\nexport interface TotalSupplyCallObject {}\n\nexport type TotalSupplyCallTrace = TypedCallTrace<[], TotalSupplyCallObject>;\n\nexport interface TransferFromCallObject {\n from: string;\n to: string;\n value: bigint;\n}\n\nexport type TransferFromCallTrace = TypedCallTrace<\n [string, string, bigint],\n TransferFromCallObject\n>;\n\nexport interface DecimalsCallObject {}\n\nexport type DecimalsCallTrace = TypedCallTrace<[], DecimalsCallObject>;\n\nexport interface BalanceOfCallObject {\n who: string;\n}\n\nexport type BalanceOfCallTrace = TypedCallTrace<[string], BalanceOfCallObject>;\n\nexport interface SymbolCallObject {}\n\nexport type SymbolCallTrace = TypedCallTrace<[], SymbolCallObject>;\n\nexport interface TransferCallObject {\n to: string;\n value: bigint;\n}\n\nexport type TransferCallTrace = TypedCallTrace<\n [string, bigint],\n TransferCallObject\n>;\n\nexport interface AllowanceCallObject {\n owner: string;\n spender: string;\n}\n\nexport type AllowanceCallTrace = TypedCallTrace<\n [string, string],\n AllowanceCallObject\n>;\n\nconst templateContract = ERC20Bytes__factory.connect(\"0x0\", DummyProvider);\n\nexport class ERC20BytesContractView extends ContractView<ERC20Bytes> {\n constructor(contract: ERC20Bytes) {\n super(contract);\n this.callStatic.contract = contract;\n }\n\n async name(overrides?: Overrides): Promise<string> {\n try {\n return await this.contract.getFunction(\"name()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async totalSupply(overrides?: Overrides): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"totalSupply()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async decimals(overrides?: Overrides): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"decimals()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async balanceOf(who: string, overrides?: Overrides): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"balanceOf(address)\")(\n who,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async symbol(overrides?: Overrides): Promise<string> {\n try {\n return await this.contract.getFunction(\"symbol()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async allowance(\n owner: string,\n spender: string,\n overrides?: Overrides\n ): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"allowance(address,address)\")(\n owner,\n spender,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n callStatic = {\n contract: this.contract,\n\n async approve(\n spender: string,\n value: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n try {\n return await this.contract\n .getFunction(\"approve(address,uint256)\")\n .staticCall(spender, value, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async transferFrom(\n from: string,\n to: string,\n value: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n try {\n return await this.contract\n .getFunction(\"transferFrom(address,address,uint256)\")\n .staticCall(from, to, value, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async transfer(\n to: string,\n value: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n try {\n return await this.contract\n .getFunction(\"transfer(address,uint256)\")\n .staticCall(to, value, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n };\n}\n\nexport class ERC20BytesBoundContractView extends BoundContractView<\n ERC20Bytes,\n ERC20BytesContractView\n> {\n async name(overrides?: Overrides): Promise<string> {\n return await this.view.name({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async totalSupply(overrides?: Overrides): Promise<bigint> {\n return await this.view.totalSupply({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async decimals(overrides?: Overrides): Promise<bigint> {\n return await this.view.decimals({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async balanceOf(who: string, overrides?: Overrides): Promise<bigint> {\n return await this.view.balanceOf(who, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async symbol(overrides?: Overrides): Promise<string> {\n return await this.view.symbol({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async allowance(\n owner: string,\n spender: string,\n overrides?: Overrides\n ): Promise<bigint> {\n return await this.view.allowance(owner, spender, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n callStatic = {\n view: this.view,\n context: this.context,\n\n async approve(\n spender: string,\n value: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n return await this.view.callStatic.approve(spender, value, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n async transferFrom(\n from: string,\n to: string,\n value: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n return await this.view.callStatic.transferFrom(from, to, value, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n async transfer(\n to: string,\n value: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n return await this.view.callStatic.transfer(to, value, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n };\n}\n\nexport type ERC20BytesContext = ContractContext<\n ERC20Bytes,\n ERC20BytesBoundContractView\n>;\n\nexport class ERC20BytesProcessor extends BaseProcessor<\n ERC20Bytes,\n ERC20BytesBoundContractView\n> {\n onEventApproval(\n handler: (event: ApprovalEvent, ctx: ERC20BytesContext) => void,\n filter?: ApprovalEventFilter | ApprovalEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Approval(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventTransfer(\n handler: (event: TransferEvent, ctx: ERC20BytesContext) => void,\n filter?: TransferEventFilter | TransferEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Transfer(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onCallName(\n handler: (call: NameCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x06fdde03\", handler as any, fetchConfig);\n }\n\n onCallApprove(\n handler: (call: ApproveCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x095ea7b3\", handler as any, fetchConfig);\n }\n\n onCallTotalSupply(\n handler: (call: TotalSupplyCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x18160ddd\", handler as any, fetchConfig);\n }\n\n onCallTransferFrom(\n handler: (call: TransferFromCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x23b872dd\", handler as any, fetchConfig);\n }\n\n onCallDecimals(\n handler: (call: DecimalsCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x313ce567\", handler as any, fetchConfig);\n }\n\n onCallBalanceOf(\n handler: (call: BalanceOfCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x70a08231\", handler as any, fetchConfig);\n }\n\n onCallSymbol(\n handler: (call: SymbolCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x95d89b41\", handler as any, fetchConfig);\n }\n\n onCallTransfer(\n handler: (call: TransferCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xa9059cbb\", handler as any, fetchConfig);\n }\n\n onCallAllowance(\n handler: (call: AllowanceCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xdd62ed3e\", handler as any, fetchConfig);\n }\n\n public static filters = {\n Approval(owner?: string | null, spender?: string | null, value?: null) {\n return templateContract.filters[\"Approval(address,address,uint256)\"](\n owner,\n spender,\n value\n );\n },\n Transfer(from?: string | null, to?: string | null, value?: null) {\n return templateContract.filters[\"Transfer(address,address,uint256)\"](\n from,\n to,\n value\n );\n },\n };\n\n protected CreateBoundContractView(): ERC20BytesBoundContractView {\n const view = getERC20BytesContract(\n this.config.network,\n this.config.address\n );\n return new ERC20BytesBoundContractView(this.config.address, view);\n }\n\n public static bind(options: BindOptions): ERC20BytesProcessor {\n if (!options.name) {\n options.name = \"ERC20Bytes\";\n }\n let processor = getProcessor(options) as ERC20BytesProcessor;\n if (!processor) {\n processor = new ERC20BytesProcessor(options);\n addProcessor(options, processor);\n }\n return processor;\n }\n}\n\nexport class ERC20BytesProcessorTemplate extends BaseProcessorTemplate<\n ERC20Bytes,\n ERC20BytesBoundContractView\n> {\n bindInternal(options: BindOptions) {\n if (!options.name) {\n options.name = \"ERC20Bytes\";\n }\n let processor = getProcessor(options) as ERC20BytesProcessor;\n if (!processor) {\n processor = new ERC20BytesProcessor(options);\n addProcessor(options, processor);\n }\n return processor;\n }\n\n onEventApproval(\n handler: (event: ApprovalEvent, ctx: ERC20BytesContext) => void,\n filter?: ApprovalEventFilter | ApprovalEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Approval(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventTransfer(\n handler: (event: TransferEvent, ctx: ERC20BytesContext) => void,\n filter?: TransferEventFilter | TransferEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Transfer(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n}\n\nexport function getERC20BytesContract(\n chainId: EthChainId,\n address: string\n): ERC20BytesContractView {\n let contract = getContractByABI(\n \"ERC20Bytes\",\n address,\n chainId\n ) as ERC20BytesContractView;\n if (!contract) {\n const rawContract = ERC20Bytes__factory.connect(\n address,\n getProvider(chainId)\n );\n contract = new ERC20BytesContractView(rawContract);\n addContractByABI(\"ERC20Bytes\", address, chainId, contract);\n }\n return contract;\n}\n\nexport function getERC20BytesContractOnContext(\n context: EthContext,\n address: string\n): ERC20BytesBoundContractView {\n const view = getERC20BytesContract(context.getChainId(), address);\n const boundView = new ERC20BytesBoundContractView(address, view);\n boundView.context = context as any;\n return boundView;\n}\n"]}
1
+ {"version":3,"file":"erc20bytes-processor.js","sourceRoot":"","sources":["../../../../src/eth/builtin/internal/erc20bytes-processor.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,mBAAmB,EAEnB,aAAa,EACb,qBAAqB,EACrB,iBAAiB,EAEjB,YAAY,EACZ,aAAa,GAKd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAwEj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AAE,WAAW,CAAC,CAAC;IACzD,CAAC;CACF;AAED,MAAM,UAAU,qBAAqB,CACnC,OAAmB,EACnB,OAAe;IAEf,IAAI,QAAQ,GAAG,gBAAgB,CAC7B,YAAY,EACZ,OAAO,EACP,OAAO,CACkB,CAAC;IAC5B,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,WAAW,GAAG,mBAAmB,CAAC,OAAO,CAC7C,OAAO,EACP,WAAW,CAAC,OAAO,CAAC,CACrB,CAAC;QACF,QAAQ,GAAG,IAAI,sBAAsB,CAAC,WAAW,CAAC,CAAC;QACnD,gBAAgB,CAAC,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;KAC5D;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,OAAmB,EACnB,OAAe;IAEf,MAAM,IAAI,GAAG,qBAAqB,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,MAAM,SAAS,GAAG,IAAI,2BAA2B,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACjE,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;IAC5B,IAAI,SAAS,CAAC,UAAU,EAAE;QACxB,SAAS,CAAC,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;KACxC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { BigNumberish, Overrides } from \"ethers\";\nimport {\n addContractByABI,\n getContractByABI,\n addProcessor,\n getProcessor,\n getProvider,\n transformEtherError,\n BindOptions,\n BaseProcessor,\n BaseProcessorTemplate,\n BoundContractView,\n ContractContext,\n ContractView,\n DummyProvider,\n EthChainId,\n TypedCallTrace,\n EthContext,\n EthFetchConfig,\n} from \"@sentio/sdk/eth\";\n\nimport { ERC20Bytes__factory } from \"./index.js\";\nimport {\n ERC20Bytes,\n ApprovalEvent,\n ApprovalEventFilter,\n TransferEvent,\n TransferEventFilter,\n} from \"./ERC20Bytes.js\";\n\nexport interface NameCallObject {}\n\nexport type NameCallTrace = TypedCallTrace<[], NameCallObject>;\n\nexport interface ApproveCallObject {\n spender: string;\n value: bigint;\n}\n\nexport type ApproveCallTrace = TypedCallTrace<\n [string, bigint],\n ApproveCallObject\n>;\n\nexport interface TotalSupplyCallObject {}\n\nexport type TotalSupplyCallTrace = TypedCallTrace<[], TotalSupplyCallObject>;\n\nexport interface TransferFromCallObject {\n from: string;\n to: string;\n value: bigint;\n}\n\nexport type TransferFromCallTrace = TypedCallTrace<\n [string, string, bigint],\n TransferFromCallObject\n>;\n\nexport interface DecimalsCallObject {}\n\nexport type DecimalsCallTrace = TypedCallTrace<[], DecimalsCallObject>;\n\nexport interface BalanceOfCallObject {\n who: string;\n}\n\nexport type BalanceOfCallTrace = TypedCallTrace<[string], BalanceOfCallObject>;\n\nexport interface SymbolCallObject {}\n\nexport type SymbolCallTrace = TypedCallTrace<[], SymbolCallObject>;\n\nexport interface TransferCallObject {\n to: string;\n value: bigint;\n}\n\nexport type TransferCallTrace = TypedCallTrace<\n [string, bigint],\n TransferCallObject\n>;\n\nexport interface AllowanceCallObject {\n owner: string;\n spender: string;\n}\n\nexport type AllowanceCallTrace = TypedCallTrace<\n [string, string],\n AllowanceCallObject\n>;\n\nconst templateContract = ERC20Bytes__factory.connect(\"0x0\", DummyProvider);\n\nexport class ERC20BytesContractView extends ContractView<ERC20Bytes> {\n constructor(contract: ERC20Bytes) {\n super(contract);\n this.callStatic.contract = contract;\n }\n\n async name(overrides?: Overrides): Promise<string> {\n try {\n return await this.contract.getFunction(\"name()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async totalSupply(overrides?: Overrides): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"totalSupply()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async decimals(overrides?: Overrides): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"decimals()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async balanceOf(who: string, overrides?: Overrides): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"balanceOf(address)\")(\n who,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async symbol(overrides?: Overrides): Promise<string> {\n try {\n return await this.contract.getFunction(\"symbol()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async allowance(\n owner: string,\n spender: string,\n overrides?: Overrides\n ): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"allowance(address,address)\")(\n owner,\n spender,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n callStatic = {\n contract: this.contract,\n\n async approve(\n spender: string,\n value: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n try {\n return await this.contract\n .getFunction(\"approve(address,uint256)\")\n .staticCall(spender, value, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async transferFrom(\n from: string,\n to: string,\n value: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n try {\n return await this.contract\n .getFunction(\"transferFrom(address,address,uint256)\")\n .staticCall(from, to, value, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async transfer(\n to: string,\n value: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n try {\n return await this.contract\n .getFunction(\"transfer(address,uint256)\")\n .staticCall(to, value, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n };\n}\n\nexport class ERC20BytesBoundContractView extends BoundContractView<\n ERC20Bytes,\n ERC20BytesContractView\n> {\n async name(overrides?: Overrides): Promise<string> {\n return await this.view.name({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async totalSupply(overrides?: Overrides): Promise<bigint> {\n return await this.view.totalSupply({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async decimals(overrides?: Overrides): Promise<bigint> {\n return await this.view.decimals({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async balanceOf(who: string, overrides?: Overrides): Promise<bigint> {\n return await this.view.balanceOf(who, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async symbol(overrides?: Overrides): Promise<string> {\n return await this.view.symbol({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async allowance(\n owner: string,\n spender: string,\n overrides?: Overrides\n ): Promise<bigint> {\n return await this.view.allowance(owner, spender, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n callStatic = {\n view: this.view,\n context: this.context,\n\n async approve(\n spender: string,\n value: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n return await this.view.callStatic.approve(spender, value, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n async transferFrom(\n from: string,\n to: string,\n value: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n return await this.view.callStatic.transferFrom(from, to, value, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n async transfer(\n to: string,\n value: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n return await this.view.callStatic.transfer(to, value, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n };\n}\n\nexport type ERC20BytesContext = ContractContext<\n ERC20Bytes,\n ERC20BytesBoundContractView\n>;\n\nexport class ERC20BytesProcessor extends BaseProcessor<\n ERC20Bytes,\n ERC20BytesBoundContractView\n> {\n onEventApproval(\n handler: (event: ApprovalEvent, ctx: ERC20BytesContext) => void,\n filter?: ApprovalEventFilter | ApprovalEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Approval(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventTransfer(\n handler: (event: TransferEvent, ctx: ERC20BytesContext) => void,\n filter?: TransferEventFilter | TransferEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Transfer(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onCallName(\n handler: (call: NameCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x06fdde03\", handler as any, fetchConfig);\n }\n\n onCallApprove(\n handler: (call: ApproveCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x095ea7b3\", handler as any, fetchConfig);\n }\n\n onCallTotalSupply(\n handler: (call: TotalSupplyCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x18160ddd\", handler as any, fetchConfig);\n }\n\n onCallTransferFrom(\n handler: (call: TransferFromCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x23b872dd\", handler as any, fetchConfig);\n }\n\n onCallDecimals(\n handler: (call: DecimalsCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x313ce567\", handler as any, fetchConfig);\n }\n\n onCallBalanceOf(\n handler: (call: BalanceOfCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x70a08231\", handler as any, fetchConfig);\n }\n\n onCallSymbol(\n handler: (call: SymbolCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x95d89b41\", handler as any, fetchConfig);\n }\n\n onCallTransfer(\n handler: (call: TransferCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xa9059cbb\", handler as any, fetchConfig);\n }\n\n onCallAllowance(\n handler: (call: AllowanceCallTrace, ctx: ERC20BytesContext) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xdd62ed3e\", handler as any, fetchConfig);\n }\n\n public static filters = {\n Approval(owner?: string | null, spender?: string | null, value?: null) {\n return templateContract.filters[\"Approval(address,address,uint256)\"](\n owner,\n spender,\n value\n );\n },\n Transfer(from?: string | null, to?: string | null, value?: null) {\n return templateContract.filters[\"Transfer(address,address,uint256)\"](\n from,\n to,\n value\n );\n },\n };\n\n protected CreateBoundContractView(): ERC20BytesBoundContractView {\n const view = getERC20BytesContract(\n this.config.network,\n this.config.address\n );\n return new ERC20BytesBoundContractView(this.config.address, view);\n }\n\n public static bind(options: BindOptions): ERC20BytesProcessor {\n if (!options.name) {\n options.name = \"ERC20Bytes\";\n }\n let processor = getProcessor(options) as ERC20BytesProcessor;\n if (!processor) {\n processor = new ERC20BytesProcessor(options);\n addProcessor(options, processor);\n }\n return processor;\n }\n}\n\nexport class ERC20BytesProcessorTemplate extends BaseProcessorTemplate<\n ERC20Bytes,\n ERC20BytesBoundContractView\n> {\n bindInternal(options: BindOptions) {\n if (!options.name) {\n options.name = \"ERC20Bytes\";\n }\n let processor = getProcessor(options) as ERC20BytesProcessor;\n if (!processor) {\n processor = new ERC20BytesProcessor(options);\n addProcessor(options, processor);\n }\n return processor;\n }\n\n onEventApproval(\n handler: (event: ApprovalEvent, ctx: ERC20BytesContext) => void,\n filter?: ApprovalEventFilter | ApprovalEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Approval(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventTransfer(\n handler: (event: TransferEvent, ctx: ERC20BytesContext) => void,\n filter?: TransferEventFilter | TransferEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Transfer(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n}\n\nexport function getERC20BytesContract(\n chainId: EthChainId,\n address: string\n): ERC20BytesContractView {\n let contract = getContractByABI(\n \"ERC20Bytes\",\n address,\n chainId\n ) as ERC20BytesContractView;\n if (!contract) {\n const rawContract = ERC20Bytes__factory.connect(\n address,\n getProvider(chainId)\n );\n contract = new ERC20BytesContractView(rawContract);\n addContractByABI(\"ERC20Bytes\", address, chainId, contract);\n }\n return contract;\n}\n\nexport function getERC20BytesContractOnContext(\n context: EthContext,\n address: string\n): ERC20BytesBoundContractView {\n const view = getERC20BytesContract(context.getChainId(), address);\n const boundView = new ERC20BytesBoundContractView(address, view);\n boundView.context = context;\n if (boundView.callStatic) {\n boundView.callStatic.context = context;\n }\n return boundView;\n}\n"]}
@@ -355,6 +355,9 @@ export function getERC721ContractOnContext(context, address) {
355
355
  const view = getERC721Contract(context.getChainId(), address);
356
356
  const boundView = new ERC721BoundContractView(address, view);
357
357
  boundView.context = context;
358
+ if (boundView.callStatic) {
359
+ boundView.callStatic.context = context;
360
+ }
358
361
  return boundView;
359
362
  }
360
363
  //# sourceMappingURL=erc721-processor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"erc721-processor.js","sourceRoot":"","sources":["../../../../src/eth/builtin/internal/erc721-processor.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,mBAAmB,EAEnB,aAAa,EACb,qBAAqB,EACrB,iBAAiB,EAEjB,YAAY,EACZ,aAAa,GAKd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA4H7C,MAAM,gBAAgB,GAAG,eAAe,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;AAEvE,MAAM,OAAO,kBAAmB,SA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able */\nimport { BigNumberish, Overrides, BytesLike } from \"ethers\";\nimport {\n addContractByABI,\n getContractByABI,\n addProcessor,\n getProcessor,\n getProvider,\n transformEtherError,\n BindOptions,\n BaseProcessor,\n BaseProcessorTemplate,\n BoundContractView,\n ContractContext,\n ContractView,\n DummyProvider,\n EthChainId,\n TypedCallTrace,\n EthContext,\n EthFetchConfig,\n} from \"@sentio/sdk/eth\";\n\nimport { ERC721__factory } from \"./index.js\";\nimport {\n ERC721,\n ApprovalEvent,\n ApprovalEventFilter,\n ApprovalForAllEvent,\n ApprovalForAllEventFilter,\n TransferEvent,\n TransferEventFilter,\n} from \"./ERC721.js\";\n\nexport interface ApproveCallObject {\n to: string;\n tokenId: bigint;\n}\n\nexport type ApproveCallTrace = TypedCallTrace<\n [string, bigint],\n ApproveCallObject\n>;\n\nexport interface TotalSupplyCallObject {}\n\nexport type TotalSupplyCallTrace = TypedCallTrace<[], TotalSupplyCallObject>;\n\nexport interface BalanceOfCallObject {\n owner: string;\n}\n\nexport type BalanceOfCallTrace = TypedCallTrace<[string], BalanceOfCallObject>;\n\nexport interface GetApprovedCallObject {\n tokenId: bigint;\n}\n\nexport type GetApprovedCallTrace = TypedCallTrace<\n [bigint],\n GetApprovedCallObject\n>;\n\nexport interface IsApprovedForAllCallObject {\n owner: string;\n operator: string;\n}\n\nexport type IsApprovedForAllCallTrace = TypedCallTrace<\n [string, string],\n IsApprovedForAllCallObject\n>;\n\nexport interface NameCallObject {}\n\nexport type NameCallTrace = TypedCallTrace<[], NameCallObject>;\n\nexport interface OwnerOfCallObject {\n tokenId: bigint;\n}\n\nexport type OwnerOfCallTrace = TypedCallTrace<[bigint], OwnerOfCallObject>;\n\nexport interface SafeTransferFrom_address_address_uint256CallObject {\n from: string;\n to: string;\n tokenId: bigint;\n}\n\nexport type SafeTransferFrom_address_address_uint256CallTrace = TypedCallTrace<\n [string, string, bigint],\n SafeTransferFrom_address_address_uint256CallObject\n>;\n\nexport interface SafeTransferFrom_address_address_uint256_bytesCallObject {\n from: string;\n to: string;\n tokenId: bigint;\n data: string;\n}\n\nexport type SafeTransferFrom_address_address_uint256_bytesCallTrace =\n TypedCallTrace<\n [string, string, bigint, string],\n SafeTransferFrom_address_address_uint256_bytesCallObject\n >;\n\nexport interface SetApprovalForAllCallObject {\n operator: string;\n _approved: boolean;\n}\n\nexport type SetApprovalForAllCallTrace = TypedCallTrace<\n [string, boolean],\n SetApprovalForAllCallObject\n>;\n\nexport interface SupportsInterfaceCallObject {\n interfaceId: string;\n}\n\nexport type SupportsInterfaceCallTrace = TypedCallTrace<\n [string],\n SupportsInterfaceCallObject\n>;\n\nexport interface SymbolCallObject {}\n\nexport type SymbolCallTrace = TypedCallTrace<[], SymbolCallObject>;\n\nexport interface TokenURICallObject {\n tokenId: bigint;\n}\n\nexport type TokenURICallTrace = TypedCallTrace<[bigint], TokenURICallObject>;\n\nexport interface TransferFromCallObject {\n from: string;\n to: string;\n tokenId: bigint;\n}\n\nexport type TransferFromCallTrace = TypedCallTrace<\n [string, string, bigint],\n TransferFromCallObject\n>;\n\nconst templateContract = ERC721__factory.connect(\"0x0\", DummyProvider);\n\nexport class ERC721ContractView extends ContractView<ERC721> {\n constructor(contract: ERC721) {\n super(contract);\n this.callStatic.contract = contract;\n }\n\n async totalSupply(overrides?: Overrides): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"totalSupply()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async balanceOf(owner: string, overrides?: Overrides): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"balanceOf(address)\")(\n owner,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async getApproved(\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<string> {\n try {\n return await this.contract.getFunction(\"getApproved(uint256)\")(\n tokenId,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async isApprovedForAll(\n owner: string,\n operator: string,\n overrides?: Overrides\n ): Promise<boolean> {\n try {\n return await this.contract.getFunction(\n \"isApprovedForAll(address,address)\"\n )(owner, operator, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async name(overrides?: Overrides): Promise<string> {\n try {\n return await this.contract.getFunction(\"name()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async ownerOf(tokenId: BigNumberish, overrides?: Overrides): Promise<string> {\n try {\n return await this.contract.getFunction(\"ownerOf(uint256)\")(\n tokenId,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async supportsInterface(\n interfaceId: BytesLike,\n overrides?: Overrides\n ): Promise<boolean> {\n try {\n return await this.contract.getFunction(\"supportsInterface(bytes4)\")(\n interfaceId,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async symbol(overrides?: Overrides): Promise<string> {\n try {\n return await this.contract.getFunction(\"symbol()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async tokenURI(\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<string> {\n try {\n return await this.contract.getFunction(\"tokenURI(uint256)\")(\n tokenId,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n callStatic = {\n contract: this.contract,\n\n async approve(\n to: string,\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<void> {\n try {\n return await this.contract\n .getFunction(\"approve(address,uint256)\")\n .staticCall(to, tokenId, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async safeTransferFrom_address_address_uint256(\n from: string,\n to: string,\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<void> {\n try {\n return await this.contract\n .getFunction(\"safeTransferFrom(address,address,uint256)\")\n .staticCall(from, to, tokenId, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async safeTransferFrom_address_address_uint256_bytes(\n from: string,\n to: string,\n tokenId: BigNumberish,\n data: BytesLike,\n overrides?: Overrides\n ): Promise<void> {\n try {\n return await this.contract\n .getFunction(\"safeTransferFrom(address,address,uint256,bytes)\")\n .staticCall(from, to, tokenId, data, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async setApprovalForAll(\n operator: string,\n _approved: boolean,\n overrides?: Overrides\n ): Promise<void> {\n try {\n return await this.contract\n .getFunction(\"setApprovalForAll(address,bool)\")\n .staticCall(operator, _approved, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async transferFrom(\n from: string,\n to: string,\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<void> {\n try {\n return await this.contract\n .getFunction(\"transferFrom(address,address,uint256)\")\n .staticCall(from, to, tokenId, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n };\n}\n\nexport class ERC721BoundContractView extends BoundContractView<\n ERC721,\n ERC721ContractView\n> {\n async totalSupply(overrides?: Overrides): Promise<bigint> {\n return await this.view.totalSupply({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async balanceOf(owner: string, overrides?: Overrides): Promise<bigint> {\n return await this.view.balanceOf(owner, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async getApproved(\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<string> {\n return await this.view.getApproved(tokenId, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async isApprovedForAll(\n owner: string,\n operator: string,\n overrides?: Overrides\n ): Promise<boolean> {\n return await this.view.isApprovedForAll(owner, operator, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async name(overrides?: Overrides): Promise<string> {\n return await this.view.name({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async ownerOf(tokenId: BigNumberish, overrides?: Overrides): Promise<string> {\n return await this.view.ownerOf(tokenId, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async supportsInterface(\n interfaceId: BytesLike,\n overrides?: Overrides\n ): Promise<boolean> {\n return await this.view.supportsInterface(interfaceId, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async symbol(overrides?: Overrides): Promise<string> {\n return await this.view.symbol({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async tokenURI(\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<string> {\n return await this.view.tokenURI(tokenId, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n callStatic = {\n view: this.view,\n context: this.context,\n\n async approve(\n to: string,\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<void> {\n return await this.view.callStatic.approve(to, tokenId, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n async safeTransferFrom_address_address_uint256(\n from: string,\n to: string,\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<void> {\n return await this.view.callStatic.safeTransferFrom_address_address_uint256(\n from,\n to,\n tokenId,\n {\n blockTag: this.context.blockNumber,\n ...overrides,\n }\n );\n },\n async safeTransferFrom_address_address_uint256_bytes(\n from: string,\n to: string,\n tokenId: BigNumberish,\n data: BytesLike,\n overrides?: Overrides\n ): Promise<void> {\n return await this.view.callStatic.safeTransferFrom_address_address_uint256_bytes(\n from,\n to,\n tokenId,\n data,\n {\n blockTag: this.context.blockNumber,\n ...overrides,\n }\n );\n },\n async setApprovalForAll(\n operator: string,\n _approved: boolean,\n overrides?: Overrides\n ): Promise<void> {\n return await this.view.callStatic.setApprovalForAll(operator, _approved, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n async transferFrom(\n from: string,\n to: string,\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<void> {\n return await this.view.callStatic.transferFrom(from, to, tokenId, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n };\n}\n\nexport type ERC721Context = ContractContext<ERC721, ERC721BoundContractView>;\n\nexport class ERC721Processor extends BaseProcessor<\n ERC721,\n ERC721BoundContractView\n> {\n onEventApproval(\n handler: (event: ApprovalEvent, ctx: ERC721Context) => void,\n filter?: ApprovalEventFilter | ApprovalEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Approval(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventApprovalForAll(\n handler: (event: ApprovalForAllEvent, ctx: ERC721Context) => void,\n filter?: ApprovalForAllEventFilter | ApprovalForAllEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"ApprovalForAll(address,address,bool)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventTransfer(\n handler: (event: TransferEvent, ctx: ERC721Context) => void,\n filter?: TransferEventFilter | TransferEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Transfer(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onCallApprove(\n handler: (call: ApproveCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x095ea7b3\", handler as any, fetchConfig);\n }\n\n onCallTotalSupply(\n handler: (call: TotalSupplyCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x18160ddd\", handler as any, fetchConfig);\n }\n\n onCallBalanceOf(\n handler: (call: BalanceOfCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x70a08231\", handler as any, fetchConfig);\n }\n\n onCallGetApproved(\n handler: (call: GetApprovedCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x081812fc\", handler as any, fetchConfig);\n }\n\n onCallIsApprovedForAll(\n handler: (call: IsApprovedForAllCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xe985e9c5\", handler as any, fetchConfig);\n }\n\n onCallName(\n handler: (call: NameCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x06fdde03\", handler as any, fetchConfig);\n }\n\n onCallOwnerOf(\n handler: (call: OwnerOfCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x6352211e\", handler as any, fetchConfig);\n }\n\n onCallSafeTransferFrom_address_address_uint256(\n handler: (\n call: SafeTransferFrom_address_address_uint256CallTrace,\n ctx: ERC721Context\n ) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x42842e0e\", handler as any, fetchConfig);\n }\n\n onCallSafeTransferFrom_address_address_uint256_bytes(\n handler: (\n call: SafeTransferFrom_address_address_uint256_bytesCallTrace,\n ctx: ERC721Context\n ) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xb88d4fde\", handler as any, fetchConfig);\n }\n\n onCallSetApprovalForAll(\n handler: (call: SetApprovalForAllCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xa22cb465\", handler as any, fetchConfig);\n }\n\n onCallSupportsInterface(\n handler: (call: SupportsInterfaceCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x01ffc9a7\", handler as any, fetchConfig);\n }\n\n onCallSymbol(\n handler: (call: SymbolCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x95d89b41\", handler as any, fetchConfig);\n }\n\n onCallTokenURI(\n handler: (call: TokenURICallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xc87b56dd\", handler as any, fetchConfig);\n }\n\n onCallTransferFrom(\n handler: (call: TransferFromCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x23b872dd\", handler as any, fetchConfig);\n }\n\n public static filters = {\n Approval(\n owner?: string | null,\n approved?: string | null,\n tokenId?: BigNumberish | null\n ) {\n return templateContract.filters[\"Approval(address,address,uint256)\"](\n owner,\n approved,\n tokenId\n );\n },\n ApprovalForAll(\n owner?: string | null,\n operator?: string | null,\n approved?: null\n ) {\n return templateContract.filters[\"ApprovalForAll(address,address,bool)\"](\n owner,\n operator,\n approved\n );\n },\n Transfer(\n from?: string | null,\n to?: string | null,\n tokenId?: BigNumberish | null\n ) {\n return templateContract.filters[\"Transfer(address,address,uint256)\"](\n from,\n to,\n tokenId\n );\n },\n };\n\n protected CreateBoundContractView(): ERC721BoundContractView {\n const view = getERC721Contract(this.config.network, this.config.address);\n return new ERC721BoundContractView(this.config.address, view);\n }\n\n public static bind(options: BindOptions): ERC721Processor {\n if (!options.name) {\n options.name = \"ERC721\";\n }\n let processor = getProcessor(options) as ERC721Processor;\n if (!processor) {\n processor = new ERC721Processor(options);\n addProcessor(options, processor);\n }\n return processor;\n }\n}\n\nexport class ERC721ProcessorTemplate extends BaseProcessorTemplate<\n ERC721,\n ERC721BoundContractView\n> {\n bindInternal(options: BindOptions) {\n if (!options.name) {\n options.name = \"ERC721\";\n }\n let processor = getProcessor(options) as ERC721Processor;\n if (!processor) {\n processor = new ERC721Processor(options);\n addProcessor(options, processor);\n }\n return processor;\n }\n\n onEventApproval(\n handler: (event: ApprovalEvent, ctx: ERC721Context) => void,\n filter?: ApprovalEventFilter | ApprovalEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Approval(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventApprovalForAll(\n handler: (event: ApprovalForAllEvent, ctx: ERC721Context) => void,\n filter?: ApprovalForAllEventFilter | ApprovalForAllEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"ApprovalForAll(address,address,bool)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventTransfer(\n handler: (event: TransferEvent, ctx: ERC721Context) => void,\n filter?: TransferEventFilter | TransferEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Transfer(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n}\n\nexport function getERC721Contract(\n chainId: EthChainId,\n address: string\n): ERC721ContractView {\n let contract = getContractByABI(\n \"ERC721\",\n address,\n chainId\n ) as ERC721ContractView;\n if (!contract) {\n const rawContract = ERC721__factory.connect(address, getProvider(chainId));\n contract = new ERC721ContractView(rawContract);\n addContractByABI(\"ERC721\", address, chainId, contract);\n }\n return contract;\n}\n\nexport function getERC721ContractOnContext(\n context: EthContext,\n address: string\n): ERC721BoundContractView {\n const view = getERC721Contract(context.getChainId(), address);\n const boundView = new ERC721BoundContractView(address, view);\n boundView.context = context as any;\n return boundView;\n}\n"]}
1
+ {"version":3,"file":"erc721-processor.js","sourceRoot":"","sources":["../../../../src/eth/builtin/internal/erc721-processor.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,mBAAmB,EAEnB,aAAa,EACb,qBAAqB,EACrB,iBAAiB,EAEjB,YAAY,EACZ,aAAa,GAKd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA4H7C,MAAM,gBAAgB,GAAG,eAAe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SAAS,CAAC,UAAU,EAAE;QACxB,SAAS,CAAC,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;KACxC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { BigNumberish, Overrides, BytesLike } from \"ethers\";\nimport {\n addContractByABI,\n getContractByABI,\n addProcessor,\n getProcessor,\n getProvider,\n transformEtherError,\n BindOptions,\n BaseProcessor,\n BaseProcessorTemplate,\n BoundContractView,\n ContractContext,\n ContractView,\n DummyProvider,\n EthChainId,\n TypedCallTrace,\n EthContext,\n EthFetchConfig,\n} from \"@sentio/sdk/eth\";\n\nimport { ERC721__factory } from \"./index.js\";\nimport {\n ERC721,\n ApprovalEvent,\n ApprovalEventFilter,\n ApprovalForAllEvent,\n ApprovalForAllEventFilter,\n TransferEvent,\n TransferEventFilter,\n} from \"./ERC721.js\";\n\nexport interface ApproveCallObject {\n to: string;\n tokenId: bigint;\n}\n\nexport type ApproveCallTrace = TypedCallTrace<\n [string, bigint],\n ApproveCallObject\n>;\n\nexport interface TotalSupplyCallObject {}\n\nexport type TotalSupplyCallTrace = TypedCallTrace<[], TotalSupplyCallObject>;\n\nexport interface BalanceOfCallObject {\n owner: string;\n}\n\nexport type BalanceOfCallTrace = TypedCallTrace<[string], BalanceOfCallObject>;\n\nexport interface GetApprovedCallObject {\n tokenId: bigint;\n}\n\nexport type GetApprovedCallTrace = TypedCallTrace<\n [bigint],\n GetApprovedCallObject\n>;\n\nexport interface IsApprovedForAllCallObject {\n owner: string;\n operator: string;\n}\n\nexport type IsApprovedForAllCallTrace = TypedCallTrace<\n [string, string],\n IsApprovedForAllCallObject\n>;\n\nexport interface NameCallObject {}\n\nexport type NameCallTrace = TypedCallTrace<[], NameCallObject>;\n\nexport interface OwnerOfCallObject {\n tokenId: bigint;\n}\n\nexport type OwnerOfCallTrace = TypedCallTrace<[bigint], OwnerOfCallObject>;\n\nexport interface SafeTransferFrom_address_address_uint256CallObject {\n from: string;\n to: string;\n tokenId: bigint;\n}\n\nexport type SafeTransferFrom_address_address_uint256CallTrace = TypedCallTrace<\n [string, string, bigint],\n SafeTransferFrom_address_address_uint256CallObject\n>;\n\nexport interface SafeTransferFrom_address_address_uint256_bytesCallObject {\n from: string;\n to: string;\n tokenId: bigint;\n data: string;\n}\n\nexport type SafeTransferFrom_address_address_uint256_bytesCallTrace =\n TypedCallTrace<\n [string, string, bigint, string],\n SafeTransferFrom_address_address_uint256_bytesCallObject\n >;\n\nexport interface SetApprovalForAllCallObject {\n operator: string;\n _approved: boolean;\n}\n\nexport type SetApprovalForAllCallTrace = TypedCallTrace<\n [string, boolean],\n SetApprovalForAllCallObject\n>;\n\nexport interface SupportsInterfaceCallObject {\n interfaceId: string;\n}\n\nexport type SupportsInterfaceCallTrace = TypedCallTrace<\n [string],\n SupportsInterfaceCallObject\n>;\n\nexport interface SymbolCallObject {}\n\nexport type SymbolCallTrace = TypedCallTrace<[], SymbolCallObject>;\n\nexport interface TokenURICallObject {\n tokenId: bigint;\n}\n\nexport type TokenURICallTrace = TypedCallTrace<[bigint], TokenURICallObject>;\n\nexport interface TransferFromCallObject {\n from: string;\n to: string;\n tokenId: bigint;\n}\n\nexport type TransferFromCallTrace = TypedCallTrace<\n [string, string, bigint],\n TransferFromCallObject\n>;\n\nconst templateContract = ERC721__factory.connect(\"0x0\", DummyProvider);\n\nexport class ERC721ContractView extends ContractView<ERC721> {\n constructor(contract: ERC721) {\n super(contract);\n this.callStatic.contract = contract;\n }\n\n async totalSupply(overrides?: Overrides): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"totalSupply()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async balanceOf(owner: string, overrides?: Overrides): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"balanceOf(address)\")(\n owner,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async getApproved(\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<string> {\n try {\n return await this.contract.getFunction(\"getApproved(uint256)\")(\n tokenId,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async isApprovedForAll(\n owner: string,\n operator: string,\n overrides?: Overrides\n ): Promise<boolean> {\n try {\n return await this.contract.getFunction(\n \"isApprovedForAll(address,address)\"\n )(owner, operator, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async name(overrides?: Overrides): Promise<string> {\n try {\n return await this.contract.getFunction(\"name()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async ownerOf(tokenId: BigNumberish, overrides?: Overrides): Promise<string> {\n try {\n return await this.contract.getFunction(\"ownerOf(uint256)\")(\n tokenId,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async supportsInterface(\n interfaceId: BytesLike,\n overrides?: Overrides\n ): Promise<boolean> {\n try {\n return await this.contract.getFunction(\"supportsInterface(bytes4)\")(\n interfaceId,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async symbol(overrides?: Overrides): Promise<string> {\n try {\n return await this.contract.getFunction(\"symbol()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async tokenURI(\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<string> {\n try {\n return await this.contract.getFunction(\"tokenURI(uint256)\")(\n tokenId,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n callStatic = {\n contract: this.contract,\n\n async approve(\n to: string,\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<void> {\n try {\n return await this.contract\n .getFunction(\"approve(address,uint256)\")\n .staticCall(to, tokenId, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async safeTransferFrom_address_address_uint256(\n from: string,\n to: string,\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<void> {\n try {\n return await this.contract\n .getFunction(\"safeTransferFrom(address,address,uint256)\")\n .staticCall(from, to, tokenId, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async safeTransferFrom_address_address_uint256_bytes(\n from: string,\n to: string,\n tokenId: BigNumberish,\n data: BytesLike,\n overrides?: Overrides\n ): Promise<void> {\n try {\n return await this.contract\n .getFunction(\"safeTransferFrom(address,address,uint256,bytes)\")\n .staticCall(from, to, tokenId, data, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async setApprovalForAll(\n operator: string,\n _approved: boolean,\n overrides?: Overrides\n ): Promise<void> {\n try {\n return await this.contract\n .getFunction(\"setApprovalForAll(address,bool)\")\n .staticCall(operator, _approved, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async transferFrom(\n from: string,\n to: string,\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<void> {\n try {\n return await this.contract\n .getFunction(\"transferFrom(address,address,uint256)\")\n .staticCall(from, to, tokenId, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n };\n}\n\nexport class ERC721BoundContractView extends BoundContractView<\n ERC721,\n ERC721ContractView\n> {\n async totalSupply(overrides?: Overrides): Promise<bigint> {\n return await this.view.totalSupply({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async balanceOf(owner: string, overrides?: Overrides): Promise<bigint> {\n return await this.view.balanceOf(owner, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async getApproved(\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<string> {\n return await this.view.getApproved(tokenId, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async isApprovedForAll(\n owner: string,\n operator: string,\n overrides?: Overrides\n ): Promise<boolean> {\n return await this.view.isApprovedForAll(owner, operator, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async name(overrides?: Overrides): Promise<string> {\n return await this.view.name({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async ownerOf(tokenId: BigNumberish, overrides?: Overrides): Promise<string> {\n return await this.view.ownerOf(tokenId, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async supportsInterface(\n interfaceId: BytesLike,\n overrides?: Overrides\n ): Promise<boolean> {\n return await this.view.supportsInterface(interfaceId, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async symbol(overrides?: Overrides): Promise<string> {\n return await this.view.symbol({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async tokenURI(\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<string> {\n return await this.view.tokenURI(tokenId, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n callStatic = {\n view: this.view,\n context: this.context,\n\n async approve(\n to: string,\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<void> {\n return await this.view.callStatic.approve(to, tokenId, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n async safeTransferFrom_address_address_uint256(\n from: string,\n to: string,\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<void> {\n return await this.view.callStatic.safeTransferFrom_address_address_uint256(\n from,\n to,\n tokenId,\n {\n blockTag: this.context.blockNumber,\n ...overrides,\n }\n );\n },\n async safeTransferFrom_address_address_uint256_bytes(\n from: string,\n to: string,\n tokenId: BigNumberish,\n data: BytesLike,\n overrides?: Overrides\n ): Promise<void> {\n return await this.view.callStatic.safeTransferFrom_address_address_uint256_bytes(\n from,\n to,\n tokenId,\n data,\n {\n blockTag: this.context.blockNumber,\n ...overrides,\n }\n );\n },\n async setApprovalForAll(\n operator: string,\n _approved: boolean,\n overrides?: Overrides\n ): Promise<void> {\n return await this.view.callStatic.setApprovalForAll(operator, _approved, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n async transferFrom(\n from: string,\n to: string,\n tokenId: BigNumberish,\n overrides?: Overrides\n ): Promise<void> {\n return await this.view.callStatic.transferFrom(from, to, tokenId, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n };\n}\n\nexport type ERC721Context = ContractContext<ERC721, ERC721BoundContractView>;\n\nexport class ERC721Processor extends BaseProcessor<\n ERC721,\n ERC721BoundContractView\n> {\n onEventApproval(\n handler: (event: ApprovalEvent, ctx: ERC721Context) => void,\n filter?: ApprovalEventFilter | ApprovalEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Approval(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventApprovalForAll(\n handler: (event: ApprovalForAllEvent, ctx: ERC721Context) => void,\n filter?: ApprovalForAllEventFilter | ApprovalForAllEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"ApprovalForAll(address,address,bool)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventTransfer(\n handler: (event: TransferEvent, ctx: ERC721Context) => void,\n filter?: TransferEventFilter | TransferEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Transfer(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onCallApprove(\n handler: (call: ApproveCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x095ea7b3\", handler as any, fetchConfig);\n }\n\n onCallTotalSupply(\n handler: (call: TotalSupplyCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x18160ddd\", handler as any, fetchConfig);\n }\n\n onCallBalanceOf(\n handler: (call: BalanceOfCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x70a08231\", handler as any, fetchConfig);\n }\n\n onCallGetApproved(\n handler: (call: GetApprovedCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x081812fc\", handler as any, fetchConfig);\n }\n\n onCallIsApprovedForAll(\n handler: (call: IsApprovedForAllCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xe985e9c5\", handler as any, fetchConfig);\n }\n\n onCallName(\n handler: (call: NameCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x06fdde03\", handler as any, fetchConfig);\n }\n\n onCallOwnerOf(\n handler: (call: OwnerOfCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x6352211e\", handler as any, fetchConfig);\n }\n\n onCallSafeTransferFrom_address_address_uint256(\n handler: (\n call: SafeTransferFrom_address_address_uint256CallTrace,\n ctx: ERC721Context\n ) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x42842e0e\", handler as any, fetchConfig);\n }\n\n onCallSafeTransferFrom_address_address_uint256_bytes(\n handler: (\n call: SafeTransferFrom_address_address_uint256_bytesCallTrace,\n ctx: ERC721Context\n ) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xb88d4fde\", handler as any, fetchConfig);\n }\n\n onCallSetApprovalForAll(\n handler: (call: SetApprovalForAllCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xa22cb465\", handler as any, fetchConfig);\n }\n\n onCallSupportsInterface(\n handler: (call: SupportsInterfaceCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x01ffc9a7\", handler as any, fetchConfig);\n }\n\n onCallSymbol(\n handler: (call: SymbolCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x95d89b41\", handler as any, fetchConfig);\n }\n\n onCallTokenURI(\n handler: (call: TokenURICallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xc87b56dd\", handler as any, fetchConfig);\n }\n\n onCallTransferFrom(\n handler: (call: TransferFromCallTrace, ctx: ERC721Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x23b872dd\", handler as any, fetchConfig);\n }\n\n public static filters = {\n Approval(\n owner?: string | null,\n approved?: string | null,\n tokenId?: BigNumberish | null\n ) {\n return templateContract.filters[\"Approval(address,address,uint256)\"](\n owner,\n approved,\n tokenId\n );\n },\n ApprovalForAll(\n owner?: string | null,\n operator?: string | null,\n approved?: null\n ) {\n return templateContract.filters[\"ApprovalForAll(address,address,bool)\"](\n owner,\n operator,\n approved\n );\n },\n Transfer(\n from?: string | null,\n to?: string | null,\n tokenId?: BigNumberish | null\n ) {\n return templateContract.filters[\"Transfer(address,address,uint256)\"](\n from,\n to,\n tokenId\n );\n },\n };\n\n protected CreateBoundContractView(): ERC721BoundContractView {\n const view = getERC721Contract(this.config.network, this.config.address);\n return new ERC721BoundContractView(this.config.address, view);\n }\n\n public static bind(options: BindOptions): ERC721Processor {\n if (!options.name) {\n options.name = \"ERC721\";\n }\n let processor = getProcessor(options) as ERC721Processor;\n if (!processor) {\n processor = new ERC721Processor(options);\n addProcessor(options, processor);\n }\n return processor;\n }\n}\n\nexport class ERC721ProcessorTemplate extends BaseProcessorTemplate<\n ERC721,\n ERC721BoundContractView\n> {\n bindInternal(options: BindOptions) {\n if (!options.name) {\n options.name = \"ERC721\";\n }\n let processor = getProcessor(options) as ERC721Processor;\n if (!processor) {\n processor = new ERC721Processor(options);\n addProcessor(options, processor);\n }\n return processor;\n }\n\n onEventApproval(\n handler: (event: ApprovalEvent, ctx: ERC721Context) => void,\n filter?: ApprovalEventFilter | ApprovalEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Approval(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventApprovalForAll(\n handler: (event: ApprovalForAllEvent, ctx: ERC721Context) => void,\n filter?: ApprovalForAllEventFilter | ApprovalForAllEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"ApprovalForAll(address,address,bool)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventTransfer(\n handler: (event: TransferEvent, ctx: ERC721Context) => void,\n filter?: TransferEventFilter | TransferEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Transfer(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n}\n\nexport function getERC721Contract(\n chainId: EthChainId,\n address: string\n): ERC721ContractView {\n let contract = getContractByABI(\n \"ERC721\",\n address,\n chainId\n ) as ERC721ContractView;\n if (!contract) {\n const rawContract = ERC721__factory.connect(address, getProvider(chainId));\n contract = new ERC721ContractView(rawContract);\n addContractByABI(\"ERC721\", address, chainId, contract);\n }\n return contract;\n}\n\nexport function getERC721ContractOnContext(\n context: EthContext,\n address: string\n): ERC721BoundContractView {\n const view = getERC721Contract(context.getChainId(), address);\n const boundView = new ERC721BoundContractView(address, view);\n boundView.context = context;\n if (boundView.callStatic) {\n boundView.callStatic.context = context;\n }\n return boundView;\n}\n"]}
@@ -319,6 +319,9 @@ export function getWETH9ContractOnContext(context, address) {
319
319
  const view = getWETH9Contract(context.getChainId(), address);
320
320
  const boundView = new WETH9BoundContractView(address, view);
321
321
  boundView.context = context;
322
+ if (boundView.callStatic) {
323
+ boundView.callStatic.context = context;
324
+ }
322
325
  return boundView;
323
326
  }
324
327
  //# sourceMappingURL=weth9-processor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"weth9-processor.js","sourceRoot":"","sources":["../../../../src/eth/builtin/internal/weth9-processor.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,mBAAmB,EAEnB,aAAa,EACb,qBAAqB,EACrB,iBAAiB,EAEjB,YAAY,EACZ,aAAa,GAKd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAiF5C,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;AAEtE,MAAM,OAAO,iBAAkB,SAAQ,YAAmB;IACxD,YAAY,QAAe;QACzB,KAAK,CAAC,QAAQ,CAAC,CAAC;QAChB,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,SAAqB;QAC9B,IAAI;YACF,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;SACnE;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,mBAAmB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;SACzC;IACH,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,SAAqB;QACrC,IAAI;YACF,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;SAC1E;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,mBAAmB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;SACzC;IACH,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,SAAqB;QAClC,IAAI;YAC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AAO,EAAE,IAAI,CAAC,CAAC;IAC5D,SAAS,CAAC,OAAO,GAAG,OAAc,CAAC;IACnC,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { BigNumberish, Overrides } from \"ethers\";\nimport {\n addContractByABI,\n getContractByABI,\n addProcessor,\n getProcessor,\n getProvider,\n transformEtherError,\n BindOptions,\n BaseProcessor,\n BaseProcessorTemplate,\n BoundContractView,\n ContractContext,\n ContractView,\n DummyProvider,\n EthChainId,\n TypedCallTrace,\n EthContext,\n EthFetchConfig,\n} from \"@sentio/sdk/eth\";\n\nimport { WETH9__factory } from \"./index.js\";\nimport {\n WETH9,\n ApprovalEvent,\n ApprovalEventFilter,\n TransferEvent,\n TransferEventFilter,\n DepositEvent,\n DepositEventFilter,\n WithdrawalEvent,\n WithdrawalEventFilter,\n} from \"./WETH9.js\";\n\nexport interface NameCallObject {}\n\nexport type NameCallTrace = TypedCallTrace<[], NameCallObject>;\n\nexport interface ApproveCallObject {\n guy: string;\n wad: bigint;\n}\n\nexport type ApproveCallTrace = TypedCallTrace<\n [string, bigint],\n ApproveCallObject\n>;\n\nexport interface TotalSupplyCallObject {}\n\nexport type TotalSupplyCallTrace = TypedCallTrace<[], TotalSupplyCallObject>;\n\nexport interface TransferFromCallObject {\n src: string;\n dst: string;\n wad: bigint;\n}\n\nexport type TransferFromCallTrace = TypedCallTrace<\n [string, string, bigint],\n TransferFromCallObject\n>;\n\nexport interface WithdrawCallObject {\n wad: bigint;\n}\n\nexport type WithdrawCallTrace = TypedCallTrace<[bigint], WithdrawCallObject>;\n\nexport interface DecimalsCallObject {}\n\nexport type DecimalsCallTrace = TypedCallTrace<[], DecimalsCallObject>;\n\nexport interface BalanceOfCallObject {}\n\nexport type BalanceOfCallTrace = TypedCallTrace<[string], BalanceOfCallObject>;\n\nexport interface SymbolCallObject {}\n\nexport type SymbolCallTrace = TypedCallTrace<[], SymbolCallObject>;\n\nexport interface TransferCallObject {\n dst: string;\n wad: bigint;\n}\n\nexport type TransferCallTrace = TypedCallTrace<\n [string, bigint],\n TransferCallObject\n>;\n\nexport interface DepositCallObject {}\n\nexport type DepositCallTrace = TypedCallTrace<[], DepositCallObject>;\n\nexport interface AllowanceCallObject {}\n\nexport type AllowanceCallTrace = TypedCallTrace<\n [string, string],\n AllowanceCallObject\n>;\n\nconst templateContract = WETH9__factory.connect(\"0x0\", DummyProvider);\n\nexport class WETH9ContractView extends ContractView<WETH9> {\n constructor(contract: WETH9) {\n super(contract);\n this.callStatic.contract = contract;\n }\n\n async name(overrides?: Overrides): Promise<string> {\n try {\n return await this.contract.getFunction(\"name()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async totalSupply(overrides?: Overrides): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"totalSupply()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async decimals(overrides?: Overrides): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"decimals()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async balanceOf(arg0: string, overrides?: Overrides): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"balanceOf(address)\")(\n arg0,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async symbol(overrides?: Overrides): Promise<string> {\n try {\n return await this.contract.getFunction(\"symbol()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async allowance(\n arg0: string,\n arg1: string,\n overrides?: Overrides\n ): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"allowance(address,address)\")(\n arg0,\n arg1,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n callStatic = {\n contract: this.contract,\n\n async approve(\n guy: string,\n wad: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n try {\n return await this.contract\n .getFunction(\"approve(address,uint256)\")\n .staticCall(guy, wad, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async transferFrom(\n src: string,\n dst: string,\n wad: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n try {\n return await this.contract\n .getFunction(\"transferFrom(address,address,uint256)\")\n .staticCall(src, dst, wad, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async withdraw(wad: BigNumberish, overrides?: Overrides): Promise<void> {\n try {\n return await this.contract\n .getFunction(\"withdraw(uint256)\")\n .staticCall(wad, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async transfer(\n dst: string,\n wad: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n try {\n return await this.contract\n .getFunction(\"transfer(address,uint256)\")\n .staticCall(dst, wad, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async deposit(overrides?: Overrides): Promise<void> {\n try {\n return await this.contract\n .getFunction(\"deposit()\")\n .staticCall(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n };\n}\n\nexport class WETH9BoundContractView extends BoundContractView<\n WETH9,\n WETH9ContractView\n> {\n async name(overrides?: Overrides): Promise<string> {\n return await this.view.name({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async totalSupply(overrides?: Overrides): Promise<bigint> {\n return await this.view.totalSupply({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async decimals(overrides?: Overrides): Promise<bigint> {\n return await this.view.decimals({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async balanceOf(arg0: string, overrides?: Overrides): Promise<bigint> {\n return await this.view.balanceOf(arg0, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async symbol(overrides?: Overrides): Promise<string> {\n return await this.view.symbol({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async allowance(\n arg0: string,\n arg1: string,\n overrides?: Overrides\n ): Promise<bigint> {\n return await this.view.allowance(arg0, arg1, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n callStatic = {\n view: this.view,\n context: this.context,\n\n async approve(\n guy: string,\n wad: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n return await this.view.callStatic.approve(guy, wad, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n async transferFrom(\n src: string,\n dst: string,\n wad: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n return await this.view.callStatic.transferFrom(src, dst, wad, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n async withdraw(wad: BigNumberish, overrides?: Overrides): Promise<void> {\n return await this.view.callStatic.withdraw(wad, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n async transfer(\n dst: string,\n wad: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n return await this.view.callStatic.transfer(dst, wad, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n async deposit(overrides?: Overrides): Promise<void> {\n return await this.view.callStatic.deposit({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n };\n}\n\nexport type WETH9Context = ContractContext<WETH9, WETH9BoundContractView>;\n\nexport class WETH9Processor extends BaseProcessor<\n WETH9,\n WETH9BoundContractView\n> {\n onEventApproval(\n handler: (event: ApprovalEvent, ctx: WETH9Context) => void,\n filter?: ApprovalEventFilter | ApprovalEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Approval(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventTransfer(\n handler: (event: TransferEvent, ctx: WETH9Context) => void,\n filter?: TransferEventFilter | TransferEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Transfer(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventDeposit(\n handler: (event: DepositEvent, ctx: WETH9Context) => void,\n filter?: DepositEventFilter | DepositEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Deposit(address,uint256)\"](null, null);\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventWithdrawal(\n handler: (event: WithdrawalEvent, ctx: WETH9Context) => void,\n filter?: WithdrawalEventFilter | WithdrawalEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Withdrawal(address,uint256)\"](\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onCallName(\n handler: (call: NameCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x06fdde03\", handler as any, fetchConfig);\n }\n\n onCallApprove(\n handler: (call: ApproveCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x095ea7b3\", handler as any, fetchConfig);\n }\n\n onCallTotalSupply(\n handler: (call: TotalSupplyCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x18160ddd\", handler as any, fetchConfig);\n }\n\n onCallTransferFrom(\n handler: (call: TransferFromCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x23b872dd\", handler as any, fetchConfig);\n }\n\n onCallWithdraw(\n handler: (call: WithdrawCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x2e1a7d4d\", handler as any, fetchConfig);\n }\n\n onCallDecimals(\n handler: (call: DecimalsCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x313ce567\", handler as any, fetchConfig);\n }\n\n onCallBalanceOf(\n handler: (call: BalanceOfCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x70a08231\", handler as any, fetchConfig);\n }\n\n onCallSymbol(\n handler: (call: SymbolCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x95d89b41\", handler as any, fetchConfig);\n }\n\n onCallTransfer(\n handler: (call: TransferCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xa9059cbb\", handler as any, fetchConfig);\n }\n\n onCallDeposit(\n handler: (call: DepositCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xd0e30db0\", handler as any, fetchConfig);\n }\n\n onCallAllowance(\n handler: (call: AllowanceCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xdd62ed3e\", handler as any, fetchConfig);\n }\n\n public static filters = {\n Approval(src?: string | null, guy?: string | null, wad?: null) {\n return templateContract.filters[\"Approval(address,address,uint256)\"](\n src,\n guy,\n wad\n );\n },\n Transfer(src?: string | null, dst?: string | null, wad?: null) {\n return templateContract.filters[\"Transfer(address,address,uint256)\"](\n src,\n dst,\n wad\n );\n },\n Deposit(dst?: string | null, wad?: null) {\n return templateContract.filters[\"Deposit(address,uint256)\"](dst, wad);\n },\n Withdrawal(src?: string | null, wad?: null) {\n return templateContract.filters[\"Withdrawal(address,uint256)\"](src, wad);\n },\n };\n\n protected CreateBoundContractView(): WETH9BoundContractView {\n const view = getWETH9Contract(this.config.network, this.config.address);\n return new WETH9BoundContractView(this.config.address, view);\n }\n\n public static bind(options: BindOptions): WETH9Processor {\n if (!options.name) {\n options.name = \"WETH9\";\n }\n let processor = getProcessor(options) as WETH9Processor;\n if (!processor) {\n processor = new WETH9Processor(options);\n addProcessor(options, processor);\n }\n return processor;\n }\n}\n\nexport class WETH9ProcessorTemplate extends BaseProcessorTemplate<\n WETH9,\n WETH9BoundContractView\n> {\n bindInternal(options: BindOptions) {\n if (!options.name) {\n options.name = \"WETH9\";\n }\n let processor = getProcessor(options) as WETH9Processor;\n if (!processor) {\n processor = new WETH9Processor(options);\n addProcessor(options, processor);\n }\n return processor;\n }\n\n onEventApproval(\n handler: (event: ApprovalEvent, ctx: WETH9Context) => void,\n filter?: ApprovalEventFilter | ApprovalEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Approval(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventTransfer(\n handler: (event: TransferEvent, ctx: WETH9Context) => void,\n filter?: TransferEventFilter | TransferEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Transfer(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventDeposit(\n handler: (event: DepositEvent, ctx: WETH9Context) => void,\n filter?: DepositEventFilter | DepositEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Deposit(address,uint256)\"](null, null);\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventWithdrawal(\n handler: (event: WithdrawalEvent, ctx: WETH9Context) => void,\n filter?: WithdrawalEventFilter | WithdrawalEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Withdrawal(address,uint256)\"](\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n}\n\nexport function getWETH9Contract(\n chainId: EthChainId,\n address: string\n): WETH9ContractView {\n let contract = getContractByABI(\n \"WETH9\",\n address,\n chainId\n ) as WETH9ContractView;\n if (!contract) {\n const rawContract = WETH9__factory.connect(address, getProvider(chainId));\n contract = new WETH9ContractView(rawContract);\n addContractByABI(\"WETH9\", address, chainId, contract);\n }\n return contract;\n}\n\nexport function getWETH9ContractOnContext(\n context: EthContext,\n address: string\n): WETH9BoundContractView {\n const view = getWETH9Contract(context.getChainId(), address);\n const boundView = new WETH9BoundContractView(address, view);\n boundView.context = context as any;\n return boundView;\n}\n"]}
1
+ {"version":3,"file":"weth9-processor.js","sourceRoot":"","sources":["../../../../src/eth/builtin/internal/weth9-processor.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,mBAAmB,EAEnB,aAAa,EACb,qBAAqB,EACrB,iBAAiB,EAEjB,YAAY,EACZ,aAAa,GAKd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAiF5C,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;AAEtE,MAAM,OAAO,iBAAkB,SAAQ,YAAmB;IACxD,YAAY,QAAe;QACzB,KAAK,CAAC,QAAQ,CAAC,CAAC;QAChB,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,SAAqB;QAC9B,IAAI;YACF,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;SACnE;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,mBAAmB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;SACzC;IACH,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,SAAqB;QACrC,IAAI;YACF,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,SAAS,IAAI,EAAE,CA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AAyB,CACvC,OAAmB,EACnB,OAAe;IAEf,MAAM,IAAI,GAAG,gBAAgB,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,MAAM,SAAS,GAAG,IAAI,sBAAsB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5D,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;IAC5B,IAAI,SAAS,CAAC,UAAU,EAAE;QACxB,SAAS,CAAC,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;KACxC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { BigNumberish, Overrides } from \"ethers\";\nimport {\n addContractByABI,\n getContractByABI,\n addProcessor,\n getProcessor,\n getProvider,\n transformEtherError,\n BindOptions,\n BaseProcessor,\n BaseProcessorTemplate,\n BoundContractView,\n ContractContext,\n ContractView,\n DummyProvider,\n EthChainId,\n TypedCallTrace,\n EthContext,\n EthFetchConfig,\n} from \"@sentio/sdk/eth\";\n\nimport { WETH9__factory } from \"./index.js\";\nimport {\n WETH9,\n ApprovalEvent,\n ApprovalEventFilter,\n TransferEvent,\n TransferEventFilter,\n DepositEvent,\n DepositEventFilter,\n WithdrawalEvent,\n WithdrawalEventFilter,\n} from \"./WETH9.js\";\n\nexport interface NameCallObject {}\n\nexport type NameCallTrace = TypedCallTrace<[], NameCallObject>;\n\nexport interface ApproveCallObject {\n guy: string;\n wad: bigint;\n}\n\nexport type ApproveCallTrace = TypedCallTrace<\n [string, bigint],\n ApproveCallObject\n>;\n\nexport interface TotalSupplyCallObject {}\n\nexport type TotalSupplyCallTrace = TypedCallTrace<[], TotalSupplyCallObject>;\n\nexport interface TransferFromCallObject {\n src: string;\n dst: string;\n wad: bigint;\n}\n\nexport type TransferFromCallTrace = TypedCallTrace<\n [string, string, bigint],\n TransferFromCallObject\n>;\n\nexport interface WithdrawCallObject {\n wad: bigint;\n}\n\nexport type WithdrawCallTrace = TypedCallTrace<[bigint], WithdrawCallObject>;\n\nexport interface DecimalsCallObject {}\n\nexport type DecimalsCallTrace = TypedCallTrace<[], DecimalsCallObject>;\n\nexport interface BalanceOfCallObject {}\n\nexport type BalanceOfCallTrace = TypedCallTrace<[string], BalanceOfCallObject>;\n\nexport interface SymbolCallObject {}\n\nexport type SymbolCallTrace = TypedCallTrace<[], SymbolCallObject>;\n\nexport interface TransferCallObject {\n dst: string;\n wad: bigint;\n}\n\nexport type TransferCallTrace = TypedCallTrace<\n [string, bigint],\n TransferCallObject\n>;\n\nexport interface DepositCallObject {}\n\nexport type DepositCallTrace = TypedCallTrace<[], DepositCallObject>;\n\nexport interface AllowanceCallObject {}\n\nexport type AllowanceCallTrace = TypedCallTrace<\n [string, string],\n AllowanceCallObject\n>;\n\nconst templateContract = WETH9__factory.connect(\"0x0\", DummyProvider);\n\nexport class WETH9ContractView extends ContractView<WETH9> {\n constructor(contract: WETH9) {\n super(contract);\n this.callStatic.contract = contract;\n }\n\n async name(overrides?: Overrides): Promise<string> {\n try {\n return await this.contract.getFunction(\"name()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async totalSupply(overrides?: Overrides): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"totalSupply()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async decimals(overrides?: Overrides): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"decimals()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async balanceOf(arg0: string, overrides?: Overrides): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"balanceOf(address)\")(\n arg0,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async symbol(overrides?: Overrides): Promise<string> {\n try {\n return await this.contract.getFunction(\"symbol()\")(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n async allowance(\n arg0: string,\n arg1: string,\n overrides?: Overrides\n ): Promise<bigint> {\n try {\n return await this.contract.getFunction(\"allowance(address,address)\")(\n arg0,\n arg1,\n overrides || {}\n );\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n }\n\n callStatic = {\n contract: this.contract,\n\n async approve(\n guy: string,\n wad: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n try {\n return await this.contract\n .getFunction(\"approve(address,uint256)\")\n .staticCall(guy, wad, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async transferFrom(\n src: string,\n dst: string,\n wad: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n try {\n return await this.contract\n .getFunction(\"transferFrom(address,address,uint256)\")\n .staticCall(src, dst, wad, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async withdraw(wad: BigNumberish, overrides?: Overrides): Promise<void> {\n try {\n return await this.contract\n .getFunction(\"withdraw(uint256)\")\n .staticCall(wad, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async transfer(\n dst: string,\n wad: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n try {\n return await this.contract\n .getFunction(\"transfer(address,uint256)\")\n .staticCall(dst, wad, overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n async deposit(overrides?: Overrides): Promise<void> {\n try {\n return await this.contract\n .getFunction(\"deposit()\")\n .staticCall(overrides || {});\n } catch (e) {\n throw transformEtherError(e, undefined);\n }\n },\n };\n}\n\nexport class WETH9BoundContractView extends BoundContractView<\n WETH9,\n WETH9ContractView\n> {\n async name(overrides?: Overrides): Promise<string> {\n return await this.view.name({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async totalSupply(overrides?: Overrides): Promise<bigint> {\n return await this.view.totalSupply({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async decimals(overrides?: Overrides): Promise<bigint> {\n return await this.view.decimals({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async balanceOf(arg0: string, overrides?: Overrides): Promise<bigint> {\n return await this.view.balanceOf(arg0, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async symbol(overrides?: Overrides): Promise<string> {\n return await this.view.symbol({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n async allowance(\n arg0: string,\n arg1: string,\n overrides?: Overrides\n ): Promise<bigint> {\n return await this.view.allowance(arg0, arg1, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n }\n\n callStatic = {\n view: this.view,\n context: this.context,\n\n async approve(\n guy: string,\n wad: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n return await this.view.callStatic.approve(guy, wad, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n async transferFrom(\n src: string,\n dst: string,\n wad: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n return await this.view.callStatic.transferFrom(src, dst, wad, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n async withdraw(wad: BigNumberish, overrides?: Overrides): Promise<void> {\n return await this.view.callStatic.withdraw(wad, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n async transfer(\n dst: string,\n wad: BigNumberish,\n overrides?: Overrides\n ): Promise<boolean> {\n return await this.view.callStatic.transfer(dst, wad, {\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n async deposit(overrides?: Overrides): Promise<void> {\n return await this.view.callStatic.deposit({\n blockTag: this.context.blockNumber,\n ...overrides,\n });\n },\n };\n}\n\nexport type WETH9Context = ContractContext<WETH9, WETH9BoundContractView>;\n\nexport class WETH9Processor extends BaseProcessor<\n WETH9,\n WETH9BoundContractView\n> {\n onEventApproval(\n handler: (event: ApprovalEvent, ctx: WETH9Context) => void,\n filter?: ApprovalEventFilter | ApprovalEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Approval(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventTransfer(\n handler: (event: TransferEvent, ctx: WETH9Context) => void,\n filter?: TransferEventFilter | TransferEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Transfer(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventDeposit(\n handler: (event: DepositEvent, ctx: WETH9Context) => void,\n filter?: DepositEventFilter | DepositEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Deposit(address,uint256)\"](null, null);\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventWithdrawal(\n handler: (event: WithdrawalEvent, ctx: WETH9Context) => void,\n filter?: WithdrawalEventFilter | WithdrawalEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Withdrawal(address,uint256)\"](\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onCallName(\n handler: (call: NameCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x06fdde03\", handler as any, fetchConfig);\n }\n\n onCallApprove(\n handler: (call: ApproveCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x095ea7b3\", handler as any, fetchConfig);\n }\n\n onCallTotalSupply(\n handler: (call: TotalSupplyCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x18160ddd\", handler as any, fetchConfig);\n }\n\n onCallTransferFrom(\n handler: (call: TransferFromCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x23b872dd\", handler as any, fetchConfig);\n }\n\n onCallWithdraw(\n handler: (call: WithdrawCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x2e1a7d4d\", handler as any, fetchConfig);\n }\n\n onCallDecimals(\n handler: (call: DecimalsCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x313ce567\", handler as any, fetchConfig);\n }\n\n onCallBalanceOf(\n handler: (call: BalanceOfCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x70a08231\", handler as any, fetchConfig);\n }\n\n onCallSymbol(\n handler: (call: SymbolCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0x95d89b41\", handler as any, fetchConfig);\n }\n\n onCallTransfer(\n handler: (call: TransferCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xa9059cbb\", handler as any, fetchConfig);\n }\n\n onCallDeposit(\n handler: (call: DepositCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xd0e30db0\", handler as any, fetchConfig);\n }\n\n onCallAllowance(\n handler: (call: AllowanceCallTrace, ctx: WETH9Context) => void,\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n return super.onEthTrace(\"0xdd62ed3e\", handler as any, fetchConfig);\n }\n\n public static filters = {\n Approval(src?: string | null, guy?: string | null, wad?: null) {\n return templateContract.filters[\"Approval(address,address,uint256)\"](\n src,\n guy,\n wad\n );\n },\n Transfer(src?: string | null, dst?: string | null, wad?: null) {\n return templateContract.filters[\"Transfer(address,address,uint256)\"](\n src,\n dst,\n wad\n );\n },\n Deposit(dst?: string | null, wad?: null) {\n return templateContract.filters[\"Deposit(address,uint256)\"](dst, wad);\n },\n Withdrawal(src?: string | null, wad?: null) {\n return templateContract.filters[\"Withdrawal(address,uint256)\"](src, wad);\n },\n };\n\n protected CreateBoundContractView(): WETH9BoundContractView {\n const view = getWETH9Contract(this.config.network, this.config.address);\n return new WETH9BoundContractView(this.config.address, view);\n }\n\n public static bind(options: BindOptions): WETH9Processor {\n if (!options.name) {\n options.name = \"WETH9\";\n }\n let processor = getProcessor(options) as WETH9Processor;\n if (!processor) {\n processor = new WETH9Processor(options);\n addProcessor(options, processor);\n }\n return processor;\n }\n}\n\nexport class WETH9ProcessorTemplate extends BaseProcessorTemplate<\n WETH9,\n WETH9BoundContractView\n> {\n bindInternal(options: BindOptions) {\n if (!options.name) {\n options.name = \"WETH9\";\n }\n let processor = getProcessor(options) as WETH9Processor;\n if (!processor) {\n processor = new WETH9Processor(options);\n addProcessor(options, processor);\n }\n return processor;\n }\n\n onEventApproval(\n handler: (event: ApprovalEvent, ctx: WETH9Context) => void,\n filter?: ApprovalEventFilter | ApprovalEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Approval(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventTransfer(\n handler: (event: TransferEvent, ctx: WETH9Context) => void,\n filter?: TransferEventFilter | TransferEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Transfer(address,address,uint256)\"](\n null,\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventDeposit(\n handler: (event: DepositEvent, ctx: WETH9Context) => void,\n filter?: DepositEventFilter | DepositEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Deposit(address,uint256)\"](null, null);\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n\n onEventWithdrawal(\n handler: (event: WithdrawalEvent, ctx: WETH9Context) => void,\n filter?: WithdrawalEventFilter | WithdrawalEventFilter[],\n fetchConfig?: Partial<EthFetchConfig>\n ): this {\n if (!filter) {\n filter = templateContract.filters[\"Withdrawal(address,uint256)\"](\n null,\n null\n );\n }\n return super.onEthEvent(handler, filter!, fetchConfig);\n }\n}\n\nexport function getWETH9Contract(\n chainId: EthChainId,\n address: string\n): WETH9ContractView {\n let contract = getContractByABI(\n \"WETH9\",\n address,\n chainId\n ) as WETH9ContractView;\n if (!contract) {\n const rawContract = WETH9__factory.connect(address, getProvider(chainId));\n contract = new WETH9ContractView(rawContract);\n addContractByABI(\"WETH9\", address, chainId, contract);\n }\n return contract;\n}\n\nexport function getWETH9ContractOnContext(\n context: EthContext,\n address: string\n): WETH9BoundContractView {\n const view = getWETH9Contract(context.getChainId(), address);\n const boundView = new WETH9BoundContractView(address, view);\n boundView.context = context;\n if (boundView.callStatic) {\n boundView.callStatic.context = context;\n }\n return boundView;\n}\n"]}
@@ -127,7 +127,10 @@ export class ${contract.name}ProcessorTemplate extends BaseProcessorTemplate<${c
127
127
  ${contract.name}BoundContractView {
128
128
  const view = get${contract.name}Contract(context.getChainId(), address)
129
129
  const boundView = new ${contract.name}BoundContractView(address, view)
130
- boundView.context = context as any;
130
+ boundView.context = context;
131
+ if (boundView.callStatic) {
132
+ boundView.callStatic.context = context;
133
+ }
131
134
  return boundView;
132
135
  }
133
136
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"file.js","sourceRoot":"","sources":["../../../src/eth/codegen/file.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,+BAA+B,EAE/B,gCAAgC,EAChC,wBAAwB,GACzB,MAAM,WAAW,CAAA;AAElB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAA;AACtF,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AACpF,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAChF,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EA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,IAAI,CAAC,IAAI,CAAC;;;;;;;;;;GAU5B,CAAA;AACH,CAAC","sourcesContent":["import {\n Contract,\n createImportsForUsedIdentifiers,\n EventDeclaration,\n getFullSignatureAsSymbolForEvent,\n getFullSignatureForEvent,\n} from 'typechain'\n\nimport { reservedKeywords } from '@sentio/ethers-v6/dist/codegen/reserved-keywords.js'\nimport { codegenCallTraceTypes, generateCallHandlers } from './functions-handler.js'\nimport { generateEventFilters, generateEventHandlers } from './event-handler.js'\nimport { generateBoundViewFunctions, generateViewFunctions } from './function-calls.js'\n\nexport function codeGenIndex(contract: Contract): string {\n return ` \n export * from './internal/${contract.name.toLowerCase()}-processor.js'\n export * from './internal/${contract.name.toLowerCase()}-test-utils.js'\n export * from './internal/${contract.name}.js'\n export * from './internal/factories/${contract.name}__factory.js'\n `\n}\n\nexport function codeGenSentioFile(contract: Contract): string {\n const source = `\n ${Object.values(contract.functions).map(codegenCallTraceTypes).join('\\n')}\n\n const templateContract = ${contract.name}__factory.connect(\"0x0\", DummyProvider)\n\n export class ${contract.name}ContractView extends ContractView<${contract.name}> {\n constructor (contract: ${contract.name}) {\n super(contract);\n this.callStatic.contract = contract;\n }\n\n ${Object.values(contract.functions)\n .filter((f) => !reservedKeywords.has(f[0].name))\n .flatMap((fs) => generateViewFunctions(true, fs))\n .join('\\n')}\n \n callStatic = {\n contract: this.contract,\n ${Object.values(contract.functions)\n .filter((f) => !reservedKeywords.has(f[0].name))\n .flatMap((fs) => generateViewFunctions(false, fs))\n .join(',\\n')}\n }\n }\n \n export class ${contract.name}BoundContractView extends BoundContractView<${contract.name}, \n ${contract.name}ContractView> {\n ${Object.values(contract.functions)\n .filter((f) => !reservedKeywords.has(f[0].name))\n .flatMap((fs) => generateBoundViewFunctions(true, fs))\n .join('\\n')}\n \n callStatic = {\n view: this.view,\n context: this.context,\n ${Object.values(contract.functions)\n .filter((f) => !reservedKeywords.has(f[0].name))\n .flatMap((fs) => generateBoundViewFunctions(false, fs))\n .join(',\\n')}\n }\n }\n\n export type ${contract.name}Context = ContractContext<${contract.name}, ${contract.name}BoundContractView>\n\n export class ${contract.name}Processor extends BaseProcessor<${contract.name}, ${contract.name}BoundContractView> {\n ${Object.values(contract.events)\n .map((events) => generateEventHandlers(events, contract.name))\n .join('\\n')}\n\n ${Object.values(contract.functions)\n .map((f) => generateCallHandlers(f, contract.name))\n .join('\\n')}\n\n public static filters = {\n ${Object.values(contract.events)\n .map((events) => generateEventFilters(events))\n .join(',')}\n }\n \n protected CreateBoundContractView(): ${contract.name}BoundContractView {\n const view = get${contract.name}Contract(this.config.network, this.config.address)\n return new ${contract.name}BoundContractView(this.config.address, view)\n }\n\n public static bind(options: BindOptions): ${contract.name}Processor {\n if (!options.name) {\n options.name = \"${contract.name}\"\n }\n let processor = getProcessor(options) as ${contract.name}Processor\n if (!processor) {\n processor = new ${contract.name}Processor(options)\n addProcessor(options, processor)\n }\n return processor\n }\n}\n\nexport class ${contract.name}ProcessorTemplate extends BaseProcessorTemplate<${contract.name}, ${\n contract.name\n }BoundContractView> {\n bindInternal(options: BindOptions) {\n if (!options.name) {\n options.name = \"${contract.name}\"\n }\n let processor = getProcessor(options) as ${contract.name}Processor\n if (!processor) {\n processor = new ${contract.name}Processor(options)\n addProcessor(options, processor)\n }\n return processor\n }\n\n ${Object.values(contract.events)\n .map((events) => generateEventHandlers(events, contract.name))\n .join('\\n')}\n \n ${Object.values(contract.functions)\n .map((functions) => {\n generateCallHandlers(functions, contract.name)\n })\n .join('\\n')}\n }\n\n export function get${contract.name}Contract(chainId: EthChainId, address: string): ${contract.name}ContractView {\n let contract = getContractByABI(\"${contract.name}\", address, chainId) as ${contract.name}ContractView\n if (!contract) {\n const rawContract = ${contract.name}__factory.connect(address, getProvider(chainId))\n contract = new ${contract.name}ContractView(rawContract)\n addContractByABI(\"${contract.name}\", address, chainId, contract)\n }\n return contract\n }\n \n export function get${contract.name}ContractOnContext(context: EthContext, address: string): \n ${contract.name}BoundContractView {\n const view = get${contract.name}Contract(context.getChainId(), address)\n const boundView = new ${contract.name}BoundContractView(address, view) \n boundView.context = context as any;\n return boundView;\n }\n `\n const eventsImports = Object.values(contract.events).flatMap((events) => {\n if (events.length === 1) {\n return [`${events[0].name}Event`, `${events[0].name}EventFilter`]\n } else {\n return events.flatMap((e) => [\n `${getFullSignatureAsSymbolForEvent(e)}_Event`,\n `${getFullSignatureAsSymbolForEvent(e)}_EventFilter`,\n ])\n }\n })\n\n const structImports = Object.values(contract.structs).flatMap((structs) => {\n return structs.flatMap((s) => {\n if (!s.structName) {\n return []\n }\n if (s.structName.namespace) {\n return [s.structName.namespace]\n } else {\n return [s.structName.identifier + 'StructOutput', s.structName.identifier + 'Struct']\n }\n })\n })\n // dedup namespace\n const uniqueStructImports = [...new Set(structImports)]\n\n const imports = createImportsForUsedIdentifiers(\n {\n ethers: ['BigNumberish', 'Overrides', 'BytesLike'],\n // 'ethers/providers': ['Networkish'],\n '@sentio/sdk/eth': [\n 'addContractByABI',\n 'getContractByABI',\n 'addProcessor',\n 'getProcessor',\n 'getProvider',\n 'transformEtherError',\n 'Trace',\n 'BindOptions',\n 'BaseProcessor',\n 'BaseProcessorTemplate',\n 'BoundContractView',\n 'ContractContext',\n 'ContractView',\n 'DummyProvider',\n 'EthChainId',\n 'TypedCallTrace',\n 'EthContext',\n 'EthFetchConfig',\n ],\n // '@sentio/sdk/eth': ['BaseContext'],\n // '@sentio/protos': ['EthFetchConfig'],\n './common.js': ['PromiseOrValue'],\n './index.js': [`${contract.name}__factory`],\n [`./${contract.name}.js`]: [`${contract.name}`, ...eventsImports, ...uniqueStructImports],\n },\n source\n )\n\n return imports + source\n}\n\nexport function codeGenTestUtilsFile(contract: Contract): string {\n const source = `\n const mockField = {\n blockHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n blockNumber: 0,\n logIndex: 0,\n removed: false,\n transactionHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n transactionIndex: 0,\n }\n ${Object.values(contract.events)\n .map((events) => {\n if (events.length === 1) {\n return generateMockEventLogFunction(events[0], contract.name, false)\n } else {\n return events.map((e) => generateMockEventLogFunction(e, contract.name, true)).join('\\n')\n }\n })\n .join('\\n')}\n `\n\n const possibleImports = {\n 'ethers/providers': ['LogParams'],\n '@sentio/sdk/eth': ['EthChainId'],\n } as any\n possibleImports[`./${contract.name}.js`] = Object.values(contract.events).flatMap((events) => {\n if (events.length === 1) {\n return `${events[0].name}EventObject`\n } else {\n return events.flatMap((e) => `${getFullSignatureAsSymbolForEvent(e)}_EventObject`)\n }\n })\n\n possibleImports[`./${contract.name.toLowerCase()}-processor.js`] = [`get${contract.name}Contract`]\n\n const imports = createImportsForUsedIdentifiers(possibleImports, source)\n\n return imports + source\n}\n\nfunction generateMockEventLogFunction(event: EventDeclaration, contractName: string, includeArgTypes: boolean): string {\n let eventName = event.name\n if (includeArgTypes) {\n eventName = getFullSignatureAsSymbolForEvent(event) + '_'\n }\n\n const eventArgs = event.inputs.map((input, i) => `event.${input.name ?? `arg${i.toString()}`}`)\n\n return `\n export function mock${eventName}Log(contractAddress: string, event: ${eventName}EventObject): LogParams {\n const contract = get${contractName}Contract(EthChainId.ETHEREUM, contractAddress)\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n '${getFullSignatureForEvent(event)}',\n [${eventArgs.join(', ')}]\n )\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n }\n }\n `\n}\n"]}
1
+ {"version":3,"file":"file.js","sourceRoot":"","sources":["../../../src/eth/codegen/file.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,+BAA+B,EAE/B,gCAAgC,EAChC,wBAAwB,GACzB,MAAM,WAAW,CAAA;AAElB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAA;AACtF,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AACpF,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,oBAA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AAY;;WAE7B,wBAAwB,CAAC,KAAK,CAAC;WAC/B,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;;;;GAU5B,CAAA;AACH,CAAC","sourcesContent":["import {\n Contract,\n createImportsForUsedIdentifiers,\n EventDeclaration,\n getFullSignatureAsSymbolForEvent,\n getFullSignatureForEvent,\n} from 'typechain'\n\nimport { reservedKeywords } from '@sentio/ethers-v6/dist/codegen/reserved-keywords.js'\nimport { codegenCallTraceTypes, generateCallHandlers } from './functions-handler.js'\nimport { generateEventFilters, generateEventHandlers } from './event-handler.js'\nimport { generateBoundViewFunctions, generateViewFunctions } from './function-calls.js'\n\nexport function codeGenIndex(contract: Contract): string {\n return ` \n export * from './internal/${contract.name.toLowerCase()}-processor.js'\n export * from './internal/${contract.name.toLowerCase()}-test-utils.js'\n export * from './internal/${contract.name}.js'\n export * from './internal/factories/${contract.name}__factory.js'\n `\n}\n\nexport function codeGenSentioFile(contract: Contract): string {\n const source = `\n ${Object.values(contract.functions).map(codegenCallTraceTypes).join('\\n')}\n\n const templateContract = ${contract.name}__factory.connect(\"0x0\", DummyProvider)\n\n export class ${contract.name}ContractView extends ContractView<${contract.name}> {\n constructor (contract: ${contract.name}) {\n super(contract);\n this.callStatic.contract = contract;\n }\n\n ${Object.values(contract.functions)\n .filter((f) => !reservedKeywords.has(f[0].name))\n .flatMap((fs) => generateViewFunctions(true, fs))\n .join('\\n')}\n \n callStatic = {\n contract: this.contract,\n ${Object.values(contract.functions)\n .filter((f) => !reservedKeywords.has(f[0].name))\n .flatMap((fs) => generateViewFunctions(false, fs))\n .join(',\\n')}\n }\n }\n \n export class ${contract.name}BoundContractView extends BoundContractView<${contract.name}, \n ${contract.name}ContractView> {\n ${Object.values(contract.functions)\n .filter((f) => !reservedKeywords.has(f[0].name))\n .flatMap((fs) => generateBoundViewFunctions(true, fs))\n .join('\\n')}\n \n callStatic = {\n view: this.view,\n context: this.context,\n ${Object.values(contract.functions)\n .filter((f) => !reservedKeywords.has(f[0].name))\n .flatMap((fs) => generateBoundViewFunctions(false, fs))\n .join(',\\n')}\n }\n }\n\n export type ${contract.name}Context = ContractContext<${contract.name}, ${contract.name}BoundContractView>\n\n export class ${contract.name}Processor extends BaseProcessor<${contract.name}, ${contract.name}BoundContractView> {\n ${Object.values(contract.events)\n .map((events) => generateEventHandlers(events, contract.name))\n .join('\\n')}\n\n ${Object.values(contract.functions)\n .map((f) => generateCallHandlers(f, contract.name))\n .join('\\n')}\n\n public static filters = {\n ${Object.values(contract.events)\n .map((events) => generateEventFilters(events))\n .join(',')}\n }\n \n protected CreateBoundContractView(): ${contract.name}BoundContractView {\n const view = get${contract.name}Contract(this.config.network, this.config.address)\n return new ${contract.name}BoundContractView(this.config.address, view)\n }\n\n public static bind(options: BindOptions): ${contract.name}Processor {\n if (!options.name) {\n options.name = \"${contract.name}\"\n }\n let processor = getProcessor(options) as ${contract.name}Processor\n if (!processor) {\n processor = new ${contract.name}Processor(options)\n addProcessor(options, processor)\n }\n return processor\n }\n}\n\nexport class ${contract.name}ProcessorTemplate extends BaseProcessorTemplate<${contract.name}, ${\n contract.name\n }BoundContractView> {\n bindInternal(options: BindOptions) {\n if (!options.name) {\n options.name = \"${contract.name}\"\n }\n let processor = getProcessor(options) as ${contract.name}Processor\n if (!processor) {\n processor = new ${contract.name}Processor(options)\n addProcessor(options, processor)\n }\n return processor\n }\n\n ${Object.values(contract.events)\n .map((events) => generateEventHandlers(events, contract.name))\n .join('\\n')}\n \n ${Object.values(contract.functions)\n .map((functions) => {\n generateCallHandlers(functions, contract.name)\n })\n .join('\\n')}\n }\n\n export function get${contract.name}Contract(chainId: EthChainId, address: string): ${contract.name}ContractView {\n let contract = getContractByABI(\"${contract.name}\", address, chainId) as ${contract.name}ContractView\n if (!contract) {\n const rawContract = ${contract.name}__factory.connect(address, getProvider(chainId))\n contract = new ${contract.name}ContractView(rawContract)\n addContractByABI(\"${contract.name}\", address, chainId, contract)\n }\n return contract\n }\n \n export function get${contract.name}ContractOnContext(context: EthContext, address: string): \n ${contract.name}BoundContractView {\n const view = get${contract.name}Contract(context.getChainId(), address)\n const boundView = new ${contract.name}BoundContractView(address, view) \n boundView.context = context;\n if (boundView.callStatic) {\n boundView.callStatic.context = context;\n }\n return boundView;\n }\n `\n const eventsImports = Object.values(contract.events).flatMap((events) => {\n if (events.length === 1) {\n return [`${events[0].name}Event`, `${events[0].name}EventFilter`]\n } else {\n return events.flatMap((e) => [\n `${getFullSignatureAsSymbolForEvent(e)}_Event`,\n `${getFullSignatureAsSymbolForEvent(e)}_EventFilter`,\n ])\n }\n })\n\n const structImports = Object.values(contract.structs).flatMap((structs) => {\n return structs.flatMap((s) => {\n if (!s.structName) {\n return []\n }\n if (s.structName.namespace) {\n return [s.structName.namespace]\n } else {\n return [s.structName.identifier + 'StructOutput', s.structName.identifier + 'Struct']\n }\n })\n })\n // dedup namespace\n const uniqueStructImports = [...new Set(structImports)]\n\n const imports = createImportsForUsedIdentifiers(\n {\n ethers: ['BigNumberish', 'Overrides', 'BytesLike'],\n // 'ethers/providers': ['Networkish'],\n '@sentio/sdk/eth': [\n 'addContractByABI',\n 'getContractByABI',\n 'addProcessor',\n 'getProcessor',\n 'getProvider',\n 'transformEtherError',\n 'Trace',\n 'BindOptions',\n 'BaseProcessor',\n 'BaseProcessorTemplate',\n 'BoundContractView',\n 'ContractContext',\n 'ContractView',\n 'DummyProvider',\n 'EthChainId',\n 'TypedCallTrace',\n 'EthContext',\n 'EthFetchConfig',\n ],\n // '@sentio/sdk/eth': ['BaseContext'],\n // '@sentio/protos': ['EthFetchConfig'],\n './common.js': ['PromiseOrValue'],\n './index.js': [`${contract.name}__factory`],\n [`./${contract.name}.js`]: [`${contract.name}`, ...eventsImports, ...uniqueStructImports],\n },\n source\n )\n\n return imports + source\n}\n\nexport function codeGenTestUtilsFile(contract: Contract): string {\n const source = `\n const mockField = {\n blockHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n blockNumber: 0,\n logIndex: 0,\n removed: false,\n transactionHash:\n \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n transactionIndex: 0,\n }\n ${Object.values(contract.events)\n .map((events) => {\n if (events.length === 1) {\n return generateMockEventLogFunction(events[0], contract.name, false)\n } else {\n return events.map((e) => generateMockEventLogFunction(e, contract.name, true)).join('\\n')\n }\n })\n .join('\\n')}\n `\n\n const possibleImports = {\n 'ethers/providers': ['LogParams'],\n '@sentio/sdk/eth': ['EthChainId'],\n } as any\n possibleImports[`./${contract.name}.js`] = Object.values(contract.events).flatMap((events) => {\n if (events.length === 1) {\n return `${events[0].name}EventObject`\n } else {\n return events.flatMap((e) => `${getFullSignatureAsSymbolForEvent(e)}_EventObject`)\n }\n })\n\n possibleImports[`./${contract.name.toLowerCase()}-processor.js`] = [`get${contract.name}Contract`]\n\n const imports = createImportsForUsedIdentifiers(possibleImports, source)\n\n return imports + source\n}\n\nfunction generateMockEventLogFunction(event: EventDeclaration, contractName: string, includeArgTypes: boolean): string {\n let eventName = event.name\n if (includeArgTypes) {\n eventName = getFullSignatureAsSymbolForEvent(event) + '_'\n }\n\n const eventArgs = event.inputs.map((input, i) => `event.${input.name ?? `arg${i.toString()}`}`)\n\n return `\n export function mock${eventName}Log(contractAddress: string, event: ${eventName}EventObject): LogParams {\n const contract = get${contractName}Contract(EthChainId.ETHEREUM, contractAddress)\n const encodedLog = contract.rawContract.interface.encodeEventLog(\n '${getFullSignatureForEvent(event)}',\n [${eventArgs.join(', ')}]\n )\n return {\n ...mockField,\n index: 0,\n address: contractAddress,\n data: encodedLog.data,\n topics: encodedLog.topics,\n }\n }\n `\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/sdk",
3
- "version": "2.18.0-rc.3",
3
+ "version": "2.18.1-rc.1",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -71,8 +71,8 @@
71
71
  "typedoc": "^0.24.1",
72
72
  "utility-types": "^3.10.0",
73
73
  "yaml": "^2.2.1",
74
- "@sentio/protos": "2.18.0-rc.3",
75
- "@sentio/runtime": "^2.18.0-rc.3"
74
+ "@sentio/protos": "2.18.1-rc.1",
75
+ "@sentio/runtime": "^2.18.1-rc.1"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "tsup": "npm:@sentio/tsup@^6.7.0"
@@ -1161,6 +1161,9 @@ export function getEACAggregatorProxyContractOnContext(
1161
1161
  ): EACAggregatorProxyBoundContractView {
1162
1162
  const view = getEACAggregatorProxyContract(context.getChainId(), address);
1163
1163
  const boundView = new EACAggregatorProxyBoundContractView(address, view);
1164
- boundView.context = context as any;
1164
+ boundView.context = context;
1165
+ if (boundView.callStatic) {
1166
+ boundView.callStatic.context = context;
1167
+ }
1165
1168
  return boundView;
1166
1169
  }
@@ -625,6 +625,9 @@ export function getERC1155ContractOnContext(
625
625
  ): ERC1155BoundContractView {
626
626
  const view = getERC1155Contract(context.getChainId(), address);
627
627
  const boundView = new ERC1155BoundContractView(address, view);
628
- boundView.context = context as any;
628
+ boundView.context = context;
629
+ if (boundView.callStatic) {
630
+ boundView.callStatic.context = context;
631
+ }
629
632
  return boundView;
630
633
  }
@@ -843,6 +843,9 @@ export function getERC20ContractOnContext(
843
843
  ): ERC20BoundContractView {
844
844
  const view = getERC20Contract(context.getChainId(), address);
845
845
  const boundView = new ERC20BoundContractView(address, view);
846
- boundView.context = context as any;
846
+ boundView.context = context;
847
+ if (boundView.callStatic) {
848
+ boundView.callStatic.context = context;
849
+ }
847
850
  return boundView;
848
851
  }
@@ -508,6 +508,9 @@ export function getERC20BytesContractOnContext(
508
508
  ): ERC20BytesBoundContractView {
509
509
  const view = getERC20BytesContract(context.getChainId(), address);
510
510
  const boundView = new ERC20BytesBoundContractView(address, view);
511
- boundView.context = context as any;
511
+ boundView.context = context;
512
+ if (boundView.callStatic) {
513
+ boundView.callStatic.context = context;
514
+ }
512
515
  return boundView;
513
516
  }
@@ -777,6 +777,9 @@ export function getERC721ContractOnContext(
777
777
  ): ERC721BoundContractView {
778
778
  const view = getERC721Contract(context.getChainId(), address);
779
779
  const boundView = new ERC721BoundContractView(address, view);
780
- boundView.context = context as any;
780
+ boundView.context = context;
781
+ if (boundView.callStatic) {
782
+ boundView.callStatic.context = context;
783
+ }
781
784
  return boundView;
782
785
  }