MCPcopy Create free account
hub / github.com/Project-DARC/DARC / letAddressVote

Function letAddressVote

darc-protocol/test/votingTest/multiAddressVotingTest.ts:17–41  ·  view source on GitHub ↗
(operatorAddress:string,darcAddress:string)

Source from the content-addressed store, hash-verified

15const target3 = '0x870526b7973b56163a6997bb7c886f5e4ea53638';
16
17async 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
43describe("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 () {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected