Class: Faucet
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 in
nil/nil.js/src/contracts/Faucet/Faucet.ts:38
Properties
address
static address: "0x000100000000000000000000000000000FA00CE7";
The const address of the faucet contract.
Static
Defined in
nil/nil.js/src/contracts/Faucet/Faucet.ts:23
Methods
withdrawTo()
withdrawTo(
   address, 
   value?, 
seqno?): Promise<Uint8Array>
Withdraws the specified value to the given address.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| 
 | `0x${string}` | 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 in
nil/nil.js/src/contracts/Faucet/Faucet.ts:52
withdrawToWithRetry()
withdrawToWithRetry(
   address, 
   value?, 
retry?): Promise<`0x${string}`>
Withdraws the specified value to the given address with retries.
Parameters
| Parameter | Type | Default value | Description | 
|---|---|---|---|
| 
 | `0x${string}` | 
 | 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<`0x${string}`>
The hash of the withdrawal message.