You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-4Lines changed: 15 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,5 @@
1
1
## CommitPool Single Player Smart Contract repository
2
2
3
-
4
3
[CommitPool](http://commitpool.com/) helps people meet their personal goals by holding themselves accountable. CommitPool users stake money to credibly commit to meeting their goals, and lose their stake when they don’t.
5
4
6
5
Our MVP focuses on a single goal type for individuals, hence the Single Player mode.
@@ -21,12 +20,18 @@ Buidler
21
20
2.```npx buidler node```
22
21
3. In second terminal```npx buidler run --network localhost scripts/deploy.ts ```
23
22
24
-
Ganache
23
+
Buidler & Ganache
25
24
26
25
1. Use node 12 (using nvm is recommended)
27
26
2. Start Ganache on port 8545
28
27
3. In second terminal```npx buidler run --network localhost scripts/deploy.ts ```
29
28
29
+
Truffle
30
+
31
+
1. Use node 12 (using nvm is recommended)
32
+
2. Start Ganache on port 8545
33
+
3. In terminal```truffle migrate```
34
+
30
35
#### Deploying to Matic
31
36
1.```npm install truffle -g```
32
37
@@ -35,7 +40,7 @@ Mumbai Testnet configured in ```./truffle-config.js```
35
40
Test deployment using Truffle against a runnning Ganache instance: ```truffle migrate```
36
41
Deploy to Mumbai testnet: ```truffle migrate --network matic```
37
42
38
-
Verify deployment using contract address at the [Matic Explorer](https://explorer-mumbai.maticvigil.com/)
43
+
Verify contract address at the [Matic Explorer](https://explorer-mumbai.maticvigil.com/)
39
44
40
45
*Verifying & publishing the contract code*
41
46
@@ -49,7 +54,13 @@ Quite note on setting up Matic:
49
54
* Request funds at [faucet](https://faucet.matic.network/)
50
55
* Use this wallet's seed phrase in the .env file to pay the deployment
51
56
52
-
#### Interacting with the contract
57
+
Interaction with the contract on Matic via Truffle:
58
+
1.```truffle console --network matic```
59
+
2.```compile```
60
+
3.```var singlePlayerCommit = await SinglePlayerCommit.at('<ADDRESS FROM DEPLOYMENT>')```
61
+
4. To test: ```await contractTest.activityKeyList(0)```
0 commit comments