* GSN support Add base Context contract Add GSNContext and tests Add RelayHub deployment to tests Add RelayProvider integration, complete GSNContext tests Switch dependency to openzeppelin-gsn-provider Add default txfee to provider Add basic signing recipient Sign more values Add comment clarifying RelayHub's msg.data Make context constructors internal Rename SigningRecipient to GSNRecipientSignedData Add ERC20Charge recipients Harcode RelayHub address into GSNContext Fix Solidity linter errors Run server from binary, use gsn-helpers to fund it Migrate to published @openzeppelin/gsn-helpers Silence false-positive compiler warning Use GSN helper assertions Rename meta-tx to gsn, take out of drafts Merge ERC20 charge recipients into a single one Rename GSNRecipients to Bouncers Add GSNBouncerUtils to decouple the bouncers from GSNRecipient Add _upgradeRelayHub Store RelayHub address using unstructored storage Add IRelayHub Add _withdrawDeposits to GSNRecipient Add relayHub version to recipient Make _acceptRelayedCall and _declineRelayedCall easier to use Rename GSNBouncerUtils to GSNBouncerBase, make it IRelayRecipient Improve GSNBouncerBase, make pre and post sender-protected and optional Fix GSNBouncerERC20Fee, add tests Add missing GSNBouncerSignature test Override transferFrom in __unstable__ERC20PrimaryAdmin Rhub address slot reduced by 1 Rename relay hub changed event Use released gsn-provider * move gsn to all caps * update to gsn contracts in solidity/master * Adapt for ethereum-package * update gsn related packages * update dependencies to match contracts repo * remove mocha bail option * add changelog entry * add constructors to mocks * use unstructured storage for bouncer implementations
31 lines
872 B
Solidity
31 lines
872 B
Solidity
pragma solidity ^0.5.0;
|
|
|
|
/*
|
|
* @dev Interface for a contract that will be called via the GSN from RelayHub.
|
|
*/
|
|
contract IRelayRecipient {
|
|
/**
|
|
* @dev Returns the address of the RelayHub instance this recipient interacts with.
|
|
*/
|
|
function getHubAddr() public view returns (address);
|
|
|
|
function acceptRelayedCall(
|
|
address relay,
|
|
address from,
|
|
bytes calldata encodedFunction,
|
|
uint256 transactionFee,
|
|
uint256 gasPrice,
|
|
uint256 gasLimit,
|
|
uint256 nonce,
|
|
bytes calldata approvalData,
|
|
uint256 maxPossibleCharge
|
|
)
|
|
external
|
|
view
|
|
returns (uint256, bytes memory);
|
|
|
|
function preRelayedCall(bytes calldata context) external returns (bytes32);
|
|
|
|
function postRelayedCall(bytes calldata context, bool success, uint actualCharge, bytes32 preRetVal) external;
|
|
}
|