set gas price to external contract

This commit is contained in:
mingda
2020-11-11 16:42:00 +08:00
parent 4d9804b373
commit 39e21342a6
9 changed files with 59 additions and 9 deletions

View File

@@ -143,13 +143,13 @@ describe("Funding", () => {
});
describe("sell shares", () => {
it("sell shares", async () => {
it.only("sell shares", async () => {
await ctx.Route.methods
.depositToDVM(ctx.DVM.options.address, lp, decimalStr("10"), decimalStr("100"))
.send(ctx.sendParam(lp));
var vaultShares = await ctx.Vault.methods.balanceOf(lp).call()
var bob = ctx.SpareAccounts[0]
await ctx.DVM.methods.sellShares(bob, vaultShares).send(ctx.sendParam(lp))
var bob = ctx.SpareAccounts[5]
await ctx.DVM.methods.sellShares(bob, vaultShares, "0x").send(ctx.sendParam(lp))
assert.equal(await ctx.BASE.methods.balanceOf(bob).call(), decimalStr("10"))
assert.equal(await ctx.QUOTE.methods.balanceOf(bob).call(), decimalStr("100"))
})