BlockchainTransaction (for bloxberg)

BlockchainTransaction[assoc]

represents a bloxberg blockchain transaction built from the components in the association assoc.

Details

  • Gives a symbolic representation of a bloxberg blockchain transaction; it does not submit the transaction, and the transaction is not signed.
  • BlockchainTransaction[][prop] gives the value of the property prop for the transaction.
  • The following elements must be given:
  • "TransactionCount"number of transactions associated with the account
    "GasPrice"price per gas unit in berg
  • Additionally, the "GasLimit" element can be given. By default, it is computed internally:
  • "GasLimit"maximum amount of gas for execution
  • When doing a transfer, the following elements must be given:
  • "Address"address to send the transfer
    "Amount"amount of berg to transfer
  • When deploying a contract, the following element must be given:
  • "Contract"contract to deploy in the transaction
  • When using plain Solidity code, the contract must be a string containing the code, as in "Contract""code".
  • When using plain Solidity code with multiple contracts, "Contract" must be specified as an association <|"SourceCode""code","Main""name"|>, where "Main" is the name of the contract to be deployed.
  • When providing a file containing Solidity code, the contract must be a File, as in "Contract"->File[].
  • When providing a file containing Solidity code with multiple contracts, "Contract" must be specified as an association <|"Source"File[],"Main""name"|>, where "Main" is the name of the contract to be deployed.
  • When providing multiple files containing Solidity code, "Contract" must be specified as an association <|"Source"{file1,file2,},"Main""name"|>, where {file1,file2,} is a list of File expressions from which file1 will be compiled, and "Main" is the name of the contract to be deployed.
  • When using compiled Solidity code, "Contract" must be specified as an association of the form <|"ByteCode""hexstring","ABI""spec"|>, where "ABI" is the Application Binary Interface.
  • Additionally, when providing an association for "Contract", an extra "Parameters" property can be given to define the initialization parameters of the deploying contract.
  • When calling a contract, the following elements must be given:
  • "Address"address of the contract
    "FunctionCall"function call to make in the contract
  • The "FunctionCall" element can be an Association or a Typed expression.
  • In case "FunctionCall" is a Typed expression, it must define the function name.
  • In case "FunctionCall" is an Association expression, the following property must be given:
  • "Function"Typed expression defining the function to call
  • The following additional properties can also be given to the "FunctionCall" association:
  • "Inputs"input parameters of the function to call
    "Sender"address of the sender that is calling the contract
  • The following additional properties can also be requested from a BlockchainTransaction object:
  • "Signed"whether the transaction has been digitally signed
    "MessageHash"hash of the unsigned transaction
    "RawTransaction"serialized transaction
    "TransactionID"transaction ID
  • BlockchainTransaction can represent bloxberg transactions. To specify this network, use the "BlockchainBase" value inside the required association or the BlockchainBase option.

Examples

open allclose all

Basic Examples  (2)

Create a bloxberg transaction object to send bergs:

Create a bloxberg transaction object and specify the gas limit:

Scope  (5)

Plain-text Solidity contract  (2)

Build a contract using plain Solidity code in a blockchain transaction:

Build a contract using plain Solidity code with multiple contract definitions:

Solidity contract file  (1)

Build a contract using a Solidity file:

Build a contract using a Solidity file with multiple contract definitions:

Build a contract using multiple Solidity files:

Compiled Solidity contract  (1)

Build a contract using compiled code and its application binary interface:

General contract call   (1)

Create a transaction to do a value update over a state variable in a deployed contract:

Options  (1)

BlockchainBase  (1)

Bloxberg  (1)

Create a bloxberg transaction:

Applications  (1)

Create a bloxberg BlockchainTransaction:

Sign the transaction object:

Send the signed transaction to the bloxberg blockchain:

Verify the transaction using its "TransactionID":

Wolfram Research (2020), BlockchainTransaction, Wolfram Language function, https://reference.wolfram.com/language/ref/blockchain/BlockchainTransaction-bloxberg.html.

Text

Wolfram Research (2020), BlockchainTransaction, Wolfram Language function, https://reference.wolfram.com/language/ref/blockchain/BlockchainTransaction-bloxberg.html.

CMS

Wolfram Language. 2020. "BlockchainTransaction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/blockchain/BlockchainTransaction-bloxberg.html.

APA

Wolfram Language. (2020). BlockchainTransaction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/blockchain/BlockchainTransaction-bloxberg.html

BibTeX

@misc{reference.wolfram_2023_blockchaintransaction, author="Wolfram Research", title="{BlockchainTransaction}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/blockchain/BlockchainTransaction-bloxberg.html}", note=[Accessed: 28-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_blockchaintransaction, organization={Wolfram Research}, title={BlockchainTransaction}, year={2020}, url={https://reference.wolfram.com/language/ref/blockchain/BlockchainTransaction-bloxberg.html}, note=[Accessed: 28-March-2024 ]}