Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Issue #106 #107

wants to merge 4 commits into from

Conversation

glesaint
Copy link

PR contents:

  • adds docker
  • add test when timeout is shorter than period

@ana0 what other tests would you like to see for timeout<period?

container_name: ganache-cli
ports:
- "8145:8545"
#command: ["--accounts=100", "--hostname=0.0.0.0", "--gasLimit=100000000", "--defaultBalanceEther=1000000", "--mnemonic=xxx", "--networkId=99999"]
Copy link
Contributor

Choose a reason for hiding this comment

The 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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one too!

@@ -1,6 +1,10 @@
# Dependency directory
node_modules

package-lock.json

build
Copy link
Contributor

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

@@ -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 () => {
Copy link
Contributor

Choose a reason for hiding this comment

The 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):

  • should return that it is stopped when it has been manually stopped
  • should not payout ubi if manually stopped
  • should show no payable ubi if expired
  • should return that it is stopped when it has expired
  • should not payout ubi if expired

expired here meaning timeout has passed, and manually stopped meaning the stop method has been called


const time = period.mul(bn(2));
await increase(time.toNumber() + 500);
await token.stop({ from: owner });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manually calling stop here means we're not actually letting the timeout come into effect

@ana0
Copy link
Contributor

ana0 commented Jan 26, 2021

Thanks @glesaint and sorry for taking so long to review! We were swamped after the launch, and seeing as how ... the contracts will (hopefully) take awhile before they get updated, this got put on the backburner.

I'm not sure if you're still interested in contributing, because it's been so long, but I'll leave this open for awhile in case you are!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants