(operatorAddress:string,darcAddress:string)
| 15 | const target3 = '0x870526b7973b56163a6997bb7c886f5e4ea53638'; |
| 16 | |
| 17 | async function letAddressVote(operatorAddress:string,darcAddress:string) { |
| 18 | const currentSigner = ethers.provider.getSigner(operatorAddress); |
| 19 | const currentDARC = (await ethers.getContractFactory("TestBaseContract")).attach(darcAddress).connect(currentSigner); |
| 20 | |
| 21 | const votingProgram: ProgramStruct = { |
| 22 | programOperatorAddress: operatorAddress, |
| 23 | notes: "vote", |
| 24 | operations: [{ |
| 25 | operatorAddress: operatorAddress, |
| 26 | opcode: 32, // vote |
| 27 | param: { |
| 28 | STRING_ARRAY: [], |
| 29 | BOOL_ARRAY: [true], |
| 30 | VOTING_RULE_ARRAY: [], |
| 31 | PARAMETER_ARRAY: [], |
| 32 | PLUGIN_ARRAY: [], |
| 33 | UINT256_2DARRAY: [], |
| 34 | ADDRESS_2DARRAY: [], |
| 35 | BYTES: [] |
| 36 | } |
| 37 | }], |
| 38 | } |
| 39 | |
| 40 | await currentDARC.testRuntimeEntrance(votingProgram); |
| 41 | } |
| 42 | |
| 43 | describe("multi address voting test", function () { |
| 44 | it ("should pass multi address voting test: start an absolute majority vote, vote once, pass the vote, run pending program, then change back to idle state", async function () { |
no outgoing calls
no test coverage detected