Skip to content

Commit

Permalink
fix: increase fund klay amount
Browse files Browse the repository at this point in the history
  • Loading branch information
bayram98 committed Jul 13, 2023
1 parent 8e7d4be commit c163c0b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/create-and-fund-account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function main() {
console.log(`Account ID: ${accId}`)

// Deposit 1 KLAY
const klayAmount = '1'
const klayAmount = '2.5'
const amount = ethers.utils.parseEther(klayAmount)
await (await prepayment.deposit(accId, { value: amount })).wait()
console.log(`Deposited ${klayAmount} KLAY to account ID ${accId}`)
Expand Down
3 changes: 1 addition & 2 deletions scripts/get-account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ async function main() {
const prepayment = await ethers.getContractAt(Prepayment__factory.abi, prepaymentAddress)

const { balance, reqCount, owner, consumers } = await prepayment.getAccount(ACC_ID)
const amountKlay = balance / Number(ethers.utils.parseEther('1.0'))
console.log(`balance:\t${balance}`)
const amountKlay = ethers.utils.formatUnits(balance, 'ether')
console.log(`balance:\t${amountKlay} Klay`)
console.log(`reqCount:\t${reqCount}`)
console.log(`owner:\t\t${owner}`)
Expand Down

0 comments on commit c163c0b

Please sign in to comment.