Skip to content

Instantly share code, notes, and snippets.

@marekkirejczyk
Created October 19, 2018 14:40
Show Gist options
  • Save marekkirejczyk/eabbb387bacef7c1a69239c7a67e9402 to your computer and use it in GitHub Desktop.
Save marekkirejczyk/eabbb387bacef7c1a69239c7a67e9402 to your computer and use it in GitHub Desktop.
ERC1077 - draft 0.01
pragma solidity ^0.4.24;
contract IERC1077 {
enum OperationType {CALL, DELEGATECALL, CREATE}
event ExecutedSigned(bytes32 executionId, address from, uint nonce, bool success);
function lastNonce() public view returns (uint nonce);
function canExecute(
address to,
uint256 value,
bytes data,
uint nonce,
uint gasPrice,
address gasToken,
uint gasLimit,
OperationType operationType,
bytes extraData,
bytes signatures) public view returns (bool);
function executeSigned(
address to,
uint256 value,
bytes data,
uint nonce,
uint gasPrice,
address gasToken,
uint gasLimit,
OperationType operationType,
bytes extraData,
bytes signatures) public returns (bytes32);
}
@radek1st
Copy link

Hi Marek, I can see that you are planning to be using only one nonce for everybody: lastNonce. We've identified it as a concurrency bottleneck, so are keeping the nonces separately per account: https://github.com/Tenzorum/personal-wallet-contracts/blob/master/contracts/PersonalWallet.sol#L24 which allows more parallelism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment