payNoMateStaking Functions
The payNoMateStaking
functions facilitate single payments where the transaction executor (msg.sender
) is not required to hold sMATE tokens. This offers a more open execution model compared to the payMateStaking
counterparts.
A key consequence of not requiring the executor to be an sMATE staker is that the executor does not receive and cannot execute the priorityFee
or any MATE token rewards for processing the transaction via these functions.
These functions are available in synchronous (_sync
) and asynchronous (_async
) variants. For details on nonce types, see Nonce Types in EVVM. For signature details, see Payment Signature Structure.
payNoMateStaking_sync
Function Type: external
Function Signature: payNoMateStaking_sync(address,address,string,address,uint256,uint256,address,bytes)
Function Selector: 0x4faa1fa2
Executes a single, synchronous payment without requiring the executor (msg.sender
) to hold sMATE tokens. It uses an implicitly managed synchronous nonce. The executor does not receive the priorityFee
or MATE rewards.
Parameters
Field | Type | Description |
---|---|---|
from | address | The address whose funds are being sent and whose signature/nonce are validated for this payment. |
to_address | address | he recipient's direct address. Used if to_identity is empty. |
to_identity | string | An alternative identifier for the recipient. If provided, the contract will attempt to resolve it to an address. |
token | address | The specific token address for this individual transfer. |
amount | uint256 | The quantity of token to transfer from from to the recipient. |
priorityFee | uint256 | An additional fee, paid in token from the from address to the msg.sender (executor). |
executor | address | The address authorized to submit this transaction to the contract. Can be address(0) for unrestricted execution. |
signature | bytes | A cryptographic signature (EIP-191) from the from address, authorizing this specific payment's details. |
There is no explicit nonce
parameter; the synchronous nonce is validated as part of the signature verification process
Execution Methods
The function can be executed in two ways:
Fisher Execution
- A user signs the payment details and sends the request (parameters + signature) to a fishing spot.
- The fisher (who must hold sMATE) captures the transaction and validates the request.
- The fisher submits the transaction to the function for processing.
Direct Execution
When the executor is the user or a service:
- The user/service (who must hold sMATE) directly calls the
payMateStaking_sync
function.
If using a service as the direct executor, we recommend adding the service's address as the executor
parameter.
Workflow
- Signature & Sync Nonce Verification: Validates the
signature
against thefrom
address and other parameters usingverifyMessageSignedForPay
. This step also implicitly checks if the synchronous nonce derived from the signature matches the expected next synchronous nonce for thefrom
address. Reverts on failure. - Executor Validation: Checks if the
executor
parameter matches the transaction sender (msg.sender
). Ifexecutor
isaddress(0)
, this check is bypassed, allowing anyone to submit the transaction (provided the signature is valid). Reverts ifexecutor
is non-zero and doesn't matchmsg.sender
. - sMATE Holder Check: Verifies that the
msg.sender
(the executor) holds sMATE tokens using theisMateStaker
function. Reverts ifmsg.sender
is not an staker. - Resolve Recipient Address: Determines the final recipient address:
- If
to_identity
is provided (not empty), it attempts to resolve the identity to an owner address usingverifyStrictAndGetOwnerOfIdentity
from the MateNameService contract. - If
to_identity
is empty, it uses the providedto_address
.
- If
- Balance Check and Update: Executes the main payment transfer using the
_updateBalance
function sendingamount
oftoken
from thefrom
address to the resolved recipient address. Reverts on transfer failure. - Nonce Update: Increments the synchronous nonce counter for the
from
address, marking this nonce as used.
For more information about the signature structure, refer to the Payment Signature Structure section.
payNoMateStaking_async
Function Type: external
Function Signature: payNoMateStaking_async(address,address,string,address,uint256,uint256,uint256,address,bytes)
Function Selector: 0xf4e1895b
Executes a single, asynchronous payment without requiring the executor (msg.sender
) to hold sMATE tokens. Asynchronous execution uses an explicit nonce
parameter, allowing for out-of-order processing relative to other async transactions from the same sender. The executor does not receive the priorityFee
or MATE rewards.
Parameters
Field | Type | Description |
---|---|---|
from | address | The address whose funds are being sent and whose signature/nonce are validated for this payment. |
to_address | address | he recipient's direct address. Used if to_identity is empty. |
to_identity | string | An alternative identifier for the recipient. If provided, the contract will attempt to resolve it to an address. |
token | address | The specific token address for this individual transfer. |
amount | uint256 | The quantity of token to transfer from from to the recipient. |
priorityFee | uint256 | An additional fee, paid in token from the from address to the msg.sender (executor). |
nonce | uint256 | The specific asynchronous nonce value provided by the from user for this transaction's replay protection. |
executor | address | The address authorized to submit this transaction to the contract. Can be address(0) for unrestricted execution. |
signature | bytes | A cryptographic signature (EIP-191) from the from address, authorizing this specific payment's details. |
Execution Methods
The function can be executed in two ways:
Fisher Execution
- A user signs the payment details and sends the request (parameters + signature) to a fishing spot.
- The fisher (who must hold sMATE) captures the transaction and validates the request.
- The fisher submits the transaction to the function for processing.
Direct Execution
When the executor is the user or a service:
- The user/service (who must hold sMATE) directly calls the
payMateStaking_sync
function.
If using a service as the direct executor, we recommend adding the service's address as the executor
parameter.
Workflow
- Signature Verification: Validates the
signature
against thefrom
address and other parameters usingverifyMessageSignedForPay
. Reverts on failure. - Executor Validation: Checks if the
executor
parameter matches the transaction sender (msg.sender
). Ifexecutor
isaddress(0)
, this check is bypassed, allowing anyone to submit the transaction (provided the signature is valid). Reverts ifexecutor
is non-zero and doesn't matchmsg.sender
. - sMATE Holder Check: Verifies that the
msg.sender
(the executor) holds sMATE tokens using theisMateStaker
function. Reverts ifmsg.sender
is not an staker. - Async Nonce Verification: Checks if the provided
nonce
has already been used for thefrom
address by consulting theasyncUsedNonce
mapping. Reverts if the nonce is invalid or already used. - Resolve Recipient Address: Determines the final recipient address:
- If
to_identity
is provided (not empty), it attempts to resolve the identity to an owner address usingverifyStrictAndGetOwnerOfIdentity
from the MateNameService contract. - If
to_identity
is empty, it uses the providedto_address
.
- If
- Balance Check and Update: Executes the main payment transfer using the
_updateBalance
function sendingamount
oftoken
from thefrom
address to the resolved recipient address. Reverts on transfer failure. - Nonce Update: Marks the specific asynchronous
nonce
provided in the parameters as used (true
) for thefrom
address in theasyncUsedNonce
mapping.
If you want to know more about the signature structure, refer to the Payment Signature Structure section.