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

Function letAddressVote

darc-protocol/test/votingTest/multiItemVotingTest.ts:15–39  ·  view source on GitHub ↗
(operatorAddress:string,darcAddress:string)

Source from the content-addressed store, hash-verified

13const target3 = '0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65';
14
15async function letAddressVote(operatorAddress:string,darcAddress:string) {
16 const currentSigner = ethers.provider.getSigner(operatorAddress);
17 const currentDARC = (await ethers.getContractFactory("TestBaseContract")).attach(darcAddress).connect(currentSigner);
18
19 const votingProgram: ProgramStruct = {
20 programOperatorAddress: operatorAddress,
21 notes: "vote",
22 operations: [{
23 operatorAddress: operatorAddress,
24 opcode: 32, // vote
25 param: {
26 STRING_ARRAY: [],
27 BOOL_ARRAY: [true, true, true, true],
28 VOTING_RULE_ARRAY: [],
29 PARAMETER_ARRAY: [],
30 PLUGIN_ARRAY: [],
31 UINT256_2DARRAY: [],
32 ADDRESS_2DARRAY: [],
33 BYTES: []
34 }
35 }],
36 }
37
38 await currentDARC.testRuntimeEntrance(votingProgram);
39}
40
41describe("multi item voting test", function () {
42 it ("should pass multi item voting test", async function () {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected