-
Notifications
You must be signed in to change notification settings - Fork 42
Conversation
…to onchain-liquidation
|
||
uint256 currentDifficulty = 1; | ||
uint256 previousDifficulty = 1; | ||
uint256 oraclePrice = 10 ** 12; | ||
|
||
address public tbtcUniswapExchange; | ||
|
||
function initialize(address _tbtcUniswapExchange) external onlyOwner { |
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.
Why not use a constructor
here? Is there going to be any proxy contract deployment using TBTCSystem
?
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.
@gakonst previously discussed this here - shame that github doesn't autoexpand all resolved items, otherwise it would've been simple to Ctrl+F the PR.
initialize was chosen as this is the pattern used in the KeepFactory. Since the current test migration setup uses utils.deploySystem, which doesn't deal with constructor params, it is also a bit less work. :)
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.
Yeah, we'll have to revisit this when working on upgrades but I'd say it's fine for now - at least it's consistent with what we have in other places.
I think we are close, we need to sort out Circle configuration and figure out why Can we add an instruction to tthe PR description on how to run integration tests locally and how to run unit tests? |
@pdyraga take one more look at PR desc. - will add this to README if it's good. |
|
.circleci/config.yml
Outdated
@@ -36,7 +36,7 @@ jobs: | |||
set -ex | |||
npm install | |||
npm run sol:lint | |||
test_solidity: | |||
unit_tests: |
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.
If these are still solidity, I suggest we include that (or contract
or something) in the job name.
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.
What do you think of leaving this until we do have tests in another language? I agree with the original naming, at the same time, I'm not sure if it adds anything to refer to contracts/solidity here - at least until we have other code (and notably, we've got it in tbtc-dapp for now).
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.
< shrug > ultimately I don't care enough to block this particular PR as we'll border on bikeshedding, but I also don't think it's helpful to avoid detail in general. We already have lint_solidity
vs lint_js
, for example---doesn't seem crazy to follow the pattern vs trigger another “required jobs” setting dance when we decide we're ready to change the job name.
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.
I take back my original comment - we do have other Kubes code written here, so it's not strictly true that this is only contract code. Will go ahead and change it.
The linting example helped with this ✌️ - linting addresses styling, which we have two targets for (sol/js). Testing addresses functionality, for which we also have two targets - contracts and infrastructure.
Producing a bug for now (possible race condition) and it's not necessarily needed
Still having the same problem when running integration tests after unit tests:
Scenario 1
Scenario 2
Scenario 3
|
|
Two last outstanding items and I am good to merge: @nkuba since you requested some changed, do you want to take a look or are you fine with approval just from my side? |
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.
Nice work! I left some minor comments
Sorry I'm late to the party, but it looks like the build is broken- any idea what's up? |
Oh, I had the same when I ran it on my local env, but couldn't reproduce it. Seems like it wasn't just my messed up env, but happens on a very first run of the scripts. I created a ticket for it: #296 |
🙇 |
Closes #129
This issue breaks away work from #160 into something more deliverable:
Running tests
Integration
Unit
As before: