참고: 이 페이지는 아직 한국어로 번역되지 않았습니다. 아래는 영어 원문입니다.A BaseContract with no type guards on its methods or events.
BaseContract
<this
> & Omit
<ContractInterface
, keyof BaseContract
>Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
fallback | readonly | null | WrappedFallback | The fallback or receive function if any. | _ContractBase().fallback |
filters | readonly | Record <string , ContractEvent <any []>> | All the Events available on this contract. | _ContractBase().filters |
interface | readonly | Interface | The contract Interface. | _ContractBase().interface |
runner | readonly | null | ContractRunner | The connected runner. This is generally a Provider or a Signer, which dictates what operations are supported. For example, a Contract connected to a Provider may only execute read-only operations. | _ContractBase().runner |
target | readonly | string | Addressable | The target to connect to. This can be an address or any Addressable, such as another contract. To get the resolved address, use the getAddress method. | _ContractBase().target |
Parameter | Type | Description |
---|---|---|
event | ContractEventName | The event to listen for. |
listener | Listener | The listener to call when the event is emitted. |
Promise
<Contract
>
_ContractBase().addListener
target
.
Parameter | Type | Description |
---|---|---|
target | string | Addressable | The target to connect to. |
BaseContract
The new contract instance.
_ContractBase().attach
runner
.
Parameter | Type | Description |
---|---|---|
runner | null | ContractRunner | The runner to use. |
BaseContract
The new contract instance.
_ContractBase().connect
null
| ContractTransactionResponse
The transaction used to deploy this contract or null
.
_ContractBase().deploymentTransaction
event
calling all listeners with args
.
Resolves to true
if any listeners were called.
Parameter | Type | Description |
---|---|---|
event | ContractEventName | The event to emit. |
…args | any [] | The arguments to pass to the listeners. |
Promise
<boolean
>
true
if any listeners were called.
_ContractBase().emit
Promise
<string
>
The resolved address.
_ContractBase().getAddress
Promise
<null
| string
>
The deployed bytecode or null.
_ContractBase().getDeployedCode
prototype
or when using a Contract programatically.
Parameter | Type | Description |
---|---|---|
key | string | EventFragment | The name of the event to return. |
ContractEvent
<any
[]>
The event for the given name.
_ContractBase().getEvent
prototype
or when using a Contract programatically.
Type parameter | Value |
---|---|
T extends ContractMethod <any [], any , any , T > | ContractMethod <any [], any , any > |
Parameter | Type | Description |
---|---|---|
key | string | FunctionFragment | The name of the function to return. |
T
The function for the given name.
_ContractBase().getFunction
event
or the total number of listeners if unspecified.
Parameter | Type | Description |
---|---|---|
event ? | ContractEventName | The event to count listeners for. |
Promise
<number
>
The number of listeners.
_ContractBase().listenerCount
event
or all listeners if unspecified.
Parameter | Type | Description |
---|---|---|
event ? | ContractEventName | The event to get listeners for. |
Promise
<Listener
[]>
The listeners.
_ContractBase().listeners
listener
from the listeners for event
or remove all listeners if unspecified.
Parameter | Type | Description |
---|---|---|
event | ContractEventName | The event to remove the listener from. |
listener ? | Listener | The listener to remove. |
Promise
<Contract
>
This contract instance.
_ContractBase().off
listener
for the event
.
Parameter | Type | Description |
---|---|---|
event | ContractEventName | The event to listen for. |
listener | Listener | The listener to call when the event is emitted. |
Promise
<Contract
>
This contract instance.
_ContractBase().on
listener
for the event
, but remove the listener after it is fired once.
Parameter | Type | Description |
---|---|---|
event | ContractEventName | The event to listen for. |
listener | Listener | The listener to call when the event is emitted. |
Promise
<Contract
>
_ContractBase().once
event
in the range fromBlock
(default: 0
) to toBlock
(default:
"latest"
) inclusive.
Parameter | Type | Description |
---|---|---|
event | ContractEventName | The event to query. |
fromBlock ? | BlockTag | The block to start querying from. |
toBlock ? | BlockTag | The block to stop querying at. |
Promise
<(EventLog
| Log
)[]>
An array of event logs.
_ContractBase().queryFilter
event
or remove all listeners if unspecified.
Parameter | Type | Description |
---|---|---|
event ? | ContractEventName | The event to remove the listeners from. |
Promise
<Contract
>
This contract instance.
_ContractBase().removeAllListeners
Parameter | Type | Description |
---|---|---|
event | ContractEventName | The event to remove the listener from. |
listener | Listener | The listener to remove. |
Promise
<Contract
>
_ContractBase().removeListener
Promise
<Contract
>
The contract instance.
_ContractBase().waitForDeployment