@gooddollar/goodprotocol 1.0.28 → 1.0.29-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -27,7 +27,18 @@ describe("AdminWallet", () => {
|
|
|
27
27
|
|
|
28
28
|
before(async () => {
|
|
29
29
|
signers = await ethers.getSigners();
|
|
30
|
-
[
|
|
30
|
+
[
|
|
31
|
+
founder,
|
|
32
|
+
whitelisted,
|
|
33
|
+
stranger,
|
|
34
|
+
stranger2,
|
|
35
|
+
blacklisted,
|
|
36
|
+
newUser,
|
|
37
|
+
newUser2,
|
|
38
|
+
admin,
|
|
39
|
+
admin2,
|
|
40
|
+
toWhitelist
|
|
41
|
+
] = signers;
|
|
31
42
|
let { identity: id } = await createDAO();
|
|
32
43
|
identity = await ethers.getContractAt("IIdentity", id);
|
|
33
44
|
|
|
@@ -41,12 +52,25 @@ describe("AdminWallet", () => {
|
|
|
41
52
|
|
|
42
53
|
toppingTimes = await adminWallet.toppingTimes();
|
|
43
54
|
toppingAmount = await adminWallet.toppingAmount();
|
|
55
|
+
const startBalance = await ethers.provider.getBalance(newUser.address);
|
|
56
|
+
await Promise.all(
|
|
57
|
+
[newUser, newUser2, admin, admin2, toWhitelist].map(acc =>
|
|
58
|
+
acc.sendTransaction({
|
|
59
|
+
to: ethers.constants.AddressZero,
|
|
60
|
+
value: startBalance.sub(ethers.BigNumber.from("21000000000000")),
|
|
61
|
+
gasLimit: 21000,
|
|
62
|
+
gasPrice: 1e9
|
|
63
|
+
})
|
|
64
|
+
)
|
|
65
|
+
);
|
|
66
|
+
});
|
|
44
67
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
68
|
+
it("should have zero balance for test accouts", async () => {
|
|
69
|
+
await Promise.all(
|
|
70
|
+
[newUser, newUser2, admin, admin2, toWhitelist].map(async acc => {
|
|
71
|
+
expect(await ethers.provider.getBalance(acc.address)).eq(0);
|
|
72
|
+
})
|
|
73
|
+
);
|
|
50
74
|
});
|
|
51
75
|
|
|
52
76
|
it("should transfer to admins", async () => {
|