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
contract ShrimpCoin is StorageConsumer, Proxy, DetailedToken { | |
function ShrimpCoin(KeyValueStorage storage_) | |
public | |
StorageConsumer(storage_) | |
{ | |
name = "ShrimpCoin"; | |
symbol = "SHRMP"; | |
decimals = 18; | |
} | |
} |
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 "zeppelin-solidity/contracts/ownership/Ownable.sol"; | |
contract Proxy is Ownable { | |
event Upgraded(address indexed implementation); | |
address internal _implementation; |
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
0x44360017c1460BC0149946b4fad97665c25586b0 |
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
0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39 |
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.8; | |
import "./ThresholdPool.sol"; | |
contract ThresholdPoolMock is ThresholdPool () { | |
uint256 public _now; | |
function ThresholdPoolMock ( | |
uint256 _poolTime, |
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
function currentTime() returns (uint256 _currentTime) { | |
return now; | |
} |
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
async function logMyContract (myContract) { | |
console.log("") | |
console.log("MyContract:") | |
console.log("--------------") | |
console.log(`BALANCE: ${getBalanceInEth(myContract.address)}`) | |
console.log(`startTime=${await myContract.startTime.call()}`) | |
console.log(`poolTime=${await myContract.poolTime.call()}`) | |
console.log(`threshold=${await myContract.threshold.call()}`) | |
console.log(`recipient=${await myContract.recipient.call()}`) | |
console.log(`currentTime()=${await myContract.currentTime.call()}`) |
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
const myContract = await newMyContract(init) | |
await myContract.contribute() | |
await myContract.changeTime(finalTime) | |
await myContract.recipientWithdraw() | |
const balance = await myContract.getBalance() | |
assert.equal(balance.toNumber(), expectedBalance) |
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
let myContract | |
newMyContract(init).then((_myContract) => { | |
myContract = _myContract | |
return myContract.contribute() | |
}).then(() => { | |
return myContract.changeTime(finalTime) | |
}).then(() => { | |
return myContract.recipientWithdraw() | |
}).then(() => { | |
return myContract.getBalance() |
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
test(ProductComponent, () => { | |
forCases( | |
given({}), | |
given({ price: '1.11', inventory: '111' }), | |
given({ title: 'p1', inventory: '111' }), | |
given({ title: 'p1', price: '1.11' }) | |
) | |
.assert('should render `error` class', (p) => { | |
expect(p.product.hasClass('error')).toBe(true) |