Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/web3/packages/web3-eth-contract/types/index.d.ts>Contract

Deno / TypeScript to Ethereum Connector
Latest
class Contract
import { Contract } from "https://deno.land/x/web3@v0.11.1/packages/web3-eth-contract/types/index.d.ts";

Constructors

new
Contract(
jsonInterface: AbiItem[],
address?: string,
options?: ContractOptions,
)

Properties

private
_address: string
private
_jsonInterface: AbiItem[]
defaultAccount: string | null
defaultBlock: BlockNumber
defaultChain: chain
defaultCommon: Common
defaultHardfork: hardfork
events: any
handleRevert: boolean
methods: any
options: Options
transactionBlockTimeout: number
transactionConfirmationBlocks: number
transactionPollingTimeout: number

Methods

getPastEvents(event: string): Promise<EventData[]>
getPastEvents(
event: string,
callback: (error: Error, event: EventData) => void,
): Promise<EventData[]>
getPastEvents(event: string, options: PastEventOptions): Promise<EventData[]>
getPastEvents(event: string, callback: (error: Error, event: EventData) => void): Promise<EventData[]>
once(event: string, callback: (error: Error, event: EventData) => void): void
once(
event: string,
options: EventOptions,
callback: (error: Error, event: EventData) => void,
): void