Changed before for beforeAll, refactored Bouncer tests. (#1094)
* Changed before for beforeAll, refactored Bouncer tests. * Fixed linter errors. * fix: updates for SignatureBouncer tests and voucher construction
This commit is contained in:
@ -34,8 +34,8 @@ contract SignatureBouncer is Ownable, RBAC {
|
||||
|
||||
string public constant ROLE_BOUNCER = "bouncer";
|
||||
uint constant METHOD_ID_SIZE = 4;
|
||||
// (signature length size) 32 bytes + (signature size 65 bytes padded) 96 bytes
|
||||
uint constant SIGNATURE_SIZE = 128;
|
||||
// signature size is 65 bytes (tightly packed v + r + s), but gets padded to 96 bytes
|
||||
uint constant SIGNATURE_SIZE = 96;
|
||||
|
||||
/**
|
||||
* @dev requires that a valid signature of a bouncer was provided
|
||||
|
||||
@ -36,7 +36,12 @@ contract SignatureBouncerMock is SignatureBouncer {
|
||||
|
||||
}
|
||||
|
||||
function checkValidSignatureAndData(address _address, bytes _bytes, uint _val, bytes _sig)
|
||||
function checkValidSignatureAndData(
|
||||
address _address,
|
||||
bytes,
|
||||
uint,
|
||||
bytes _sig
|
||||
)
|
||||
public
|
||||
view
|
||||
returns (bool)
|
||||
@ -44,11 +49,18 @@ contract SignatureBouncerMock is SignatureBouncer {
|
||||
return isValidSignatureAndData(_address, _sig);
|
||||
}
|
||||
|
||||
function onlyWithValidSignatureAndData(uint _val, bytes _sig)
|
||||
function onlyWithValidSignatureAndData(uint, bytes _sig)
|
||||
onlyValidSignatureAndData(_sig)
|
||||
public
|
||||
view
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
function theWrongMethod(bytes)
|
||||
public
|
||||
pure
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user