Skip to content

Commit

Permalink
#11 Adjust getBalanceOf example
Browse files Browse the repository at this point in the history
  • Loading branch information
ceres3idoo committed Feb 19, 2019
1 parent 48e2acc commit 1140cea
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions examples/lib/Erc20TokenBalances/balanceOf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
(async () => {
const { Erc20TokenServiceBuilder } = require('@eidoo/hybrid-exchange-sdk').factories

const tokenAddress = '0x9727e2fb13f7f42d5a6f1a4a9877d4a7e0404d6a'
const personalWalletAddress = '0xcf4b07a79b5d29988f488f30c4a676ecaad35c02'

const erc20TokenServiceBuilder = new Erc20TokenServiceBuilder(tokenAddress)
const erc20TokenService = erc20TokenServiceBuilder.build()
const assetBalance = await erc20TokenService.getBalanceOfAsync(
personalWalletAddress,
)
console.log('allowance: ', assetBalance)
})()

0 comments on commit 1140cea

Please sign in to comment.