Class: Faucet
The Faucet is a special contract that is used to top up other contracts in the =nil; devnet.
Faucet
Constructors
new Faucet()
new Faucet(client): Faucet
Creates an instance of Faucet.
Parameters
Parameter | Type | Description |
---|---|---|
|
Returns
Defined
@nilfoundation/niljs/src/contracts/Faucet/Faucet.ts:36
Properties
address
static address: "0x000100000000000000000000000000000FA00CE7";
The const address of the Faucet contract.
Static
Defined
@nilfoundation/niljs/src/contracts/Faucet/Faucet.ts:21
Methods
withdrawTo()
withdrawTo(
address,
value?,
seqno?): Promise<Uint8Array>
Withdraws the specified value to the given address.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
|
|
| The address to which the withdrawal should be made. |
|
|
| The value that should be withdrawn to the given address. |
|
|
| The sequence number of the withdrawal message. |
Returns
Promise
<Uint8Array
>
The hash of the withdrawal message.
Deprecated
Async
Defined
@nilfoundation/niljs/src/contracts/Faucet/Faucet.ts:50
withdrawToWithRetry()
withdrawToWithRetry(
address,
value?,
retries?): Promise<any>
Withdraws the specified value to the given address with retries.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
|
|
| The address to which the withdrawal should be made. |
|
|
| The value that should be withdrawn to the given address. |
|
|
| How many times to retry the withdrawal in case of failure. |
Returns
Promise
<any
>
The hash of the withdrawal message.
Async
Defined
@nilfoundation/niljs/src/contracts/Faucet/Faucet.ts:82