contracts icon indicating copy to clipboard operation
contracts copied to clipboard

something wrong at startAuction: msg.sender and Validator. signer maybe not the same

Open VictorECDSA opened this issue 3 years ago • 0 comments

contracts\staking\stakeManager\StakeManagerExtension.sol

    function startAuction(
        uint256 validatorId,
        uint256 amount,
        bool _acceptDelegation,
        bytes calldata _signerPubkey
    ) external 
        .................................................................

        uint256 senderValidatorId = signerToValidator[msg.sender];

        require(
            NFTContract.balanceOf(msg.sender) == 0 && // existing validators can't bid
                senderValidatorId != INCORRECT_VALIDATOR_ID,
            "Already used address"
        );

        .................................................................

As msg.sender and Validator. signer maybe not the same, I think the variable 'senderValidatorId' should be:

        uint256 senderValidatorId = signerToValidator[_getAndAssertSigner(_signerPubkey)];

VictorECDSA avatar Aug 01 '22 11:08 VictorECDSA