Show / Hide Table of Contents

Class EncodedParams

Provides services to decode smart contract ABI data into .NET primitives. Typically represents data returned from a smart contract invocation.

Inheritance
object
EncodedParams
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Hiero
Assembly: Hiero.dll
Syntax
[JsonConverter(typeof(EncodedParamsConverter))]
public sealed class EncodedParams

Properties

| Edit this page View Source

Data

A Readonly copy of the data in raw ABI format.

Declaration
public ReadOnlyMemory<byte> Data { get; }
Property Value
Type Description
ReadOnlyMemory<byte>
| Edit this page View Source

Size

The size in bytes of the data (in ABI format) returned from the function call.

Declaration
public int Size { get; }
Property Value
Type Description
int

Methods

| Edit this page View Source

As<T>(int)

Retrieves the first value returned from the contract cast to the desired native type.

Declaration
public T As<T>(int bytesToSkip = 0)
Parameters
Type Name Description
int bytesToSkip
Returns
Type Description
T

The value of the first argument decoded from the ABI results.

Type Parameters
Name Description
T

Type of the first argument, must be known to the caller.

| Edit this page View Source

As<T1, T2>(int)

Retrieves the first and second values from the contract function result cast to the desired types.

Declaration
public (T1, T2) As<T1, T2>(int bytesToSkip = 0)
Parameters
Type Name Description
int bytesToSkip
Returns
Type Description
(T1, T2)

A tuple of the first two arguments decoded from the contract function ABI results.

Type Parameters
Name Description
T1

Type of the first argument, must be known to the caller.

T2

Type of the second argument, must be known to the caller.

| Edit this page View Source

As<T1, T2, T3>(int)

Retrieves the first three values from the contract function result cast to the desired types.

Declaration
public (T1, T2, T3) As<T1, T2, T3>(int bytesToSkip = 0)
Parameters
Type Name Description
int bytesToSkip
Returns
Type Description
(T1, T2, T3)

A tuple of the first three arguments decoded from the contract function ABI results.

Type Parameters
Name Description
T1

Type of the first argument, must be known to the caller.

T2

Type of the second argument, must be known to the caller.

T3

Type of the third argument, must be known to the caller.

| Edit this page View Source

As<T1, T2, T3, T4>(int)

Retrieves the first four values from the contract function result cast to the desired types.

Declaration
public (T1, T2, T3, T4) As<T1, T2, T3, T4>(int bytesToSkip = 0)
Parameters
Type Name Description
int bytesToSkip
Returns
Type Description
(T1, T2, T3, T4)

A tuple of the first four arguments decoded from the contract function ABI results.

Type Parameters
Name Description
T1

Type of the first argument, must be known to the caller.

T2

Type of the second argument, must be known to the caller.

T3

Type of the third argument, must be known to the caller.

T4

Type of the fourth argument, must be known to the caller.

| Edit this page View Source

As<T1, T2, T3, T4, T5>(int)

Retrieves the first five values from the contract function result cast to the desired types.

Declaration
public (T1, T2, T3, T4, T5) As<T1, T2, T3, T4, T5>(int bytesToSkip = 0)
Parameters
Type Name Description
int bytesToSkip
Returns
Type Description
(T1, T2, T3, T4, T5)

A tuple of the first five arguments decoded from the contract function ABI results.

Type Parameters
Name Description
T1

Type of the first argument, must be known to the caller.

T2

Type of the second argument, must be known to the caller.

T3

Type of the third argument, must be known to the caller.

T4

Type of the fourth argument, must be known to the caller.

T5

Type of the fifth argument, must be known to the caller.

| Edit this page View Source

GetAll(params Type[])

Retrieves an arbitrary number of values decoded from the contract return data.

Declaration
public object[] GetAll(params Type[] types)
Parameters
Type Name Description
Type[] types

An array of native types that should be returned. Must be known by the caller.

Returns
Type Description
object[]

An array of objects (which may be boxed) of the decoded parameters of the types desired.

  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph