Skip to content

Instantly share code, notes, and snippets.

@KenoLeon
Created April 12, 2022 00:03
Show Gist options
  • Select an option

  • Save KenoLeon/22e0298262ba6dba80309fbe89a275f2 to your computer and use it in GitHub Desktop.

Select an option

Save KenoLeon/22e0298262ba6dba80309fbe89a275f2 to your computer and use it in GitHub Desktop.
Infura promise example
async function deposit(signer) {
const tx = await signer.sendTransaction({
// ITX deposit contract (same address for all public Ethereum networks)
to: '0x015C7C7A7D65bbdb117C573007219107BD7486f9',
// Choose how much ether you want to deposit to your ITX gas tank
value: ethers.utils.parseUnits('0.1', 'ether')
})
// Waiting for the transaction to be mined
await tx.wait()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment