difftreelog
feat add test for market v2 deployment
in: master
8 files changed
tests/package.jsondiffbeforeafterboth125 "license": "SEE LICENSE IN ../LICENSE",125 "license": "SEE LICENSE IN ../LICENSE",126 "homepage": "",126 "homepage": "",127 "dependencies": {127 "dependencies": {128 "@openzeppelin/contracts": "^4.9.0",128 "@polkadot/api": "10.7.2",129 "@polkadot/api": "10.7.2",129 "@polkadot/rpc-core": "^10.7.2",130 "@polkadot/rpc-core": "^10.7.2",130 "@polkadot/util": "12.2.1",131 "@polkadot/util": "12.2.1",131 "@polkadot/util-crypto": "12.2.1",132 "@polkadot/util-crypto": "12.2.1",132 "@polkadot/wasm-crypto-asmjs": "^7.2.1",133 "@polkadot/wasm-crypto-asmjs": "^7.2.1",133 "@polkadot/wasm-crypto-wasm": "^7.2.1",134 "@polkadot/wasm-crypto-wasm": "^7.2.1",134 "chai-as-promised": "^7.1.1",135 "chai-like": "^1.1.1",135 "chai-like": "^1.1.1",136 "csv-writer": "^1.6.0",136 "csv-writer": "^1.6.0",137 "find-process": "^1.4.7",137 "find-process": "^1.4.7",tests/src/eth/marketplace-v2/Market.soldiffbeforeafterbothno changes
tests/src/eth/marketplace-v2/marketplace.test.tsdiffbeforeafterbothno changes
tests/src/eth/marketplace-v2/royalty/LibPart.soldiffbeforeafterbothno changes
tests/src/eth/marketplace-v2/royalty/UniqueRoyalty.soldiffbeforeafterbothno changes
tests/src/eth/marketplace-v2/royalty/UniqueRoyaltyHelper.soldiffbeforeafterbothno changes
tests/src/eth/marketplace-v2/utils.soldiffbeforeafterbothno changes
tests/src/eth/util/playgrounds/unique.dev.tsdiffbeforeafterboth102 };102 };103 }103 }104104105 async deployByCode(signer: string, name: string, src: string, imports?: ContractImports[], gas?: number): Promise<Contract> {105 async deployByCode(signer: string, name: string, src: string, imports?: ContractImports[], gas?: number, args?: any[]): Promise<Contract> {106 const compiledContract = await this.compile(name, src, imports);106 const compiledContract = await this.compile(name, src, imports);107 return this.deployByAbi(signer, compiledContract.abi, compiledContract.object, gas);107 return this.deployByAbi(signer, compiledContract.abi, compiledContract.object, gas, args);108 }108 }109109110 async deployByAbi(signer: string, abi: any, object: string, gas?: number): Promise<Contract> {110 async deployByAbi(signer: string, abi: any, object: string, gas?: number, args?: any[]): Promise<Contract> {111 const web3 = this.helper.getWeb3();111 const web3 = this.helper.getWeb3();112 const contract = new web3.eth.Contract(abi, undefined, {112 const contract = new web3.eth.Contract(abi, undefined, {113 data: object,113 data: object,114 from: signer,114 from: signer,115 gas: gas ?? this.helper.eth.DEFAULT_GAS,115 gas: gas ?? this.helper.eth.DEFAULT_GAS,116 });116 });117 return await contract.deploy({data: object}).send({from: signer});117 return await contract.deploy({data: object, arguments: args}).send({from: signer});118 }118 }119119120}120}