update buyout

This commit is contained in:
owen05
2021-04-28 15:07:28 +08:00
parent fd0790fb44
commit 2485ab6b56
4 changed files with 30 additions and 7 deletions

View File

@@ -285,13 +285,14 @@ describe("DODONFT", () => {
await getUserBalance(fragAddress, fragInstance, ctx.USDT, "FRAG Before");
var requireQuote = await fragInstance.methods.getBuyoutRequirement().call();
await logGas(await ctx.NFTProxy.methods.buyout(fragAddress, requireQuote, 0), ctx.sendParam(buyer), "buyout");
await logGas(await ctx.NFTProxy.methods.buyout(fragAddress, requireQuote, 0, Math.floor(new Date().getTime() / 1000 + 60 * 10)), ctx.sendParam(buyer), "buyout");
let [authorFrag, authorQuote] = await getUserBalance(author, fragInstance, ctx.USDT, "Author After");
await getUserBalance(buyer, fragInstance, ctx.USDT, "Buyer After");
await getUserBalance(dvmAddress, fragInstance, ctx.USDT, "DVM After");
await getUserBalance(fragAddress, fragInstance, ctx.USDT, "FRAG After");
assert(authorQuote, "2034932000");
// assert(authorQuote, "2034932000");
assert(authorQuote, "10174055148");
assert(authorFrag, "0");
var vaultNewOwner = await vaultInstance.methods._OWNER_().call();