AccountCreateContract.fromJson constructor
AccountCreateContract.fromJson(
- Map<String, dynamic> json
)
Implementation
factory AccountCreateContract.fromJson(Map<String, dynamic> json) {
return AccountCreateContract(
/// Transaction initiator address
ownerAddress: OnChainUtils.parseTronAddress(
value: json["owner_address"], name: "owner_address"),
/// Account address to be activated
accountAddress: OnChainUtils.parseTronAddress(
value: json["account_address"], name: "account_address"),
/// Account type. The external account type is Normal, and this field will not be displayed in the return value
type: AccountType.fromName(
OnChainUtils.parseString(value: json["type"], name: "type")) ??
AccountType.normal,
);
}