mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
fix nft get data
This commit is contained in:
parent
4cfd469c61
commit
c8554073c3
@ -722,7 +722,7 @@ export class Nft extends SmartContract {
|
|||||||
|
|
||||||
const nftContract = this.getContract(nftAddress)
|
const nftContract = this.getContract(nftAddress)
|
||||||
|
|
||||||
const keyHash = ethers.utils.keccak256(ethers.utils.toUtf8Bytes(key))
|
const keyHash = ethers.utils.keccak256(key)
|
||||||
const valueHex = ethers.utils.hexlify(ethers.utils.toUtf8Bytes(value))
|
const valueHex = ethers.utils.hexlify(ethers.utils.toUtf8Bytes(value))
|
||||||
|
|
||||||
const estGas = await nftContract.estimateGas.setNewData(keyHash, valueHex)
|
const estGas = await nftContract.estimateGas.setNewData(keyHash, valueHex)
|
||||||
|
@ -674,7 +674,7 @@ describe('NFT', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('#setData - should FAIL to set a value into 725Y standard, if Caller has NOT store updater permission', async () => {
|
it('#setData - should FAIL to set a value into 725Y standard, if Caller has NOT store updater permission', async () => {
|
||||||
const key = 'KEY'
|
const key = '0x1234'
|
||||||
const data = 'NewData'
|
const data = 'NewData'
|
||||||
assert(
|
assert(
|
||||||
(await nftDatatoken.getNftPermissions(nftAddress, await user1.getAddress()))
|
(await nftDatatoken.getNftPermissions(nftAddress, await user1.getAddress()))
|
||||||
@ -690,7 +690,7 @@ describe('NFT', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('#setData - should set a value into 725Y standard, if Caller has store updater permission', async () => {
|
it('#setData - should set a value into 725Y standard, if Caller has store updater permission', async () => {
|
||||||
const key = 'KEY'
|
const key = '0x1234'
|
||||||
const data = 'NewData'
|
const data = 'NewData'
|
||||||
|
|
||||||
// add store updater permission
|
// add store updater permission
|
||||||
|
Loading…
x
Reference in New Issue
Block a user