@refinableco/refinable-sdk
Advanced tools
Comparing version 4.2.10-next.0 to 4.2.11-next.0
@@ -46,3 +46,3 @@ "use strict"; | ||
if (params.previewFile && typeof params.previewFile !== "string") { | ||
params.previewFile = yield this.refinable.uploadFile(params.previewFile); | ||
previewFile = yield this.refinable.uploadFile(params.previewFile); | ||
} | ||
@@ -108,3 +108,3 @@ const contract = yield this.getContract(contractAddress); | ||
if (params.previewFile && typeof params.previewFile !== "string") { | ||
params.previewFile = yield this.refinable.uploadFile(params.previewFile); | ||
previewFile = yield this.refinable.uploadFile(params.previewFile); | ||
} | ||
@@ -111,0 +111,0 @@ const response = yield this.refinable.graphqlClient.request(sale_1.UPDATE_MINT_OFFER, { |
@@ -73,10 +73,3 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const chainId = yield this.refinable.evm.signer.getChainId(); | ||
// 1. Deploy contract | ||
const { contract, contractAbi } = yield this.deploy(chainId, type, Object.assign(Object.assign({}, params.contractArguments), { symbol: params.symbol, name: params.name })); | ||
const receipt = yield contract.deployTransaction.wait(); | ||
const deployTx = new EvmTransaction_1.default(receipt, this.refinable.evm.provider); | ||
// 2. Register contract | ||
const { id: contractId, contract: registeredContract } = yield this.refinable.evm.contracts.registerContract(chainId, type, contract.address, JSON.stringify(contractAbi)); | ||
// 3. Upload banner and avatar | ||
// 1. Upload banner and avatar if needed | ||
if (params.avatar && typeof params.avatar !== "string") { | ||
@@ -88,2 +81,9 @@ params.avatar = yield this.refinable.uploadFile(params.avatar); | ||
} | ||
const chainId = (yield this.refinable.evm.provider.getNetwork()).chainId; | ||
// 2. Deploy contract | ||
const { contract, contractAbi } = yield this.deploy(chainId, type, Object.assign(Object.assign({}, params.contractArguments), { symbol: params.symbol, name: params.name })); | ||
const receipt = yield contract.deployTransaction.wait(); | ||
const deployTx = new EvmTransaction_1.default(receipt, this.refinable.evm.provider); | ||
// 3. Register contract | ||
const { id: contractId, contract: registeredContract } = yield this.refinable.evm.contracts.registerContract(chainId, type, contract.address, JSON.stringify(contractAbi)); | ||
const createCollectionData = Object.assign(Object.assign({}, (0, omit_1.default)(params, "contractArguments")), { avatar: params.avatar, banner: params.banner, tokenType: registeredContract.getTokenType(), contractId, | ||
@@ -90,0 +90,0 @@ chainId, contractAddress: registeredContract.contractAddress }); |
{ | ||
"name": "@refinableco/refinable-sdk", | ||
"version": "4.2.10-next.0", | ||
"version": "4.2.11-next.0", | ||
"description": "The Refinable SDK allows you to easily interact with the Refinable Marketplace to mint, sell and buy NFTs", | ||
@@ -25,20 +25,20 @@ "main": "./lib/index.js", | ||
"eth-rpc-errors": "^4.0.3", | ||
"ethers": "^5.6.9", | ||
"ethers": "^5.7.0", | ||
"eventemitter3": "^4.0.7", | ||
"form-data": "^4.0.0", | ||
"graphql": "^16.2.0", | ||
"graphql-request": "^4.0.0", | ||
"graphql": "^16.6.0", | ||
"graphql-request": "^5.0.0", | ||
"lodash.omit": "^4.5.0", | ||
"merge-options-default": "^1.0.2", | ||
"semver": "^7.3.5", | ||
"web3-utils": "^1.7.3", | ||
"web3-utils": "^1.7.5", | ||
"zod": "^3.17.9" | ||
}, | ||
"devDependencies": { | ||
"@graphql-codegen/add": "^3.0.0", | ||
"@graphql-codegen/cli": "^2.0.1", | ||
"@graphql-codegen/fragment-matcher": "^3.0.0", | ||
"@graphql-codegen/introspection": "^2.0.0", | ||
"@graphql-codegen/typescript": "^2.0.0", | ||
"@graphql-codegen/typescript-operations": "^2.0.1", | ||
"@graphql-codegen/add": "^3.2.1", | ||
"@graphql-codegen/cli": "^2.12.0", | ||
"@graphql-codegen/fragment-matcher": "^3.3.1", | ||
"@graphql-codegen/introspection": "^2.2.1", | ||
"@graphql-codegen/typescript": "^2.7.3", | ||
"@graphql-codegen/typescript-operations": "^2.5.3", | ||
"@swc-node/jest": "^1.4.3", | ||
@@ -45,0 +45,0 @@ "@types/dotenv": "^8.2.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
738808
13814
+ Added@graphql-typed-document-node/core@3.2.0(transitive)
+ Addedgraphql-request@5.2.0(transitive)
- Removedgraphql-request@4.3.0(transitive)
Updatedethers@^5.7.0
Updatedgraphql@^16.6.0
Updatedgraphql-request@^5.0.0
Updatedweb3-utils@^1.7.5