DelegateResourceContract class

Delegate bandwidth or energy resources to other accounts in Stake2.0.

Inheritance

Constructors

DelegateResourceContract({required TronAddress ownerAddress, required BigInt balance, required TronAddress receiverAddress, bool? lock, ResourceCode? resource, BigInt? lockPeriod})
Create a new DelegateResourceContract instance with specified parameters.
DelegateResourceContract.fromJson(Map<String, dynamic> json)
Create a new DelegateResourceContract instance by parsing a JSON map.
factory

Properties

balance BigInt
Resource delegate amount, the unit is sun
final
contractType TransactionContractType
no setteroverride
fieldIds List<int>
List of field IDs corresponding to the values.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
lock bool?
Whether to lock the resource delegation, true means locked the delegation, the delegating cannot be canceled within the period specified by lock_period, false means non-locked, the resource delegating can be canceled at any time
final
lockPeriod BigInt?
Lock period, the unit is block interval(3 seconds). Only when lock is true, this field is valid. If the delegate lock period is 1 day, the lock_period is 28800.
final
ownerAddress TronAddress
Account address
final
receiverAddress TronAddress
Resource receiver address
final
resource ResourceCode?
Resource type
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toHex String
Gets the hexadecimal representation of the protocol buffer data.
no setterinherited
typeURL String
no setterinherited
values List
List of dynamic values to be encoded.
no setteroverride

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBuffer() List<int>
Converts the protocol buffer data to a byte buffer.
inherited
toJson() Map<String, dynamic>
Convert the DelegateResourceContract object to a JSON representation.
override
toString() String
Convert the DelegateResourceContract object to its string representation.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited