-
Notifications
You must be signed in to change notification settings - Fork 42
Conversation
5f9ecfe
to
2431a7f
Compare
We install keep-tecdas contracts via npm. This will allow us to remove interfaces we created before for communication with keeps.
We need to initialize TBTCSystem with Keep Registry address for communication with keep.
Function was moved as we are getting rid of IKeep interface. We will call keep registry contract directly from TBTCSystem.
Removed function to get keep public key from IKeep and KeepBridge. We call keep directly from the deposit.
Moved approveDigest and wasDigestApprovedForSigning from IKeep interaface and KeepBrdige implementation directly to deposit contrac where we call Keep and store list of approved digests in deposit.
Keep function approveDigest won't return boolean, we no longer require it's result to be equal true.
keep-tecdsa exposes interfaces for communication with contracts. Here we use this interfaces.
We remove Keep Bridge and interact with keep contracts directly.
This interface remains until all functions are implemented properly within keep and we can communicate directly with the interface exposed from keep. For now this is just a stub.
Splitet setKeepInfo and getKeepInfo into separate functions to simplify tests.
Updated name of the function and removed KeepBridge address from it which is no longer used.
5c0ff17
to
ed528b0
Compare
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.
Just one remaining comment unresolved from me!
Hey, what's the status here? If we resolve conflicts are we ready to merge? |
Yep @nkuba, all okay my end! |
e6a27c3
to
b51bffe
Compare
Done, the merge was painfull but I sorted it out. Waiting for final approvals. |
Contracts we use from keep-tecdsa project are now published to github package registry. Here we update dependency to use it. We also update .npmrc to point to github registry to be able to download dependencies from there.
5f1a088
to
467a944
Compare
We need to access private packages from Github Package Registry, here we set it up for Circle CI with a GITHUB_TOKEN.
467a944
to
eb5fc4b
Compare
93777c3
to
d9cf615
Compare
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.
looks good, super minor comment.
/// @dev calls out to the keep contract, storing a 256bit int costs the same as a bool | ||
/// @param _digest the digest to check approval time for | ||
/// @return the time it was approved. 0 if unapproved | ||
/// @notice Gets timestamp of digest approval for signing |
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.
fix up formatting :)
/// Returns 0 if the digest was not recorded for signing for the given keep. | ||
function wasDigestApprovedForSigning(address _keepAddress, bytes32 _digest) external view returns (uint256); | ||
|
||
// TODO: This is a contract holding functions which are required to be implemented |
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.
comment is a little confusing, what about:
// TODO: This is an interface holding functions which are required to be implemented on keep side
@@ -63,10 +55,11 @@ library DepositFunding { | |||
) public returns (bool) { | |||
require(_d.inStart(), "Deposit setup already requested"); | |||
|
|||
IKeep _keep = IKeep(_d.KeepBridge); | |||
|
|||
// TODO: Whole value is forwarded to TBTC System, but should be partially |
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.
value is partially forwarded to TBTC System and partially stored as funder bond in the deposit https://github.com/keep-network/tbtc/issues/279.
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.
Actually currently it's stored in deposit as funder bond but we need to transfer part of it to the keep as per #297. I've updated the comment.
Approved in the comment, all questions addressed.
In this PR we move functions implemented in a KeepBridge contract responsible for communication with keep to be directly executed by a deposit.
We pull interfaces from
keep-tecdsa
to communicate with the contracts deployed as part of keep system.There still remained
IKeep
interface which holds functions which are not yet implemented on the keep side. As it's done this interface should be replaced byIECDSAKeep
calls.Closes: #221