Skip to main content

requestFunds

Request funds from a running local node to the currently connected wallet.

Usage

Request funds from a running local node (Localhost or Hardhat) to the currently connected wallet.

This is useful for when you want to deploy smart contracts from your own wallet to a local node, rather than importing one of the provided accounts from a tool such as Hardhat.

Under the hood, this method simply transfers funds from a public test account to the currently connected wallet.

// Request 1 Ether from the local node
const receipt = await sdk.wallet.requestFunds(1);

Configuration

amount

The amount of tokens you want to (e.g. Ether on Ethereum) to request.

Must be a string, number or BigNumber.

// Request 1 Ether from the local node
const receipt = await sdk.wallet.requestFunds("{{amount}}");