Open
Description
Describe the Feature
Search Terms
tuple,object,array
Description
In version 6.12, the functionality is available for Result objects (#4681). However, it is still not operational with ContractStructObject. It would be beneficial to have this feature.
Code Example
const proposal = await this.proposalVoteContract.getProposal(projectId, proposalId);
const proposalObject: Proposal = {
proposed: proposal.proposed,
executed: proposal.executed,
canceled: proposal.canceled,
id: Number(proposal.id),
proposalId: Number(proposal.proposalId),
title: proposal.title,
description: proposal.description,
quorumPercent: Number(proposal.quorumPercent),
snapshotAt: Number(proposal.snapshotAt),
startAt: Number(proposal.startAt),
endAt: Number(proposal.endAt),
isExecutable: proposal.isExecutable,
availableToExecuteAt: Number(proposal.availableToExecuteAt),
erc20: proposal.erc20,
from: proposal.from,
to: proposal.to,
amount: Number(proposal.amount),
fundRaiser: proposal.fundRaiser,
};
// instead
const proposal = await this.proposalVoteContract.getProposal(projectId, proposalId);
const proposalObject = proposal.toObject()