Metadata about a smart contract on the blockchain.
|Property Name||Return Type||Description||Tags|
| || ||The address of the contract.||Read-Only|
| || ||The name of the contract, if it has one.||Read-Only|
| || ||The description of the contract, if it has one.||Read-Only|
| || ||An abbreviated name for the contract.||Read-Only|
| || ||The number of tokens contained in the contract, if available.||Read-Only|
MekaVerse is an NFT collection with 8,888 unique mechas. The following example shows how to fetch metadata on the MekaVerse NFT contract. The script sits in the hierarchy as a child of a
UI Text, which it uses for setting the collection's description. Other contract properties are output to the Event Log.
-- Address to the smart contract behind the MekaVerse NFT collection -- https://etherscan.io/address/0x9a534628b4062e123ce7ee2222ec20b86e16ca8f local UI_TEXT = script.parent local SMART_CONTRACT_ADDRESS = "0x9a534628b4062e123ce7ee2222ec20b86e16ca8f" local contract = Blockchain.GetContract(SMART_CONTRACT_ADDRESS) UI_TEXT.text = contract.description print("address: " .. contract.address) print("count: " .. contract.count) print("name: " .. contract.name) print("symbol: " .. contract.symbol) print("description: " .. contract.description)
See also: Blockchain.GetContract | CoreObject.parent | UIText.text
Last update: June 5, 2022