Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

SignerECDSAUpgradeable

Inherits: Initializable, AbstractSigner

*Implementation of {AbstractSigner} using xref:api:utils/cryptography#ECDSA[ECDSA] signatures. For {Account} usage, a {_setSigner} function is provided to set the {signer} address. Doing so is easier for a factory, who is likely to use initializable clones of this contract. Example of usage:

contract MyAccountECDSA is Account, SignerECDSA, Initializable {
function initialize(address signerAddr) public initializer {
_setSigner(signerAddr);
}
}

IMPORTANT: Failing to call {_setSigner} either during construction (if used standalone) or during initialization (if used as a clone) may leave the signer either front-runnable or unusable.*

State Variables

SignerECDSAStorageLocation

bytes32 private constant SignerECDSAStorageLocation = 0x21a2a8bb424898f7a6033d112ec6057811f27c903c45eccf7ad7cefcbbc0d200;

Functions

_getSignerECDSAStorage

function _getSignerECDSAStorage() private pure returns (SignerECDSAStorage storage $);

__SignerECDSA_init

function __SignerECDSA_init(address signerAddr) internal onlyInitializing;

__SignerECDSA_init_unchained

function __SignerECDSA_init_unchained(address signerAddr) internal onlyInitializing;

_setSigner

Sets the signer with the address of the native signer. This function should be called during construction or through an initializer.

function _setSigner(address signerAddr) internal;

signer

Return the signer's address.

function signer() public view virtual returns (address);

_rawSignatureValidation

Signature validation algorithm. WARNING: Implementing a signature validation algorithm is a security-sensitive operation as it involves cryptographic verification. It is important to review and test thoroughly before deployment. Consider using one of the signature verification libraries (xref:api:utils/cryptography#ECDSA[ECDSA], xref:api:utils/cryptography#P256[P256] or xref:api:utils/cryptography#RSA[RSA]).

function _rawSignatureValidation(bytes32 hash, bytes calldata signature)
    internal
    view
    virtual
    override
    returns (bool);

Structs

SignerECDSAStorage

Note: storage-location: erc7201:openzeppelin.storage.SignerECDSA

struct SignerECDSAStorage {
    address _signer;
}