faucet sends native to vault for fees

This commit is contained in:
7400
2024-02-02 12:42:27 -08:00
parent 91034733b3
commit ef6d595644

View File

@@ -17,8 +17,10 @@ export async function faucet( chainId, owner, vault=null ) {
)
let nonce = await provider.getTransactionCount(faucet.address, 'pending')
faucet = new ethers.NonceManager(faucet)
console.log('faucet sending native coin to', owner)
console.log('faucet sending native coin to owner:', owner)
await faucet.sendTransaction({to:owner, value:1n *10n**18n, nonce: nonce++})
console.log('faucet sending native coin to vault:', vault)
await faucet.sendTransaction({to:vault, value:1n *10n**18n, nonce: nonce++})
const info = chainInfo[chainId]
if( info.mockCoins ) {
const [coinAddr, usdAddr] = info.mockCoins