BlockchainContractValue[caddr]
gets the result obtained from a Wolfram expression contract at blockchain address caddr.
BlockchainContractValue[caddr,prop]
gets the property prop of the result obtained from a Wolfram expression contract with address caddr.
BlockchainContractValue[caddr,func]
calls the function func of a contract with address caddr.
BlockchainContractValue[caddr,assoc]
calls a contract with address caddr with the properties defined in Association assoc.
BlockchainContractValue
Versions for specific blockchains »BlockchainContractValue[caddr]
gets the result obtained from a Wolfram expression contract at blockchain address caddr.
BlockchainContractValue[caddr,prop]
gets the property prop of the result obtained from a Wolfram expression contract with address caddr.
BlockchainContractValue[caddr,func]
calls the function func of a contract with address caddr.
BlockchainContractValue[caddr,assoc]
calls a contract with address caddr with the properties defined in Association assoc.
Details and Options
- BlockchainContractValue takes the following options:
-
BlockchainBase $BlockchainBase blockchain and network to use MaxItems 20 maximum number of items to return - BlockchainContractValue extracts a contract from a blockchain, then runs the specified function in it. It cannot write data to a blockchain; this requires BlockchainTransactionSubmit.
Examples
open all close allBasic Examples (6)
Verify the total supply of OmiseGo tokens using its address:
omgtoken = First[BlockchainTokenData["OMGToken", "TokenAddress", BlockchainBase -> {"Ethereum", "Mainnet"}]]BlockchainContractValue[omgtoken, Typed["totalSupply", "uint256"], BlockchainBase -> {"Ethereum", "Mainnet"}]Check the balance of OMG tokens of a certain holder:
omgtoken = First[BlockchainTokenData["OMGToken", "TokenAddress", BlockchainBase -> {"Ethereum", "Mainnet"}]]sender = RandomChoice[First[BlockchainTokenData["OMGToken", "TransferList", BlockchainBase -> "Ethereum"]]]["Sender"]BlockchainContractValue[omgtoken, <|"Function" -> Typed["balanceOf", "address" -> "uint256"], "Inputs" -> sender|>, BlockchainBase -> {"Ethereum", "Mainnet"}]Check the auction of CryptoKitty with Token ID 883551:
BlockchainContractValue["b1690C08E213a35Ed9bAb7B318DE14420FB57d8C", <|"Function" -> Typed["getAuction", "uint256" -> {"address", "uint256", "uint256", "uint256", "uint256"}], "Inputs" -> 883551|>, BlockchainBase -> {"Ethereum", "Mainnet"}]Call the function owner, given an address:
BlockchainContractValue["9850711951a84ef8a2a31a7868d0dca34b0661ca", Typed["owner", "address"], BlockchainBase -> "Bloxberg"]Get the storage of the USDtz Tezos token contract:
BlockchainContractValue["KT1LN4LPSqTMS7Sd2CJw4bbDGRkMv2t68Fy9", BlockchainBase -> "Tezos"]Get the total supply of tokens of the USDtz token contract using an annotation:
BlockchainContractValue["KT1LN4LPSqTMS7Sd2CJw4bbDGRkMv2t68Fy9", "totalSupply", BlockchainBase -> "Tezos"]Options (3)
BlockchainBase (2)
Mainnet (1)
History
Text
Wolfram Research (2019), BlockchainContractValue, Wolfram Language function, https://reference.wolfram.com/language/ref/BlockchainContractValue.html.
CMS
Wolfram Language. 2019. "BlockchainContractValue." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BlockchainContractValue.html.
APA
Wolfram Language. (2019). BlockchainContractValue. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BlockchainContractValue.html
BibTeX
@misc{reference.wolfram_2026_blockchaincontractvalue, author="Wolfram Research", title="{BlockchainContractValue}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/BlockchainContractValue.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_blockchaincontractvalue, organization={Wolfram Research}, title={BlockchainContractValue}, year={2019}, url={https://reference.wolfram.com/language/ref/BlockchainContractValue.html}, note=[Accessed: 13-June-2026]}