LibSignatures
Sig
struct Sig {
bytes32 r;
bytes32 s;
uint8 v;
}
Allocation
struct Allocation {
address[] sellTokens;
uint256[] sellAmounts;
address[] buyTokens;
address[] spenders;
address payable[] swapsTargets;
bytes[] swapsCallData;
uint256 partyValueDA;
uint256 partyTotalSupply;
uint256 expiresAt;
}
recover
function recover(bytes32 _hash, bytes _signature) internal pure returns (address)
Returns the address that signed a hashed message with a signature
getMessageHash
function getMessageHash(bytes _abiEncoded) internal pure returns (bytes32)
Returns an Ethereum Signed Message.
Produces a hash corresponding to the one signed with the eth_sign JSON-RPC method (opens in a new tab) as part of EIP-191.
isValidAllocation
function isValidAllocation(address user, address signer, struct LibSignatures.Allocation allocation, struct LibSignatures.Sig rsv) internal view returns (bool)
Verifies the tx signature against the PartyFi Sentinel address
Used by the deposit, join, kick, leave and swap actions
Parameters
Name | Type | Description |
---|---|---|
user | address | The user involved in the allocation |
signer | address | The PartyFi Sentinel singer address |
allocation | struct LibSignatures.Allocation | The allocation struct to verify |
rsv | struct LibSignatures.Sig | The values for the transaction's signature |