add buyout extend

This commit is contained in:
owen05
2021-06-17 14:04:46 +08:00
parent 1ce8eec5f5
commit 40a4c081de
11 changed files with 138 additions and 26 deletions

View File

@@ -276,6 +276,8 @@ describe("DODONFT", () => {
await mockTrade(ctx, dvmAddress, dvmInstance, fragInstance);
await fragInstance.methods.transfer(buyer, decimalStr("1002")).send(ctx.sendParam(author));
await getUserBalance(author, fragInstance, ctx.USDT, "Author Before");
await getUserBalance(buyer, fragInstance, ctx.USDT, "Buyer Before");
await getUserBalance(dvmAddress, fragInstance, ctx.USDT, "DVM Before");

View File

@@ -63,6 +63,7 @@ export const CONST_FEE_RATE_MODEL_NAME = "ConstFeeRateModel"
export const NFT_TOKEN_FACTORY = "NFTTokenFactory"
export const NFT_REGISTER = "DODONFTRegistry"
export const NFT_PROXY = "DODONFTProxy"
export const BUYOUT_MODEL = "BuyoutModel"
export const RANDOM_GENERATOR = "RandomGenerator"
export const MYSTERY_BOX_V1 = "DODODropsV1"
@@ -73,6 +74,7 @@ export const DROPS_ERC1155 = "DropsERC1155"
export const DROPS_FEE_MODEL = "DropsFeeModel"
export const DROPS_PROXY = "DODODropsProxy"
interface ContractJson {
abi: any;
networks: { [network: number]: any };

View File

@@ -28,6 +28,7 @@ export class NFTContext {
NFTRegister: Contract;
CollatteralVault: Contract;
Fragment: Contract;
BuyoutModel: Contract;
NFTProxy: Contract;
DODOApprove: Contract;
@@ -102,7 +103,9 @@ export class NFTContext {
contracts.NFT_VAULT
);
this.Fragment = await contracts.newContract(contracts.NFT_FRAG)
this.Fragment = await contracts.newContract(contracts.NFT_FRAG);
this.BuyoutModel = await contracts.newContract(contracts.BUYOUT_MODEL);
this.NFTProxy = await contracts.newContract(contracts.NFT_PROXY,
[
@@ -110,6 +113,7 @@ export class NFTContext {
this.WETH.options.address,
this.DODOApproveProxy.options.address,
this.Deployer,
this.BuyoutModel.options.address,
this.mtFeeRateModel.options.address,
this.CollatteralVault.options.address,
this.Fragment.options.address,