2020-07-08 13:55:25 +00:00
|
|
|
const {
|
|
|
|
BN, // Big Number support
|
|
|
|
expectEvent, // Assertions for emitted events
|
|
|
|
expectRevert, // Assertions for transactions that should fail
|
|
|
|
balance,
|
|
|
|
ether
|
|
|
|
} = require('@openzeppelin/test-helpers');
|
|
|
|
|
2020-07-09 11:33:21 +00:00
|
|
|
const MockContract = artifacts.require("MockContract");
|
2020-07-09 15:08:08 +00:00
|
|
|
const MockSynthetixStaking = artifacts.require('MockSynthetixStaking');
|
2020-07-08 13:55:25 +00:00
|
|
|
const erc20ABI = require("./abi/erc20.js");
|
2020-07-09 11:33:21 +00:00
|
|
|
|
2020-07-08 13:55:25 +00:00
|
|
|
contract('ConnectSynthetixStaking', async accounts => {
|
|
|
|
const [sender, receiver] = accounts;
|
2020-07-09 15:08:08 +00:00
|
|
|
const mock = await MockContract.deployed();
|
|
|
|
const mockSynthetixStaking = await MockSynthetixStaking.deployed();
|
2020-07-09 11:33:21 +00:00
|
|
|
const crvRenWSBTCContract = new web3.eth.Contract(erc20ABI, mock.address);
|
|
|
|
|
2020-07-08 13:55:25 +00:00
|
|
|
before(async function () {
|
2020-07-09 11:33:21 +00:00
|
|
|
let methodId = await crvRenWSBTCContract.methods.balanceOf(sender).encodeABI();
|
|
|
|
await mock.givenMethodReturnUint(methodId, 10000000);
|
2020-07-08 13:55:25 +00:00
|
|
|
|
|
|
|
let crvRenWSBTC = await crvRenWSBTCContract.methods.balanceOf(sender).call();
|
|
|
|
|
2020-07-09 11:33:21 +00:00
|
|
|
expect(crvRenWSBTC).to.equal("10000000");
|
2020-07-08 13:55:25 +00:00
|
|
|
})
|
2020-07-09 11:33:21 +00:00
|
|
|
|
|
|
|
it('can mock token', async function() {
|
|
|
|
// expect(wbtcAfter - wbtcBefore).to.be.at.least(10000000);
|
|
|
|
});
|
2020-07-08 13:55:25 +00:00
|
|
|
})
|