Skip to content

Commit

Permalink
Changed before for beforeAll, refactored Bouncer tests. (#1094)
Browse files Browse the repository at this point in the history
* Changed before for beforeAll, refactored Bouncer tests.

* Fixed linter errors.

* fix: updates for SignatureBouncer tests and voucher construction
  • Loading branch information
nventuro authored Jul 20, 2018
1 parent ce0c327 commit 67b67b7
Show file tree
Hide file tree
Showing 16 changed files with 335 additions and 307 deletions.
4 changes: 2 additions & 2 deletions contracts/access/SignatureBouncer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 14 additions & 2 deletions contracts/mocks/BouncerMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,31 @@ 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)
{
return isValidSignatureAndData(_address, _sig);
}

function onlyWithValidSignatureAndData(uint _val, bytes _sig)
function onlyWithValidSignatureAndData(uint, bytes _sig)
onlyValidSignatureAndData(_sig)
public
view
{

}

function theWrongMethod(bytes)
public
pure
{

}
}
Loading

0 comments on commit 67b67b7

Please sign in to comment.