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
AmountCcdAmountAmount of CCD to send to the instance.
AddressContractAddressAddress of the instance to update.
ReceiveNameReceiveNameName of the receive function to call to update the instance.
ParameterParameterName 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
senderAccountAddressAddress of the sender of the transaction.
sequenceNumberAccountSequenceNumberAccount sequence number to use for the transaction.
expiryExpiryExpiration time of the transaction.
energyEnergyAmountThe 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
bytesReadOnlySpan<byte>The "update contract" payload as bytes.
output(UpdateContract payload, string Error)Where to write the result of the operation.