update
This commit is contained in:
@@ -64,5 +64,42 @@ describe("vDODO-erc20", () => {
|
|||||||
it("transfer - close", async () => {
|
it("transfer - close", async () => {
|
||||||
//预期revert
|
//预期revert
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// it("vdodo owner can transfer", async () => {
|
||||||
|
|
||||||
|
// await ctx.VDODO.methods.mint(decimalStr("10"),"0x0000000000000000000000000000000000000000").send(ctx.sendParam(account0))
|
||||||
|
// assert.equal(
|
||||||
|
// await ctx.DODO.methods.balanceOf(account0).call(),
|
||||||
|
// decimalStr("990")
|
||||||
|
// );
|
||||||
|
// assert.equal(
|
||||||
|
// await ctx.DODO.methods.balanceOf(ctx.VDODO.options.address).call(),
|
||||||
|
// decimalStr("10")
|
||||||
|
// );
|
||||||
|
// assert.equal(
|
||||||
|
// await ctx.VDODO.methods.balanceOf(account0).call(),
|
||||||
|
// decimalStr("0.1")
|
||||||
|
// );
|
||||||
|
// assert.equal(
|
||||||
|
// await ctx.VDODO.methods.balanceOf(account1).call(),
|
||||||
|
// decimalStr("0")
|
||||||
|
// );
|
||||||
|
|
||||||
|
|
||||||
|
// await truffleAssert.reverts(
|
||||||
|
// ctx.VDODO.methods.transfer(account1,decimalStr("0.1")).send(ctx.sendParam(account0)),
|
||||||
|
// "vDODOToken: not allowed transfer"
|
||||||
|
// )
|
||||||
|
// assert.equal(
|
||||||
|
// await ctx.VDODO.methods.balanceOf(account0).call(),
|
||||||
|
// decimalStr("0.1")
|
||||||
|
// );
|
||||||
|
// assert.equal(
|
||||||
|
// await ctx.VDODO.methods.balanceOf(account1).call(),
|
||||||
|
// decimalStr("0")
|
||||||
|
// );
|
||||||
|
|
||||||
|
// });
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -60,5 +60,9 @@ describe("vDODO-owner", () => {
|
|||||||
|
|
||||||
//改变后状态
|
//改变后状态
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("read-helper", async () => {
|
||||||
|
//不同amount对应的feeRatio (5 5-15 15)
|
||||||
|
});
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -48,30 +48,6 @@ describe("VDODO", () => {
|
|||||||
|
|
||||||
describe("vdodo", () => {
|
describe("vdodo", () => {
|
||||||
|
|
||||||
it("vdodo init", async () => {
|
|
||||||
assert.equal(
|
|
||||||
await ctx.DODO.methods.balanceOf(account0).call(),
|
|
||||||
decimalStr("1000")
|
|
||||||
);
|
|
||||||
assert.equal(
|
|
||||||
await ctx.VDODO.methods.balanceOf(account0).call(),
|
|
||||||
decimalStr("0")
|
|
||||||
);
|
|
||||||
assert.equal(
|
|
||||||
await ctx.VDODO.methods.alpha().call(),
|
|
||||||
ctx.alpha
|
|
||||||
);
|
|
||||||
assert.equal(
|
|
||||||
await ctx.VDODO.methods.lastRewardBlock().call(),
|
|
||||||
ctx.lastRewardBlock
|
|
||||||
);
|
|
||||||
assert.equal(
|
|
||||||
await ctx.VDODO.methods.totalSupply().call(),
|
|
||||||
decimalStr("0")
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
it("vdodo-mint-first", async () => {
|
it("vdodo-mint-first", async () => {
|
||||||
//第一次mint 后
|
//第一次mint 后
|
||||||
//alpha lastRewardBlock 状态
|
//alpha lastRewardBlock 状态
|
||||||
@@ -106,6 +82,7 @@ describe("VDODO", () => {
|
|||||||
|
|
||||||
it("redeem-partial-NotMint", async () => {
|
it("redeem-partial-NotMint", async () => {
|
||||||
//多个下级引用
|
//多个下级引用
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("redeem-all-haveMint", async () => {
|
it("redeem-all-haveMint", async () => {
|
||||||
@@ -116,6 +93,7 @@ describe("VDODO", () => {
|
|||||||
//多个下级引用
|
//多个下级引用
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// it("vdodo first mint with no superior", async () => {
|
// it("vdodo first mint with no superior", async () => {
|
||||||
|
|
||||||
// await ctx.VDODO.methods.mint(decimalStr("10"),"0x0000000000000000000000000000000000000000").send(ctx.sendParam(account0))
|
// await ctx.VDODO.methods.mint(decimalStr("10"),"0x0000000000000000000000000000000000000000").send(ctx.sendParam(account0))
|
||||||
@@ -145,40 +123,6 @@ describe("VDODO", () => {
|
|||||||
// ctx.lastRewardBlock
|
// ctx.lastRewardBlock
|
||||||
// );
|
// );
|
||||||
// });
|
// });
|
||||||
// it("vdodo owner can transfer", async () => {
|
|
||||||
|
|
||||||
// await ctx.VDODO.methods.mint(decimalStr("10"),"0x0000000000000000000000000000000000000000").send(ctx.sendParam(account0))
|
|
||||||
// assert.equal(
|
|
||||||
// await ctx.DODO.methods.balanceOf(account0).call(),
|
|
||||||
// decimalStr("990")
|
|
||||||
// );
|
|
||||||
// assert.equal(
|
|
||||||
// await ctx.DODO.methods.balanceOf(ctx.VDODO.options.address).call(),
|
|
||||||
// decimalStr("10")
|
|
||||||
// );
|
|
||||||
// assert.equal(
|
|
||||||
// await ctx.VDODO.methods.balanceOf(account0).call(),
|
|
||||||
// decimalStr("0.1")
|
|
||||||
// );
|
|
||||||
// assert.equal(
|
|
||||||
// await ctx.VDODO.methods.balanceOf(account1).call(),
|
|
||||||
// decimalStr("0")
|
|
||||||
// );
|
|
||||||
|
|
||||||
|
|
||||||
// await truffleAssert.reverts(
|
|
||||||
// ctx.VDODO.methods.transfer(account1,decimalStr("0.1")).send(ctx.sendParam(account0)),
|
|
||||||
// "vDODOToken: not allowed transfer"
|
|
||||||
// )
|
|
||||||
// assert.equal(
|
|
||||||
// await ctx.VDODO.methods.balanceOf(account0).call(),
|
|
||||||
// decimalStr("0.1")
|
|
||||||
// );
|
|
||||||
// assert.equal(
|
|
||||||
// await ctx.VDODO.methods.balanceOf(account1).call(),
|
|
||||||
// decimalStr("0")
|
|
||||||
// );
|
|
||||||
|
|
||||||
// });
|
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user