Skip to content

Commit

Permalink
chore(merge): dotting the is
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbeckers committed Dec 9, 2020
1 parent baa177b commit 72d63a2
Show file tree
Hide file tree
Showing 4 changed files with 541 additions and 3,236 deletions.
23 changes: 7 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,14 @@ Truffle
3. In terminal```truffle migrate```

#### Deploying to Matic
1. ```npm install truffle -g```

Mumbai Testnet configured in ```./truffle-config.js```

Test deployment using Truffle against a runnning Ganache instance: ```truffle migrate```
Deploy to Mumbai testnet: ```truffle migrate --network matic```

Verify contract address at the [Matic Explorer](https://explorer-mumbai.maticvigil.com/)
Deployment to the Mumbai Testnet is configured in ```./truffle-config.js```

*Verifying & publishing the contract code*

In the [Matic Explorer](https://explorer-mumbai.maticvigil.com/) find your contract based on the address reported by Truffle.
Go to the tab ```Code```

Flattening contract: https://github.com/poanetwork/solidity-flattener and cleanup SPDX licenses and _Chainlink appended to classes like SafeMath, Buffer and ENSResolver
1. ```npm install truffle -g```
2. Deploy to Mumbai testnet: ```truffle migrate --network matic```
3. Find your contract based on the address reported by Truffle in the [Matic Explorer](https://explorer-mumbai.maticvigil.com/).

Quite note on setting up Matic:
Quite note on deploying to Matic:
* Test deployment using Truffle against a runnning Ganache instance: ```truffle migrate```
* Configure Matic network in [MetaMask](https://docs.matic.network/docs/develop/metamask/config-matic/)
* Request funds at [faucet](https://faucet.matic.network/)
* Use this wallet's seed phrase in the .env file to pay the deployment
Expand All @@ -69,7 +60,7 @@ After deploying to a local node
Example for interacting:
```await commitPool.withdraw(1000)```
## Features
[Technical documentation](https://ipfs.io/ipfs/QmdJsGYi822G1azEMtGL39LRwXZtJRC58KT393TGPixP6z)
[Technical documentation](https://ipfs.io/ipfs/https://ipfs.io/ipfs/QmVrBwsQ67RE9CVzyQRvDucK4LrjgB7tkAserztyBDNfJi)
#### Creation of Commitment

A commitment consists of an ```activity```, a ```goalValue``` for given activity, a ```startTime```, and ```stake```. We will automagically set the ```endTime``` 7 days after the startdate.
Expand Down
4 changes: 2 additions & 2 deletions contracts/SinglePlayerCommit.sol
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ contract SinglePlayerCommit is ChainlinkClient, Ownable {
/// @notice Internal function for evaluating commitment and slashing funds if needed
/// @dev Receive call with commitment object from storage
function _settleCommitment(Commitment storage commitment) internal returns (bool success) {
commitment.met = commitment.reportedValue > commitment.goalValue;
commitment.met = commitment.reportedValue >= commitment.goalValue;

if (!commitment.met) {
_slashFunds(commitment.stake, msg.sender);
Expand Down Expand Up @@ -481,7 +481,7 @@ contract SinglePlayerCommit is ChainlinkClient, Ownable {

/// @notice Get address for ChainLink token contract
/// @dev ChainLink contract method
function getChainlinkToken() public view returns (address chainlinkTokenAddress) {
function getChainlinkToken() public view returns (address tokenAddress) {
return chainlinkTokenAddress();
}

Expand Down
Loading

0 comments on commit 72d63a2

Please sign in to comment.