nft test finish
This commit is contained in:
@@ -64,7 +64,7 @@ module.exports = {
|
||||
//================== NFT ====================
|
||||
ConstFeeRateModel: "0xBDAcEcF886a4F0C509260d9678D5673C3E8fa4b7",
|
||||
FeeDistributor: "0xdE39C2901e72A883f7446951fB533219F3622b87",
|
||||
Fragment: "0x64193839f8b6e85A257411a945085783cbA9976B",
|
||||
Fragment: "0x40F3bBe2f8C5F2E5f4adFf7d51f652F2B9F77315",
|
||||
NFTCollateralVault: "0xFDf7604649dfBb733e784afAEdC19892706cc683",
|
||||
DODONFTRouteHelper: "0xAE683548702be6d651e179e5F9313272bb18596A",
|
||||
|
||||
|
||||
@@ -132,82 +132,11 @@ DODOApproveProxy unlockAddProxy tx: 0xb8472dd2df9baeeff89d982299cbfc2d90e18c20b
|
||||
DODOApproveProxy addDODOProxy tx: 0x8aa82620b6735ddfad0d55d3e9a752c3056e7d83664077e0240c0215a2e0017d
|
||||
Add AdminList on DODONFTRegistry Tx: 0x20f41302401122d950049e66458f307257743c0d395e06af607215b0f2532643
|
||||
====================================================
|
||||
network type: development
|
||||
Deploy time: 2021/4/12 下午9:22:30
|
||||
network type: kovan
|
||||
Deploy time: 2021/4/13 下午3:42:04
|
||||
Deploy type: NFT
|
||||
multiSigAddress: undefined
|
||||
====================================================
|
||||
network type: development
|
||||
Deploy time: 2021/4/13 下午1:11:34
|
||||
Deploy type: NFT
|
||||
multiSigAddress: undefined
|
||||
====================================================
|
||||
network type: development
|
||||
Deploy time: 2021/4/13 下午1:14:33
|
||||
Deploy type: NFT
|
||||
multiSigAddress: undefined
|
||||
====================================================
|
||||
network type: development
|
||||
Deploy time: 2021/4/13 下午1:16:02
|
||||
Deploy type: NFT
|
||||
multiSigAddress: undefined
|
||||
====================================================
|
||||
network type: development
|
||||
Deploy time: 2021/4/13 下午1:23:01
|
||||
Deploy type: NFT
|
||||
multiSigAddress: undefined
|
||||
====================================================
|
||||
network type: development
|
||||
Deploy time: 2021/4/13 下午1:25:16
|
||||
Deploy type: NFT
|
||||
multiSigAddress: undefined
|
||||
====================================================
|
||||
network type: development
|
||||
Deploy time: 2021/4/13 下午1:26:59
|
||||
Deploy type: NFT
|
||||
multiSigAddress: undefined
|
||||
====================================================
|
||||
network type: development
|
||||
Deploy time: 2021/4/13 下午1:51:35
|
||||
Deploy type: NFT
|
||||
multiSigAddress: undefined
|
||||
====================================================
|
||||
network type: development
|
||||
Deploy time: 2021/4/13 下午1:53:57
|
||||
Deploy type: NFT
|
||||
multiSigAddress: undefined
|
||||
====================================================
|
||||
network type: development
|
||||
Deploy time: 2021/4/13 下午2:35:23
|
||||
Deploy type: NFT
|
||||
multiSigAddress: undefined
|
||||
====================================================
|
||||
network type: development
|
||||
Deploy time: 2021/4/13 下午2:42:02
|
||||
Deploy type: NFT
|
||||
multiSigAddress: undefined
|
||||
====================================================
|
||||
network type: development
|
||||
Deploy time: 2021/4/13 下午2:43:47
|
||||
Deploy type: NFT
|
||||
multiSigAddress: undefined
|
||||
====================================================
|
||||
network type: development
|
||||
Deploy time: 2021/4/13 下午2:50:26
|
||||
Deploy type: NFT
|
||||
multiSigAddress: undefined
|
||||
====================================================
|
||||
network type: development
|
||||
Deploy time: 2021/4/13 下午2:53:12
|
||||
Deploy type: NFT
|
||||
multiSigAddress: undefined
|
||||
====================================================
|
||||
network type: development
|
||||
Deploy time: 2021/4/13 下午2:56:12
|
||||
Deploy type: NFT
|
||||
multiSigAddress: undefined
|
||||
====================================================
|
||||
network type: development
|
||||
Deploy time: 2021/4/13 下午3:11:16
|
||||
Deploy type: NFT
|
||||
multiSigAddress: undefined
|
||||
multiSigAddress: 0x7e83d9d94837eE82F0cc18a691da6f42F03F1d86
|
||||
FragmentAddress: 0x40F3bBe2f8C5F2E5f4adFf7d51f652F2B9F77315
|
||||
DODOApproveProxy unlockAddProxy tx: 0x78c7557de3325d8471bce3715070509a57b9db94e035178b8c65261393f463e1
|
||||
DODOApproveProxy addDODOProxy tx: 0x81723112e50c67f5bb6291bcbf52c8ea8f98c881185bcbf23a763aff29602ee9
|
||||
Add AdminList on DODONFTRegistry Tx: 0x72c664e55a09c59fbd46bd754482b4e56dd04560071e262253b7f7929a76ccb1
|
||||
|
||||
@@ -150,11 +150,11 @@ describe("DODONFT", () => {
|
||||
var erc721Instance = contracts.getContractWithAddress(contracts.ERC721, erc721Address);
|
||||
await erc721Instance.methods.safeTransferFrom(author, vaultAddress, 0).send(ctx.sendParam(author));
|
||||
|
||||
var quoteToken = "0x156595bAF85D5C29E91d959889B022d952190A64";
|
||||
var vaultPreOwner = "0x7e83d9d94837eE82F0cc18a691da6f42F03F1d86";
|
||||
// var stakeToken = "0x854b0f89BAa9101e49Bfb357A38071C9db5d0DFa";
|
||||
// var quoteToken = ctx.USDT.options.address;
|
||||
// var vaultPreOwner = author;
|
||||
// var quoteToken = "0x156595bAF85D5C29E91d959889B022d952190A64";
|
||||
// var vaultPreOwner = "0x7e83d9d94837eE82F0cc18a691da6f42F03F1d86";
|
||||
var quoteToken = ctx.USDT.options.address;
|
||||
var vaultPreOwner = author;
|
||||
|
||||
var stakeToken = "0x0000000000000000000000000000000000000000";
|
||||
|
||||
var dvmParams = [
|
||||
@@ -180,18 +180,18 @@ describe("DODONFT", () => {
|
||||
).encodeABI();
|
||||
console.log("data:", callData);
|
||||
|
||||
// await logGas(await nftVaultInstance.methods.createFragment(
|
||||
// ctx.NFTProxy.options.address,
|
||||
// callData
|
||||
// ), ctx.sendParam(author), "createFragment");
|
||||
await logGas(await nftVaultInstance.methods.createFragment(
|
||||
ctx.NFTProxy.options.address,
|
||||
callData
|
||||
), ctx.sendParam(author), "createFragment");
|
||||
|
||||
// let [fragAddress, , dvmAddress] = await ctx.getRegistry(ctx, vaultAddress);
|
||||
let [fragAddress, , dvmAddress] = await ctx.getRegistry(ctx, vaultAddress);
|
||||
|
||||
// var dvmInstance = contracts.getContractWithAddress(contracts.DVM_NAME, dvmAddress);
|
||||
// var midPrice = await dvmInstance.methods.getMidPrice().call();
|
||||
// assert(midPrice, mweiStr("1"));
|
||||
// let newVaultOwner = await nftVaultInstance.methods._OWNER_().call();
|
||||
// assert(fragAddress, newVaultOwner);
|
||||
var dvmInstance = contracts.getContractWithAddress(contracts.DVM_NAME, dvmAddress);
|
||||
var midPrice = await dvmInstance.methods.getMidPrice().call();
|
||||
assert(midPrice, mweiStr("1"));
|
||||
let newVaultOwner = await nftVaultInstance.methods._OWNER_().call();
|
||||
assert(fragAddress, newVaultOwner);
|
||||
});
|
||||
|
||||
it("stakeToFeeDistributor", async () => {
|
||||
@@ -310,7 +310,7 @@ describe("DODONFT", () => {
|
||||
assert(user1Frag, "0")
|
||||
});
|
||||
|
||||
it.only("withdrawNFTFromVault", async () => {
|
||||
it("withdrawNFTFromVault", async () => {
|
||||
var erc721Address = await ctx.createERC721(ctx, author);
|
||||
var erc1155Address = await ctx.createERC1155(ctx, author,100);
|
||||
var vaultAddress = await ctx.createNFTVault(ctx, author);
|
||||
@@ -330,10 +330,10 @@ describe("DODONFT", () => {
|
||||
assert(nftInfo.tokenId, '0')
|
||||
|
||||
await logGas(await nftVaultInstance.methods.withdrawERC721(erc721Address,0), ctx.sendParam(author), "withdrawERC721");
|
||||
await logGas(await nftVaultInstance.methods.withdrawERC1155(erc1155Address,[0], 50), ctx.sendParam(author), "withdrawERC1155");
|
||||
await logGas(await nftVaultInstance.methods.withdrawERC1155(erc1155Address,[0], [50]), ctx.sendParam(author), "withdrawERC1155");
|
||||
|
||||
await truffleAssert.reverts(
|
||||
await nftVaultInstance.methods.getIdByTokenIdAndAddr(erc721Address, 0).call(),
|
||||
nftVaultInstance.methods.getIdByTokenIdAndAddr(erc721Address, 0).call(),
|
||||
"TOKEN_ID_NOT_FOUND"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user