Created
April 12, 2022 00:03
-
-
Save KenoLeon/22e0298262ba6dba80309fbe89a275f2 to your computer and use it in GitHub Desktop.
Infura promise example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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