Table of Contents

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 CcdAmount

Amount of CCD to send to the instance.

Address ContractAddress

Address of the instance to update.

ReceiveName ReceiveName

Name of the receive function to call to update the instance.

Parameter Parameter

Name 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

ContractAddress

Amount

Amount of CCD to send to the instance.

public CcdAmount Amount { get; init; }

Property Value

CcdAmount

Parameter

Name of the receive function to call to update the instance.

public Parameter Parameter { get; init; }

Property Value

Parameter

ReceiveName

Name of the receive function to call to update the instance.

public ReceiveName ReceiveName { get; init; }

Property Value

ReceiveName

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 AccountAddress

Address of the sender of the transaction.

sequenceNumber AccountSequenceNumber

Account sequence number to use for the transaction.

expiry Expiry

Expiration time of the transaction.

energy EnergyAmount

The amount of energy that can be used for contract execution. The base energy amount for transaction verification will be added to this cost.

Returns

PreparedAccountTransaction

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.

Returns

bool