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
{{ message }}
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
The following issues have been noticed in LIP 0052 (with the second bullet point in 1. also present in LIP 0051):
Regarding the execution of the cross-chain transfer CCM on the foreign chain:
There is no fee charged in the case of ccm.status != CCM_STATUS_CODE_OK. This means that NFT can be transferred cross-chain to the foreign chain's sender address for free if the CCM status is different than CCM_STATUS_CODE_OK.
For clarity, event data for EVENT_NAME_CCM_TRANSFER should include also receivignChainID and sendingChainID, especially for reasons mentioned above.
The recover function will crash if the corresponding NFT substore entry does not exist.
Create and destroy events have inconsistent event data.
The supportAllNFTs function should first check if ALL_SUPPORTED_NFTS_KEY key is already present in the supported NFTs substore.
During the CCM execution on the receiving foreign chain, fee is not charged in the case of ccm.status != CCM_STATUS_CODE_OK. Also, receivingChainID and sendingChainID are not in the event data, i.e. in the ccmTransferEventDataSchema for the event EVENT_NAME_CCM_TRANSFER.
There is no check if the corresponding NFT substore entry exists.
The create event has address, nftID, and collectionID data fields, while destroy has address and nftID data fields.
There is no check if ALL_SUPPORTED_NFTS_KEY key is already present in the supported NFTs substore.
There is no check to ensure that chainID is not equal to OWN_CHAIN_ID.
Proposed Specifications
Add the Fee.payFee method to the code that handles the CCM execution on the foreign receiving chain when ccm.status != CCM_STATUS_CODE_OK:
Fee.payFee(FEE_CREATE_NFT)
Also, add the receivingChainID and sendingChainID in the ccmTransferEventDataSchema for the event EVENT_NAME_CCM_TRANSFER event and update the corresponding code in execution of the cross-chain transfer CCM.
Add the following code to the recover function:
try:
nft = getNFT(nftID)
except:
emitFailedRecoverEvent(terminatedChainID, nftID, RESULT_NFT_NOT_FOUND)
raise Exception("NFT substore entry does not exist")
Also, use the new nft in the code of the recover function where applicable.
Remove collectionID as a data field from the create event.
In supportAllNFTs function, add the following code:
if supportedNFTsStore[ALL_SUPPORTED_NFTS_KEY] exists:
return
In removeSupportAllNFTsFromCollection function, add the following code:
if chainID == OWN_CHAIN_ID:
raise Exception("Invalid operation. Support for native NFTs cannot be removed.")
Affected LIPs
0052
The text was updated successfully, but these errors were encountered:
Motivation
The following issues have been noticed in LIP 0052 (with the second bullet point in 1. also present in LIP 0051):
ccm.status != CCM_STATUS_CODE_OK
. This means that NFT can be transferred cross-chain to the foreign chain's sender address for free if the CCM status is different thanCCM_STATUS_CODE_OK
.EVENT_NAME_CCM_TRANSFER
should include alsoreceivignChainID
andsendingChainID
, especially for reasons mentioned above.ALL_SUPPORTED_NFTS_KEY
key is already present in the supported NFTs substore.ChainID
argument is not equal toOWN_CHAIN_ID
.Current Specifications
ccm.status != CCM_STATUS_CODE_OK
. Also,receivingChainID
andsendingChainID
are not in the event data, i.e. in theccmTransferEventDataSchema
for the eventEVENT_NAME_CCM_TRANSFER
.create
event hasaddress
,nftID
, andcollectionID
data fields, whiledestroy
hasaddress
andnftID
data fields.ALL_SUPPORTED_NFTS_KEY
key is already present in the supported NFTs substore.chainID
is not equal toOWN_CHAIN_ID
.Proposed Specifications
Fee.payFee
method to the code that handles the CCM execution on the foreign receiving chain whenccm.status != CCM_STATUS_CODE_OK
:Also, add the
receivingChainID
andsendingChainID
in theccmTransferEventDataSchema
for the eventEVENT_NAME_CCM_TRANSFER
event and update the corresponding code in execution of the cross-chain transfer CCM.recover
function:Also, use the new
nft
in the code of the recover function where applicable.Remove
collectionID
as a data field from thecreate
event.In
supportAllNFTs
function, add the following code:removeSupportAllNFTsFromCollection
function, add the following code:Affected LIPs
0052
The text was updated successfully, but these errors were encountered: