TLDR:
⚠️ There is no wrapper in ReleaseGold.sol for theremoveAttestationSigner()
in Accounts.sol.- ASv1 operators using ReleaseGold (mostly cLabs employees) can authorise but not (!) deauthorise their attestation signers
/**
* @notice Authorizes an address to sign attestations on behalf of the account.
* @param signer The address of the signing key to authorize.
* @param v The recovery id of the incoming ECDSA signature.
* @param r Output value r of the ECDSA signature.
* @param s Output value s of the ECDSA signature.
* @dev v, r, s constitute `signer`'s signature on `msg.sender`.
*/
function authorizeAttestationSigner(address signer, uint8 v, bytes32 r, bytes32 s) public {
legacyAuthorizeSignerWithSignature(signer, AttestationSigner, v, r, s);
setIndexedSigner(signer, AttestationSigner);
emit AttestationSignerAuthorized(msg.sender, signer);
}
Source: Accounts.sol
/**
* @notice Removes the currently authorized attestation signer for the account
* Note that the signers cannot be reauthorized after they have been removed.
*/
function removeAttestationSigner() public {
address signer = getLegacySigner(msg.sender, AttestationSigner);
removeSigner(signer, AttestationSigner);
emit AttestationSignerRemoved(msg.sender, signer);
}
Source: Accounts.sol
Wraps the Accounts.sol contracts so it can be called in ReleaseGold.sol. Uses
/**
* @notice A wrapper function for the authorize attestation signer account method.
* @param signer The address of the signing key to authorize.
* @param v The recovery id of the incoming ECDSA signature.
* @param r Output value r of the ECDSA signature.
* @param s Output value s of the ECDSA signature.
* @dev The v,r and s signature should be signed by the authorized signer
* key, with the ReleaseGold contract address as the message.
*/
function authorizeAttestationSigner(address payable signer, uint8 v, bytes32 r, bytes32 s)
external
nonReentrant
onlyCanValidate
onlyWhenInProperState
{
getAccounts().authorizeAttestationSigner(signer, v, r, s);
}
Source: ReleaseGold.sol
For context: the function above uses the getAccounts()
methods inherited from UsingRegistry.sol
to fetch the address of the latest version of the Accounts.sol contract.
function getAccounts() internal view returns (IAccounts) {
return IAccounts(registry.getAddressForOrDie(ACCOUNTS_REGISTRY_ID));
}