Skip to content

Commit

Permalink
Merge pull request #16 from lidofinance/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
avsetsin authored Oct 12, 2023
2 parents 47a0b13 + 427fed2 commit 57f8394
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion contracts/ldo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
12 changes: 8 additions & 4 deletions programs/voting.ts
Original file line number Diff line number Diff line change
@@ -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);
Expand Down Expand Up @@ -31,8 +32,11 @@ voting
.option('-m, --meta <string>', '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
Expand Down

0 comments on commit 57f8394

Please sign in to comment.