update test
This commit is contained in:
@@ -68,15 +68,15 @@ describe("Funding", () => {
|
||||
|
||||
await logGas(ctx.CP.methods.settle(), ctx.sendParam(ctx.Deployer), "settle")
|
||||
|
||||
assert.equal(await ctx.BASE.methods.balanceOf(ctx.CP.options.address).call(), "2997000000000000000000")
|
||||
assert.equal(await ctx.BASE.methods.balanceOf(ctx.CP.options.address).call(), "3000000000000000000000")
|
||||
assert.equal(await ctx.QUOTE.methods.balanceOf(ctx.CP.options.address).call(), "0")
|
||||
|
||||
await ctx.CP.methods.bidderClaim(bidder1, "0x").send(ctx.sendParam(bidder1))
|
||||
assert.equal(await ctx.BASE.methods.balanceOf(bidder1).call(), "999000000000000000000")
|
||||
assert.equal(await ctx.BASE.methods.balanceOf(bidder1).call(), "1000000000000000000000")
|
||||
assert.equal(await ctx.QUOTE.methods.balanceOf(bidder1).call(), "0")
|
||||
|
||||
await ctx.CP.methods.bidderClaim(bidder2, "0x").send(ctx.sendParam(bidder2))
|
||||
assert.equal(await ctx.BASE.methods.balanceOf(bidder2).call(), "1998000000000000000000")
|
||||
assert.equal(await ctx.BASE.methods.balanceOf(bidder2).call(), "2000000000000000000000")
|
||||
assert.equal(await ctx.QUOTE.methods.balanceOf(bidder2).call(), "0")
|
||||
|
||||
})
|
||||
@@ -92,15 +92,15 @@ describe("Funding", () => {
|
||||
await logGas(ctx.CP.methods.settle(), ctx.sendParam(ctx.Deployer), "settle")
|
||||
|
||||
assert.equal(await ctx.BASE.methods.balanceOf(ctx.CP.options.address).call(), "5000000000000000000000")
|
||||
assert.equal(await ctx.QUOTE.methods.balanceOf(ctx.CP.options.address).call(), decimalStr("39910"))
|
||||
assert.equal(await ctx.QUOTE.methods.balanceOf(ctx.CP.options.address).call(), decimalStr("40000"))
|
||||
|
||||
await ctx.CP.methods.bidderClaim(bidder1, "0x").send(ctx.sendParam(bidder1))
|
||||
assert.equal(await ctx.BASE.methods.balanceOf(bidder1).call(), "1666666666666666666666")
|
||||
assert.equal(await ctx.QUOTE.methods.balanceOf(bidder1).call(), "13303333333333333333333")
|
||||
assert.equal(await ctx.QUOTE.methods.balanceOf(bidder1).call(), "13333333333333333333333")
|
||||
|
||||
await ctx.CP.methods.bidderClaim(bidder2, "0x").send(ctx.sendParam(bidder2))
|
||||
assert.equal(await ctx.BASE.methods.balanceOf(bidder2).call(), "3333333333333333333333")
|
||||
assert.equal(await ctx.QUOTE.methods.balanceOf(bidder2).call(), "26606666666666666666666")
|
||||
assert.equal(await ctx.QUOTE.methods.balanceOf(bidder2).call(), "26666666666666666666666")
|
||||
})
|
||||
|
||||
it("withdraw lp token", async () => {
|
||||
|
||||
Reference in New Issue
Block a user