Skip to content

Commit

Permalink
Update offer_dividends_test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
lidangzzz committed May 27, 2023
1 parent fa29dd1 commit c486f6d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions darc-protocol/test/operationUnitTest/offer_dividends_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe.only("offer_dividends_test", function () {
PLUGIN_ARRAY: [],
UINT256_2DARRAY: [
[BigNumber.from(0), BigNumber.from(0),BigNumber.from(0), BigNumber.from(1),BigNumber.from(1), BigNumber.from(1), ], // token class = 0
[BigNumber.from(100), BigNumber.from(200), BigNumber.from(300), BigNumber.from(400), BigNumber.from(500), BigNumber.from(200),], // amount = 100
[BigNumber.from(100), BigNumber.from(200), BigNumber.from(200), BigNumber.from(400), BigNumber.from(500), BigNumber.from(600),], // amount = 100
],
ADDRESS_2DARRAY: [
[addr1, addr2, addr3, addr1, addr2 ,addr3]
Expand Down Expand Up @@ -166,10 +166,16 @@ describe.only("offer_dividends_test", function () {
console.log("votingWeight: ", votingWeight.toString(), " dividendWeight: ", dividendWeight.toString(), " tokenInfo: ", tokenInfo.toString(), " totalSupply: ", totalSupply.toString());

for (let j =0;j<3;j++) {

let balance = await darc.getTokenOwnerBalance(i, addresssArray[j]);
weightArray[j] += balance.toNumber() * dividendWeight.toNumber();
}
}

// print out the weight array
for (let i = 0; i < weightArray.length; i++) {
console.log("weightArray: ", weightArray[i]);
}


// list all the balance of the signers
const signerList = await ethers.getSigners();
Expand Down

0 comments on commit c486f6d

Please sign in to comment.