You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a careful code review, we think it is better not to change the 64 limit, which is a so breaking change.
Instead, we think we can change the data structure. We will change the current tokenSym + owner -> tokenId -> metaData map, to two maps, the first is tokenSym -> owner -> tokenId, the second is tokenSym -> tokenId -> metaData. This will be a less breaking change.
Currently, there is a limit for key of storage which is [1, 64] lengths.
However, it must be increased for transferring NFT token to contract.
I found this issue while I'm sending my NFT token to contract.
go-iost/vm/native/token721.go
Line 281 in bc33008
Please see the code below, this code is run while calling 'token721.iost', 'transfer'.
Token721MetadataMapPrefix+tokenSym+Token721MetadataKeySeparator+to
Let's see this one.
My NFT's tokenSym is:
uniqueasset
'to' is set to some contractAddress:
ContractCCx8LpBwqLdQCsrQ7hEPu8dTnd4zKFTu5jzojvAM75W6
When it is combined,
"T721M" + "uniqueasset" + "#" + "ContractCCx8LpBwqLdQCsrQ7hEPu8dTnd4zKFTu5jzojvAM75W6"
The length exceeds [1, 64] boundary which is the reason why the transaction like this (https://www.iostabc.com/tx/7oDnRgb9XEhzsAR9JZAfLma8j89zUBvsAXJNrr7VwrHj) was failed.
To activate NFT ecosystem in IOST, there would be many scenario for transferring NFT to contract, for example NFT market.
So the key length limit must be increased.
@sswsdsn @mlj1991 @flybikeGx @ziranliu @lispc @lileicool1
The text was updated successfully, but these errors were encountered: