mirror of
https://github.com/status-im/snt-gas-relay.git
synced 2025-01-29 23:55:45 +00:00
move nonce check as first step (gas relayer pays this gas)
This commit is contained in:
parent
789252ba97
commit
3bdba827c9
@ -38,11 +38,11 @@ contract IdentityGasRelay is Identity {
|
||||
)
|
||||
external
|
||||
{
|
||||
require(_nonce == nonce);
|
||||
uint startGas = gasleft();
|
||||
require(startGas >= _gasMinimal);
|
||||
uint256 requiredKey = _to == address(this) ? MANAGEMENT_KEY : ACTION_KEY;
|
||||
require(minimumApprovalsByKeyPurpose[requiredKey] == 1);
|
||||
require(_nonce == nonce);
|
||||
nonce++;
|
||||
|
||||
bytes32 _signedHash = getSignHash(
|
||||
@ -105,9 +105,9 @@ contract IdentityGasRelay is Identity {
|
||||
)
|
||||
external
|
||||
{
|
||||
require(_nonce == nonce);
|
||||
uint startGas = gasleft();
|
||||
require(startGas >= _gasMinimal);
|
||||
require(_nonce == nonce);
|
||||
nonce++;
|
||||
_callGasRelayedMultiSigned(_to, _value, _data, _nonce, _gasPrice, _gasMinimal, _gasToken, _messageSignatures);
|
||||
if (_gasPrice > 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user