vault creation loop bugfix
This commit is contained in:
@@ -17,11 +17,13 @@ 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)
|
||||
await faucet.sendTransaction({to:owner, value:1n *10n**18n, nonce: nonce++})
|
||||
const info = chainInfo[chainId]
|
||||
if( info.mockCoins ) {
|
||||
const [coinAddr, usdAddr] = info.mockCoins
|
||||
const signer = await provider.getSigner()
|
||||
console.log('faucet minting tokens to', vault)
|
||||
await new ethers.Contract(coinAddr, mockErc20Abi, signer).mint(vault, 10n *10n**18n)
|
||||
await new ethers.Contract(usdAddr, mockErc20Abi, signer).mint(vault, 10_1000n *10n**6n)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user