Rename getKeepPubkeyResult -> getKeepPublicKey
@@ -43,17 +43,6 @@ library DepositFunding {
_d.signingGroupPubkeyY = bytes32(0);
}
- /// @notice get the signer pubkey for our keep
- /// @dev calls out to the keep contract, should get 64 bytes back
- /// @return the 64 byte pubkey
- function getKeepPubkeyResult(DepositUtils.Deposit storage _d) public view returns (bytes memory) {
- bytes memory _pubkey = ECDSAKeep(_d.keepAddress).getPublicKey();
-
- require(_pubkey.length == 64, "public key not set or not 64-bytes long");
-
- return _pubkey;
- }
-
/// @notice The system can spin up a new deposit
/// @dev This should be called by an approved contract, not a developer
/// @param _d deposit storage pointer
@@ -77,6 +66,17 @@ library DepositFunding {
return true;
}
+ /// @notice Get a signer's public key for a keep associated with the deposit
+ /// @dev Calls out to the keep contract, expects to get 64 bytes back
+ /// @return Public key (64-bytes)
+ function getKeepPublicKey(DepositUtils.Deposit storage _d) public view returns (bytes memory) {
+ bytes memory _publicKey = ECDSAKeep(_d.keepAddress).getPublicKey();
+
+ require(_publicKey.length == 64, "public key not set or not 64-bytes long");
+
+ return _publicKey;
+ }
+
/// @notice Transfers the funders bond to the signers if the funder never funds
/// @dev Called only by notifyFundingTimeout
function revokeFunderBond(DepositUtils.Deposit storage _d) public {
@@ -152,7 +152,7 @@ library DepositFunding {
/// @return True if successful, otherwise revert
function retrieveSignerPubkey(DepositUtils.Deposit storage _d) public {
require(_d.inAwaitingSignerSetup(), "Not currently awaiting signer setup");
- bytes memory _keepResult = getKeepPubkeyResult(_d);
+ bytes memory _keepResult = getKeepPublicKey(_d);
_d.signingGroupPubkeyX = _keepResult.slice(0, 32).toBytes32();
_d.signingGroupPubkeyY = _keepResult.slice(32, 32).toBytes32();
