This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eval `ssh-agent -s` && ssh-add ~/.ssh/<your key> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"config": { | |
"chainId": <your network id>, | |
"homesteadBlock": 1, | |
"eip150Block": 2, | |
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", | |
"eip155Block": 3, | |
"eip158Block": 3, | |
"byzantiumBlock": 4, | |
"ethash": {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.11; | |
import '../token/MintableToken.sol'; | |
import '../math/SafeMath.sol'; | |
/** | |
* @title Crowdsale | |
* @dev Crowdsale is a base contract for managing a token crowdsale. | |
* Crowdsales have a start and end timestamps, where investors can make | |
* token purchases and the crowdsale will assign them tokens based |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.18; | |
import '../math/SafeMath.sol'; | |
import './TokenDistributionStrategy.sol'; | |
/** | |
* @title CompositeCrowdsale | |
* @dev CompositeCrowdsale is a base contract for managing a token crowdsale. | |
* Contrary to a classic crowdsale, it favours composition over inheritance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.23; | |
//... | |
contract EthicHubLending is EthicHubBase, Ownable, Pausable { | |
//... | |
// In this moment, when the borrower returns the money, we evaluate how "well" they paid. | |
function returnBorrowedEth() payable public { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rc = Rc_{p} - Rc_{p} · \frac{d}{d_{max} } | |
Dln = Rln_{p} · \frac{d}{d_{max} } | |
Rln =\begin{cases} Rln_{p} - Dln & Dln < 1\\Rln_{p} - 1 & Dln >= 1\end{cases} | |
P_{a} = t_{n}·C | |
Rc = Rc_{p} + \frac{1}{N_{t_{n}} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.23; | |
import '../EthicHubBase.sol'; | |
import '../math/SafeMath.sol'; | |
import './EthicHubReputationInterface.sol'; | |
contract EthicHubReputation is EthicHubBase, EthicHubReputationInterface { | |
//10 with 2 decilmals | |
uint maxReputation = 1000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.23; | |
/** | |
* @title SafeMath | |
* @dev Math operations with safety checks that throw on error | |
*/ | |
library SafeMath { | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Restart one service | |
docker-compose -f local.yml build --no-cache $(docker ps --format '{{.Names}}' --filter=ancestor=ethichub_local_vue) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios' | |
import VueAxios from 'vue-axios' | |
import Vue from 'vue' | |
Vue.use(VueAxios, axios) | |
Vue.axios.defaults.baseURL = process.env.VUE_APP_BASE_URL | |
Vue.axios.defaults.headers.common['Content-Type'] = 'application/json' | |
Vue.axios.defaults.headers.post['Content-Type'] = 'application/json' | |
Vue.axios.defaults.headers.put['Content-Type'] = 'application/json' |
OlderNewer