Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.3.0 #76

Merged
merged 7 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@itheum/sdk-mx-data-nft",
"version": "2.2.0",
"version": "2.3.0",
"description": "SDK for Itheum's Data NFT Technology on MultiversX Blockchain",
"main": "out/index.js",
"types": "out/index.d.js",
Expand Down
135 changes: 95 additions & 40 deletions src/abis/data-nft-lease.abi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@
"buildInfo": {
"rustc": {
"version": "1.71.0-nightly",
"commitHash": "7f94b314cead7059a71a265a8b64905ef2511796",
"commitDate": "2023-04-23",
"commitHash": "a2b1646c597329d0a25efa3889b66650f65de1de",
"commitDate": "2023-05-25",
"channel": "Nightly",
"short": "rustc 1.71.0-nightly (7f94b314c 2023-04-23)"
"short": "rustc 1.71.0-nightly (a2b1646c5 2023-05-25)"
},
"contractCrate": {
"name": "data-nft-lease",
"version": "1.0.0"
},
"framework": {
"name": "multiversx-sc",
"version": "0.43.2"
"version": "0.43.5"
}
},
"name": "DataNftMint",
"constructor": {
"inputs": [
{
"name": "administrator",
"type": "optional<Address>",
"name": "setup_values",
"type": "optional<multi<Address,Address>>",
"multi_arg": true
}
],
Expand Down Expand Up @@ -196,7 +196,7 @@
"outputs": []
},
{
"name": "setAntiSpamTax",
"name": "setMintTaxFee",
"mutability": "mutable",
"inputs": [
{
Expand Down Expand Up @@ -294,26 +294,6 @@
],
"outputs": []
},
{
"name": "setTax",
"onlyOwner": true,
"mutability": "mutable",
"inputs": [
{
"name": "itheum_address",
"type": "Address"
},
{
"name": "tax",
"type": "BigUint"
}
],
"outputs": [
{
"type": "BigUint"
}
]
},
{
"name": "setClaimsAddress",
"mutability": "mutable",
Expand Down Expand Up @@ -375,6 +355,16 @@
}
]
},
{
"name": "getTaxTokens",
"mutability": "readonly",
"inputs": [],
"outputs": [
{
"type": "EgldOrEsdtTokenIdentifier"
}
]
},
{
"name": "getTaxIsRequired",
"mutability": "readonly",
Expand Down Expand Up @@ -561,17 +551,7 @@
]
},
{
"name": "getItheumTax",
"mutability": "readonly",
"inputs": [],
"outputs": [
{
"type": "BigUint"
}
]
},
{
"name": "getItheumTaxAddress",
"name": "getRoyaltiesAddress",
"mutability": "readonly",
"inputs": [],
"outputs": [
Expand All @@ -581,7 +561,7 @@
]
},
{
"name": "getClaimsAddress",
"name": "getFactoryAddress",
"mutability": "readonly",
"inputs": [],
"outputs": [
Expand Down Expand Up @@ -697,6 +677,67 @@
}
],
"outputs": []
},
{
"name": "check_claims",
"mutability": "mutable",
"inputs": [
{
"name": "address_to_check",
"type": "Address"
}
],
"outputs": [
{
"type": "BigUint"
}
]
},
{
"name": "get_claims",
"mutability": "mutable",
"inputs": [],
"outputs": []
},
{
"name": "factory_treasury_address",
"mutability": "mutable",
"inputs": [],
"outputs": [
{
"type": "Address"
}
]
},
{
"name": "factory_tax",
"mutability": "mutable",
"inputs": [],
"outputs": [
{
"type": "BigUint"
}
]
},
{
"name": "factory_claims_contract_address",
"mutability": "mutable",
"inputs": [],
"outputs": [
{
"type": "Address"
}
]
},
{
"name": "factory_claims_token_identifier",
"mutability": "mutable",
"inputs": [],
"outputs": [
{
"type": "TokenIdentifier"
}
]
}
],
"events": [
Expand Down Expand Up @@ -816,7 +857,7 @@
]
},
{
"identifier": "antiSpamTaxSet",
"identifier": "mintTaxFee",
"inputs": [
{
"name": "token",
Expand Down Expand Up @@ -860,6 +901,16 @@
}
]
},
{
"identifier": "setFactoryAddress",
"inputs": [
{
"name": "factory_address",
"type": "Address",
"indexed": true
}
]
},
{
"identifier": "pauseCollection",
"inputs": [
Expand Down Expand Up @@ -1039,6 +1090,10 @@
{
"name": "administrator_address",
"type": "Address"
},
{
"name": "tax_token",
"type": "EgldOrEsdtTokenIdentifier"
}
]
},
Expand Down
4 changes: 3 additions & 1 deletion src/datanft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,9 @@ export class DataNft {
mvxNativeAuthOriginsToBase64 = mvxNativeAuthOriginsToBase64
.trim()
.replaceAll(' ', ''); // remove all spaces
mvxNativeAuthOriginsToBase64 = window.btoa(mvxNativeAuthOriginsToBase64); // convert to base64
mvxNativeAuthOriginsToBase64 = Buffer.from(
mvxNativeAuthOriginsToBase64
).toString('base64');

// construct the api url
let url = `${this.dataMarshal}/access?NFTId=${
Expand Down
1 change: 1 addition & 0 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,5 @@ export interface ContractConfiguration {
rolesAreSet: boolean;
claimsAddress: string;
administratorAddress: string;
taxToken: string;
}
2 changes: 1 addition & 1 deletion src/minter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export abstract class Minter {
.setFunction(new ContractFunction('setLocalRoles'))
.build(),
receiver: this.contract.getAddress(),
gasLimit: 90000000,
gasLimit: 100000000,
sender: senderAddress,
chainID: this.chainID
});
Expand Down
5 changes: 3 additions & 2 deletions src/nft-minter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class NftMinter extends Minter {
value: 50000000000000000,
data: data,
receiver: this.contract.getAddress(),
gasLimit: 50000000,
gasLimit: 100000000,
sender: senderAddress,
chainID: this.chainID
});
Expand Down Expand Up @@ -453,7 +453,8 @@ export class NftMinter extends Minter {
isContractPaused: returnValue?.is_paused as boolean,
rolesAreSet: returnValue?.roles_are_set as boolean,
claimsAddress: returnValue?.claims_address.toString(),
administratorAddress: returnValue?.administrator_address.toString()
administratorAddress: returnValue?.administrator_address.toString(),
taxToken: returnValue?.tax_token.toString()
};
return contractConfiguration;
} else {
Expand Down