parseRustOutput function
Output
parseRustOutput(
- Output rustOutput
)
Implementation
Output parseRustOutput(fuels.Output rustOutput) {
return rustOutput.map(
outputCoin: (o) => OutputCoin(
to: addHexPrefix(o.to),
amount: BigInt.from(o.amount),
assetId: addHexPrefix(o.assetId),
),
outputContract: (o) => OutputContract(inputIndex: o.inputIndex),
outputChange: (o) => OutputChange(
to: addHexPrefix(o.to),
amount: BigInt.from(o.amount),
assetId: addHexPrefix(o.assetId),
),
outputVariable: (o) => OutputVariable(
to: addHexPrefix(o.to),
amount: BigInt.from(o.amount),
assetId: addHexPrefix(o.assetId),
),
outputContractCreated: (o) => OutputContractCreated(
contractId: addHexPrefix(o.contractId),
),
unknownOutput: (o) => UnknownOutput(raw: Map.identity()));
}