Class UpdateContract
- Namespace
- Concordium.Sdk.Transactions
- Assembly
- Concordium.Sdk.dll
A deployment of a Wasm smart contract module.
public sealed record UpdateContract : AccountTransactionPayload, IEquatable<AccountTransactionPayload>, IEquatable<UpdateContract>
- Inheritance
-
UpdateContract
- Implements
- Inherited Members
Constructors
UpdateContract(CcdAmount, ContractAddress, ReceiveName, Parameter)
A deployment of a Wasm smart contract module.
public UpdateContract(CcdAmount Amount, ContractAddress Address, ReceiveName ReceiveName, Parameter Parameter)
Parameters
Amount
CcdAmountAmount of CCD to send to the instance.
Address
ContractAddressAddress of the instance to update.
ReceiveName
ReceiveNameName of the receive function to call to update the instance.
Parameter
ParameterName of the receive function to call to update the instance.
Properties
Address
Address of the instance to update.
public ContractAddress Address { get; init; }
Property Value
Amount
Amount of CCD to send to the instance.
public CcdAmount Amount { get; init; }
Property Value
Parameter
Name of the receive function to call to update the instance.
public Parameter Parameter { get; init; }
Property Value
ReceiveName
Name of the receive function to call to update the instance.
public ReceiveName ReceiveName { get; init; }
Property Value
Methods
Prepare(AccountAddress, AccountSequenceNumber, Expiry, EnergyAmount)
Prepares the account transaction payload for signing.
public PreparedAccountTransaction Prepare(AccountAddress sender, AccountSequenceNumber sequenceNumber, Expiry expiry, EnergyAmount energy)
Parameters
sender
AccountAddressAddress of the sender of the transaction.
sequenceNumber
AccountSequenceNumberAccount sequence number to use for the transaction.
expiry
ExpiryExpiration time of the transaction.
energy
EnergyAmountThe amount of energy that can be used for contract execution. The base energy amount for transaction verification will be added to this cost.
Returns
ToBytes()
Copies the "update contract" account transaction in the binary format expected by the node to a byte array.
public override byte[] ToBytes()
Returns
- byte[]
TryDeserial(ReadOnlySpan<byte>, out (UpdateContract? payload, string? Error))
Create a "update contract" payload from a serialized as bytes.
public static bool TryDeserial(ReadOnlySpan<byte> bytes, out (UpdateContract? payload, string? Error) output)
Parameters
bytes
ReadOnlySpan<byte>The "update contract" payload as bytes.
output
(UpdateContract payload, string Error)Where to write the result of the operation.