Update Deposit Utils tests
@@ -15,6 +15,8 @@ const DepositLiquidation = artifacts.require('DepositLiquidation')
const ECDSAKeepStub = artifacts.require('ECDSAKeepStub')
const TestToken = artifacts.require('TestToken')
const TBTCSystemStub = artifacts.require('TBTCSystemStub')
+const DepositOwnerToken = artifacts.require('TestDepositOwnerToken')
+const FeeRebateToken = artifacts.require('TestFeeRebateToken')
const TestTBTCConstants = artifacts.require('TestTBTCConstants')
const TestDepositUtils = artifacts.require('TestDepositUtils')
@@ -39,6 +41,8 @@ const TEST_DEPOSIT_UTILS_DEPLOY = [
{ name: 'DepositRedemption', contract: DepositRedemption },
{ name: 'DepositLiquidation', contract: DepositLiquidation },
{ name: 'TestDepositUtils', contract: TestDepositUtils },
+ { name: 'DepositOwnerToken', contract: DepositOwnerToken },
+ { name: 'FeeRebateToken', contract: FeeRebateToken },
{ name: 'ECDSAKeepStub', contract: ECDSAKeepStub }]
// real tx from mainnet bitcoin, interpreted as funding tx
@@ -69,24 +73,30 @@ contract('DepositUtils', (accounts) => {
let tbtcToken
const funderBondAmount = new BN('10').pow(new BN('5'))
let tbtcSystemStub
+ let depositOwnerToken
+ let feeRebateToken
before(async () => {
beneficiary = accounts[2]
deployed = await utils.deploySystem(TEST_DEPOSIT_UTILS_DEPLOY)
- tbtcSystemStub = await TBTCSystemStub.new(utils.address0)
+ tbtcSystemStub = await TBTCSystemStub.new()
tbtcToken = await TestToken.new(tbtcSystemStub.address)
testUtilsInstance = deployed.TestDepositUtils
- tbtcSystemStub.forceMint(beneficiary, web3.utils.toBN(testUtilsInstance.address))
+ depositOwnerToken = deployed.DepositOwnerToken
+ feeRebateToken = deployed.FeeRebateToken
+
+ feeRebateToken.forceMint(beneficiary, web3.utils.toBN(testUtilsInstance.address))
await testUtilsInstance.createNewDeposit(
tbtcSystemStub.address,
tbtcToken.address,
- utils.address0,
+ depositOwnerToken.address,
+ feeRebateToken.address,
1, // m
1, // n
{ value: funderBondAmount }
