|
| 1 | +import * as p from '@subsquid/evm-codec' |
| 2 | +import { event, fun, indexed, ContractBase } from '@subsquid/evm-abi' |
| 3 | +import type { EventParams as EParams, FunctionArguments, FunctionReturn } from '@subsquid/evm-abi' |
| 4 | + |
| 5 | +export const events = { |
| 6 | + DepositEvent: event("0x649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5", {"pubkey": p.bytes, "withdrawal_credentials": p.bytes, "amount": p.bytes, "signature": p.bytes, "index": p.bytes}), |
| 7 | +} |
| 8 | + |
| 9 | +export const functions = { |
| 10 | + deposit: fun("0x22895118", {"pubkey": p.bytes, "withdrawal_credentials": p.bytes, "signature": p.bytes, "deposit_data_root": p.bytes32}, ), |
| 11 | + get_deposit_count: fun("0x621fd130", {}, p.bytes), |
| 12 | + get_deposit_root: fun("0xc5f2892f", {}, p.bytes32), |
| 13 | + supportsInterface: fun("0x01ffc9a7", {"interfaceId": p.bytes4}, p.bool), |
| 14 | +} |
| 15 | + |
| 16 | +export class Contract extends ContractBase { |
| 17 | + |
| 18 | + get_deposit_count() { |
| 19 | + return this.eth_call(functions.get_deposit_count, {}) |
| 20 | + } |
| 21 | + |
| 22 | + get_deposit_root() { |
| 23 | + return this.eth_call(functions.get_deposit_root, {}) |
| 24 | + } |
| 25 | + |
| 26 | + supportsInterface(interfaceId: SupportsInterfaceParams["interfaceId"]) { |
| 27 | + return this.eth_call(functions.supportsInterface, {interfaceId}) |
| 28 | + } |
| 29 | +} |
| 30 | + |
| 31 | +/// Event types |
| 32 | +export type DepositEventEventArgs = EParams<typeof events.DepositEvent> |
| 33 | + |
| 34 | +/// Function types |
| 35 | +export type DepositParams = FunctionArguments<typeof functions.deposit> |
| 36 | +export type DepositReturn = FunctionReturn<typeof functions.deposit> |
| 37 | + |
| 38 | +export type Get_deposit_countParams = FunctionArguments<typeof functions.get_deposit_count> |
| 39 | +export type Get_deposit_countReturn = FunctionReturn<typeof functions.get_deposit_count> |
| 40 | + |
| 41 | +export type Get_deposit_rootParams = FunctionArguments<typeof functions.get_deposit_root> |
| 42 | +export type Get_deposit_rootReturn = FunctionReturn<typeof functions.get_deposit_root> |
| 43 | + |
| 44 | +export type SupportsInterfaceParams = FunctionArguments<typeof functions.supportsInterface> |
| 45 | +export type SupportsInterfaceReturn = FunctionReturn<typeof functions.supportsInterface> |
| 46 | + |
0 commit comments