Skip to content
VerifiedXVerifiedX Docs
verifiedx.io
verifiedx.io

Evolving NFTs

For NFTs that have the minter-controlled evolution feature enabled, they can be evolved by the minter even if they are no longer the owner.

GET http://localhost:7292/scapi/scv1/EvolveSpecific/{id}/{address}/{stage}

id: The smart contract identifier

address: The current owner’s VFX address

stage: the stage to evolve to (the original stage is 0)

The node returns the evolve transaction. The minter’s account signs it and pays the network fee. The node returns the text Failed to Change State - TX when the minter’s address is not in this node’s wallet, address is not the current owner, the stage does not exist, or the minter’s balance cannot cover the fee.

{
"Hash": "abcdfg...",
"ToAddress": "Rabc123...",
"FromAddress": "Rabc123...",
"Amount": 0.0,
"Nonce": 12,
"Fee": 0.00000883,
"Timestamp": 0000000000,
"Data": "[{\"Function\":\"ChangeEvolveStateSpecific()\",\"ContractUID\":\"…\",\"FromAddress\":\"Rabc123...\",\"ToAddress\":\"Rabc123...\",\"NewEvoState\":1,\"Data\":\"…\"}]",
"UnlockTime": null,
"Signature": "AbCdF...",
"Height": 0,
"TransactionType": 3,
"TransactionRating": null,
"TransactionStatus": 0
}
const evolveNft = async (smartContractUid, address, stage) => {
const url = `${CLI_BASE_URL}/scapi/scv1/EvolveSpecific/${smartContractUid}/${address}/${stage}`;
const request = await fetch(url);
const data = await request.json();
return data["Hash"];
};

The node can also move an NFT one stage forward or back. The same rules apply: the minter’s account must be in this node’s wallet, address must be the current owner, and the minter signs and pays the network fee.

GET http://localhost:7292/scapi/scv1/Evolve/{id}/{address}
GET http://localhost:7292/scapi/scv1/Devolve/{id}/{address}

id: The smart contract identifier

address: The current owner’s VFX address

The signed transaction, in the same shape as above. On failure the node returns the text Failed to Evolve - TX or Failed to Devolve - TX.