Class ReceiveName
- Namespace
- Concordium.Sdk.Types
- Assembly
- Concordium.Sdk.dll
A receive name of the contract function called. Expected format: "<contract_name>.<func_name>". The name must not exceed 100 bytes and all characters are ascii alphanumeric or punctuation.
public sealed record ReceiveName : IEquatable<ReceiveName>
- Inheritance
-
ReceiveName
- Implements
- Inherited Members
Properties
Receive
Name with format "<contract_name>.<func_name>".
public string Receive { get; init; }
Property Value
Methods
GetContractName()
Get the contract name part of Receive.
public ContractIdentifier GetContractName()
Returns
- ContractIdentifier
Contract identification name
GetEntrypoint()
Get entrypoint part of Receive which is the entrypoint called on the contract.
public EntryPoint GetEntrypoint()
Returns
- EntryPoint
Entrypoint
Parse(string)
Parse input name against expected format.
public static ReceiveName Parse(string name)
Parameters
name
stringInput receive name.
Returns
- ReceiveName
The parsed receive name
ToBytes()
Serialize the smart contract receive name into a byte array which has the length preprended.
public byte[] ToBytes()
Returns
- byte[]
TryDeserial(ReadOnlySpan<byte>, out (ReceiveName? receiveName, string? Error))
Attempt to deserialize a span of bytes into a smart contract receive name.
public static bool TryDeserial(ReadOnlySpan<byte> bytes, out (ReceiveName? receiveName, string? Error) output)
Parameters
bytes
ReadOnlySpan<byte>The span of bytes potentially containing a receive name.
output
(ReceiveName receiveName, string Error)Where to write the result of the operation
Returns
TryParse(string, out (ReceiveName? ReceiveName, ValidationError? Error))
Try parse input name against expected format.
public static bool TryParse(string name, out (ReceiveName? ReceiveName, ReceiveName.ValidationError? Error) output)
Parameters
name
stringInput receive name.
output
(ReceiveName ReceiveName, ReceiveName.ValidationError? Error)If parsing succeeded then ReceiveName will be not null. If parsing failed Error will be not null with first error seen.
Returns
- bool
True if name satisfied expected format.