-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #106 #107
base: master
Are you sure you want to change the base?
Issue #106 #107
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
# Dependency directory | ||
node_modules | ||
|
||
package-lock.json | ||
|
||
build | ||
|
||
*.swp | ||
*.txt | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: "3" | ||
services: | ||
ganache-cli: | ||
image: trufflesuite/ganache-cli | ||
container_name: ganache-cli | ||
ports: | ||
- "8145:8545" | ||
#command: ["--accounts=100", "--hostname=0.0.0.0", "--gasLimit=100000000", "--defaultBalanceEther=1000000", "--mnemonic=xxx", "--networkId=99999"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm fine with adding docker to this repo, but can you clean up these unused lines please? |
||
circles-contracts: | ||
image: node:12 | ||
container_name: circles-contracts | ||
#environment: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one too! |
||
volumes: | ||
- .:/usr/src/app:cached | ||
entrypoint: | | ||
bash -c "cd /usr/src/app | ||
npm install | ||
npm test" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -325,6 +325,32 @@ contract('UBI', ([_, owner, recipient, attacker, systemOwner]) => { // eslint-di | |
bal.should.bignumber.satisfy(() => near(bal, goal, startingIssuance)); | ||
}); | ||
|
||
it('should show no payable ubi if timeout is shorter than period', async () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can this be moved into its own describe block, and follows the pattern of deploying a hub in the before each like the rest of this file? Would suggest to run a version of all the same tests we use on other hub parameters (and probably mostly use the same code):
|
||
const period = new BigNumber(7885000000); | ||
const timeout = new BigNumber(7885000000-1); | ||
|
||
hubTimeoutShorterThanPeriod = await Hub | ||
.new( | ||
inflation, | ||
period, | ||
symbol, | ||
name, | ||
signupBonus, | ||
startingIssuance, | ||
timeout, | ||
{ from: systemOwner, gas: maxGas }, | ||
); | ||
const signup = await hubTimeoutShorterThanPeriod.signup({ from: owner, gas: 6721975 }); | ||
token = await Token.at(signup.logs[1].args.token); | ||
deployTime = await getTimestampFromTx(signup.logs[0].transactionHash, web3); | ||
|
||
const time = period.mul(bn(2)); | ||
await increase(time.toNumber() + 500); | ||
await token.stop({ from: owner }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Manually calling |
||
const bal = await token.look(); | ||
bal.should.be.bignumber.equal(bn(0)); | ||
}); | ||
|
||
it('doesnt change balance at deployment', async () => { | ||
await token.update(); | ||
const balance = await token.balanceOf(owner); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually commit the build dir on purpose, because the rest of our stack pulls this repo in from npm and gets the abis from them