mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
using Mock USDC in fixed rate exchange tests
This commit is contained in:
parent
4374e98ef2
commit
c264e06b93
@ -68,7 +68,7 @@ describe('Fixed Rate Exchange tests', async () => {
|
|||||||
before(async () => {
|
before(async () => {
|
||||||
factoryAddress = addresses.ERC721Factory.toLowerCase()
|
factoryAddress = addresses.ERC721Factory.toLowerCase()
|
||||||
fixedRateAddress = addresses.FixedPrice.toLowerCase()
|
fixedRateAddress = addresses.FixedPrice.toLowerCase()
|
||||||
baseTokenAddress = addresses.MockDAI.toLowerCase()
|
baseTokenAddress = addresses.MockUSDC.toLowerCase()
|
||||||
Factory = new NftFactory(factoryAddress, web3)
|
Factory = new NftFactory(factoryAddress, web3)
|
||||||
accounts = await web3.eth.getAccounts()
|
accounts = await web3.eth.getAccounts()
|
||||||
publisher = accounts[0].toLowerCase()
|
publisher = accounts[0].toLowerCase()
|
||||||
@ -610,15 +610,15 @@ describe('Fixed Rate Exchange tests', async () => {
|
|||||||
publisher
|
publisher
|
||||||
)
|
)
|
||||||
|
|
||||||
const daiContract = new web3.eth.Contract(
|
const usdcContract = new web3.eth.Contract(
|
||||||
MockERC20.abi as AbiItem[],
|
MockERC20.abi as AbiItem[],
|
||||||
addresses.MockDAI
|
addresses.MockUSDC
|
||||||
)
|
)
|
||||||
// user1 need DAI so that they can buy the datatoken
|
// user1 need USDC so that they can buy the datatoken
|
||||||
await daiContract.methods
|
await usdcContract.methods
|
||||||
.transfer(user1, web3.utils.toWei('100'))
|
.transfer(user1, web3.utils.toWei('100'))
|
||||||
.send({ from: publisher })
|
.send({ from: publisher })
|
||||||
await daiContract.methods
|
await usdcContract.methods
|
||||||
.approve(fixedRateAddress, web3.utils.toWei('10000000'))
|
.approve(fixedRateAddress, web3.utils.toWei('10000000'))
|
||||||
.send({ from: user1 })
|
.send({ from: user1 })
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user