From 2aa1ca942502db4bbbc0f170680a5906f55267df Mon Sep 17 00:00:00 2001 From: George Avsetsin Date: Thu, 12 Oct 2023 15:44:07 +0300 Subject: [PATCH 1/2] fix: ldo contract --- contracts/ldo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/ldo.ts b/contracts/ldo.ts index b728439..0062349 100644 --- a/contracts/ldo.ts +++ b/contracts/ldo.ts @@ -3,5 +3,5 @@ import { wallet } from '@providers'; import { getDeployedAddress } from '@configs'; import abi from 'abi/MiniMeToken.json'; -export const ldoAddress = getDeployedAddress('ldo'); +export const ldoAddress = getDeployedAddress('ldo', 'daoTokenAddress'); export const ldoContract = new Contract(ldoAddress, abi, wallet); From 427fed2023faaaca97e86c668116cb51eef8f1ce Mon Sep 17 00:00:00 2001 From: George Avsetsin Date: Thu, 12 Oct 2023 15:45:47 +0300 Subject: [PATCH 2/2] fix: new vote --- programs/voting.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/programs/voting.ts b/programs/voting.ts index 15c4567..d19b881 100644 --- a/programs/voting.ts +++ b/programs/voting.ts @@ -1,7 +1,8 @@ import { program } from '@command'; -import { votingContract } from '@contracts'; -import { executeVote, logger, voteAgainst, voteFor } from '@utils'; +import { tmContract, votingContract } from '@contracts'; +import { contractCallTxWithConfirm, executeVote, logger, voteAgainst, voteFor } from '@utils'; import { addLogsCommands, addParsingCommands } from './common'; +import { votingNewVote } from '@scripts'; const voting = program.command('voting').description('interact with voting contract'); addParsingCommands(voting, votingContract); @@ -31,8 +32,11 @@ voting .option('-m, --meta ', 'meta data', '') .action(async (options) => { const { script, meta } = options; - const voteId = await votingContract.newVote(script, meta); - logger.log('Vote id', Number(voteId)); + + const [newVoteCalldata] = votingNewVote(script, meta); + const tx = await contractCallTxWithConfirm(tmContract, 'forward', [newVoteCalldata]); + + logger.log('New vote created', tx); }); voting