ETH Price: $2,346.37 (-2.95%)

Contract

0xe8642cc1249F08756e70Bb8eb4BE0e6c09254fed
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Execute198300462024-05-09 4:17:23129 days ago1715228243IN
0xe8642cc1...c09254fed
0 ETH0.001072443.82993255
Queue198214532024-05-07 23:25:47130 days ago1715124347IN
0xe8642cc1...c09254fed
0 ETH0.00128764.50320359
Submit Vote198075142024-05-06 0:37:11132 days ago1714955831IN
0xe8642cc1...c09254fed
0 ETH0.000380274.75373527
Submit Vote198072502024-05-05 23:43:59132 days ago1714952639IN
0xe8642cc1...c09254fed
0 ETH0.000347094.33893063
Submit Vote198072452024-05-05 23:42:59132 days ago1714952579IN
0xe8642cc1...c09254fed
0 ETH0.000354514.43169789
Submit Vote197988682024-05-04 19:35:59134 days ago1714851359IN
0xe8642cc1...c09254fed
0 ETH0.000373224.66560489
Submit Vote197966322024-05-04 12:05:59134 days ago1714824359IN
0xe8642cc1...c09254fed
0 ETH0.000454465.68119615
Submit Vote197949392024-05-04 6:25:47134 days ago1714803947IN
0xe8642cc1...c09254fed
0 ETH0.000439895.49902602
Submit Vote197935892024-05-04 1:53:35134 days ago1714787615IN
0xe8642cc1...c09254fed
0 ETH0.00044355.54417992
Submit Vote197922192024-05-03 21:17:59135 days ago1714771079IN
0xe8642cc1...c09254fed
0 ETH0.000496936.21211123
Submit Vote197879812024-05-03 7:04:59135 days ago1714719899IN
0xe8642cc1...c09254fed
0 ETH0.000651766.71263105
Execute191754712024-02-07 9:37:47221 days ago1707298667IN
0xe8642cc1...c09254fed
0 ETH0.005870727.16672765
Queue191680402024-02-06 8:33:59222 days ago1707208439IN
0xe8642cc1...c09254fed
0 ETH0.0059801626.42347496
Submit Vote191368192024-02-01 23:20:11226 days ago1706829611IN
0xe8642cc1...c09254fed
0 ETH0.0024612830.76799669
Submit Vote191364582024-02-01 22:07:59227 days ago1706825279IN
0xe8642cc1...c09254fed
0 ETH0.0015665719.58346546
Submit Vote191364092024-02-01 21:58:11227 days ago1706824691IN
0xe8642cc1...c09254fed
0 ETH0.0017911122.39030659
Submit Vote191329322024-02-01 10:15:59227 days ago1706782559IN
0xe8642cc1...c09254fed
0 ETH0.0013203516.50550057
Submit Vote191328412024-02-01 9:57:35227 days ago1706781455IN
0xe8642cc1...c09254fed
0 ETH0.0017966922.46013582
Submit Vote191323462024-02-01 8:17:47227 days ago1706775467IN
0xe8642cc1...c09254fed
0 ETH0.0012881516.10300541
Submit Vote191310322024-02-01 3:51:47227 days ago1706759507IN
0xe8642cc1...c09254fed
0 ETH0.0017970722.46481379
Submit Vote191308452024-02-01 3:13:23227 days ago1706757203IN
0xe8642cc1...c09254fed
0 ETH0.0017905522.38337668
Submit Vote191295972024-01-31 23:00:47227 days ago1706742047IN
0xe8642cc1...c09254fed
0 ETH0.0023455429.32113701
Submit Vote191294272024-01-31 22:26:47228 days ago1706740007IN
0xe8642cc1...c09254fed
0 ETH0.0030685831.61114211
Submit Vote191284392024-01-31 19:07:23228 days ago1706728043IN
0xe8642cc1...c09254fed
0 ETH0.0017309221.63791477
Submit Vote191245792024-01-31 6:07:23228 days ago1706681243IN
0xe8642cc1...c09254fed
0 ETH0.0013682217.10388602
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xEDeAa8Ce...c288A22D5
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
LyraGovernanceV2

Compiler Version
v0.7.5+commit.eb77ed08

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 11 : LyraGovernanceV2.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.7.5;
pragma abicoder v2;

import "@aave/governance-v2/contracts/governance/AaveGovernanceV2.sol";

contract LyraGovernanceV2 is AaveGovernanceV2 {
  constructor(
    address governanceStrategy,
    uint256 votingDelay,
    address guardian,
    address[] memory executors
  ) AaveGovernanceV2(governanceStrategy, votingDelay, guardian, executors) {}
}

File 2 of 11 : Context.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.5;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
  function _msgSender() internal view virtual returns (address payable) {
    return msg.sender;
  }

  function _msgData() internal view virtual returns (bytes memory) {
    this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
    return msg.data;
  }
}

File 3 of 11 : Ownable.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.5;

import './Context.sol';

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
  address private _owner;

  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

  /**
   * @dev Initializes the contract setting the deployer as the initial owner.
   */
  constructor() {
    address msgSender = _msgSender();
    _owner = msgSender;
    emit OwnershipTransferred(address(0), msgSender);
  }

  /**
   * @dev Returns the address of the current owner.
   */
  function owner() public view returns (address) {
    return _owner;
  }

  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(_owner == _msgSender(), 'Ownable: caller is not the owner');
    _;
  }

  /**
   * @dev Leaves the contract without owner. It will not be possible to call
   * `onlyOwner` functions anymore. Can only be called by the current owner.
   *
   * NOTE: Renouncing ownership will leave the contract without an owner,
   * thereby removing any functionality that is only available to the owner.
   */
  function renounceOwnership() public virtual onlyOwner {
    emit OwnershipTransferred(_owner, address(0));
    _owner = address(0);
  }

  /**
   * @dev Transfers ownership of the contract to a new account (`newOwner`).
   * Can only be called by the current owner.
   */
  function transferOwnership(address newOwner) public virtual onlyOwner {
    require(newOwner != address(0), 'Ownable: new owner is the zero address');
    emit OwnershipTransferred(_owner, newOwner);
    _owner = newOwner;
  }
}

File 4 of 11 : SafeMath.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.5;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
  /**
   * @dev Returns the addition of two unsigned integers, reverting on
   * overflow.
   *
   * Counterpart to Solidity's `+` operator.
   *
   * Requirements:
   * - Addition cannot overflow.
   */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, 'SafeMath: addition overflow');

    return c;
  }

  /**
   * @dev Returns the subtraction of two unsigned integers, reverting on
   * overflow (when the result is negative).
   *
   * Counterpart to Solidity's `-` operator.
   *
   * Requirements:
   * - Subtraction cannot overflow.
   */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    return sub(a, b, 'SafeMath: subtraction overflow');
  }

  /**
   * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
   * overflow (when the result is negative).
   *
   * Counterpart to Solidity's `-` operator.
   *
   * Requirements:
   * - Subtraction cannot overflow.
   */
  function sub(
    uint256 a,
    uint256 b,
    string memory errorMessage
  ) internal pure returns (uint256) {
    require(b <= a, errorMessage);
    uint256 c = a - b;

    return c;
  }

  /**
   * @dev Returns the multiplication of two unsigned integers, reverting on
   * overflow.
   *
   * Counterpart to Solidity's `*` operator.
   *
   * Requirements:
   * - Multiplication cannot overflow.
   */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
    if (a == 0) {
      return 0;
    }

    uint256 c = a * b;
    require(c / a == b, 'SafeMath: multiplication overflow');

    return c;
  }

  /**
   * @dev Returns the integer division of two unsigned integers. Reverts on
   * division by zero. The result is rounded towards zero.
   *
   * Counterpart to Solidity's `/` operator. Note: this function uses a
   * `revert` opcode (which leaves remaining gas untouched) while Solidity
   * uses an invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    return div(a, b, 'SafeMath: division by zero');
  }

  /**
   * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
   * division by zero. The result is rounded towards zero.
   *
   * Counterpart to Solidity's `/` operator. Note: this function uses a
   * `revert` opcode (which leaves remaining gas untouched) while Solidity
   * uses an invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function div(
    uint256 a,
    uint256 b,
    string memory errorMessage
  ) internal pure returns (uint256) {
    // Solidity only automatically asserts when dividing by 0
    require(b > 0, errorMessage);
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold

    return c;
  }

  /**
   * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
   * Reverts when dividing by zero.
   *
   * Counterpart to Solidity's `%` operator. This function uses a `revert`
   * opcode (which leaves remaining gas untouched) while Solidity uses an
   * invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    return mod(a, b, 'SafeMath: modulo by zero');
  }

  /**
   * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
   * Reverts with custom message when dividing by zero.
   *
   * Counterpart to Solidity's `%` operator. This function uses a `revert`
   * opcode (which leaves remaining gas untouched) while Solidity uses an
   * invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function mod(
    uint256 a,
    uint256 b,
    string memory errorMessage
  ) internal pure returns (uint256) {
    require(b != 0, errorMessage);
    return a % b;
  }
}

File 5 of 11 : AaveGovernanceV2.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.7.5;
pragma abicoder v2;

import {IVotingStrategy} from '../interfaces/IVotingStrategy.sol';
import {IExecutorWithTimelock} from '../interfaces/IExecutorWithTimelock.sol';
import {IProposalValidator} from '../interfaces/IProposalValidator.sol';
import {IGovernanceStrategy} from '../interfaces/IGovernanceStrategy.sol';
import {IAaveGovernanceV2} from '../interfaces/IAaveGovernanceV2.sol';
import {Ownable} from '../dependencies/open-zeppelin/Ownable.sol';
import {SafeMath} from '../dependencies/open-zeppelin/SafeMath.sol';
import {isContract, getChainId} from '../misc/Helpers.sol';

/**
 * @title Governance V2 contract
 * @dev Main point of interaction with Aave protocol's governance
 * - Create a Proposal
 * - Cancel a Proposal
 * - Queue a Proposal
 * - Execute a Proposal
 * - Submit Vote to a Proposal
 * Proposal States : Pending => Active => Succeeded(/Failed) => Queued => Executed(/Expired)
 *                   The transition to "Canceled" can appear in multiple states
 * @author Aave
 **/
contract AaveGovernanceV2 is Ownable, IAaveGovernanceV2 {
  using SafeMath for uint256;

  address private _governanceStrategy;
  uint256 private _votingDelay;

  uint256 private _proposalsCount;
  mapping(uint256 => Proposal) private _proposals;
  mapping(address => bool) private _authorizedExecutors;

  address private _guardian;

  bytes32 public constant DOMAIN_TYPEHASH = keccak256(
    'EIP712Domain(string name,uint256 chainId,address verifyingContract)'
  );
  bytes32 public constant VOTE_EMITTED_TYPEHASH = keccak256('VoteEmitted(uint256 id,bool support)');
  string public constant NAME = 'Aave Governance v2';

  modifier onlyGuardian() {
    require(msg.sender == _guardian, 'ONLY_BY_GUARDIAN');
    _;
  }

  constructor(
    address governanceStrategy,
    uint256 votingDelay,
    address guardian,
    address[] memory executors
  ) {
    _setGovernanceStrategy(governanceStrategy);
    _setVotingDelay(votingDelay);
    _guardian = guardian;

    authorizeExecutors(executors);
  }

  struct CreateVars {
    uint256 startBlock;
    uint256 endBlock;
    uint256 previousProposalsCount;
  }

  /**
   * @dev Creates a Proposal (needs to be validated by the Proposal Validator)
   * @param executor The ExecutorWithTimelock contract that will execute the proposal
   * @param targets list of contracts called by proposal's associated transactions
   * @param values list of value in wei for each propoposal's associated transaction
   * @param signatures list of function signatures (can be empty) to be used when created the callData
   * @param calldatas list of calldatas: if associated signature empty, calldata ready, else calldata is arguments
   * @param withDelegatecalls boolean, true = transaction delegatecalls the taget, else calls the target
   * @param ipfsHash IPFS hash of the proposal
   **/
  function create(
    IExecutorWithTimelock executor,
    address[] memory targets,
    uint256[] memory values,
    string[] memory signatures,
    bytes[] memory calldatas,
    bool[] memory withDelegatecalls,
    bytes32 ipfsHash
  ) external override returns (uint256) {
    require(targets.length != 0, 'INVALID_EMPTY_TARGETS');
    require(
      targets.length == values.length &&
        targets.length == signatures.length &&
        targets.length == calldatas.length &&
        targets.length == withDelegatecalls.length,
      'INCONSISTENT_PARAMS_LENGTH'
    );

    require(isExecutorAuthorized(address(executor)), 'EXECUTOR_NOT_AUTHORIZED');

    require(
      IProposalValidator(address(executor)).validateCreatorOfProposal(
        this,
        msg.sender,
        block.number - 1
      ),
      'PROPOSITION_CREATION_INVALID'
    );

    CreateVars memory vars;

    vars.startBlock = block.number.add(_votingDelay);
    vars.endBlock = vars.startBlock.add(IProposalValidator(address(executor)).VOTING_DURATION());

    vars.previousProposalsCount = _proposalsCount;

    Proposal storage newProposal = _proposals[vars.previousProposalsCount];
    newProposal.id = vars.previousProposalsCount;
    newProposal.creator = msg.sender;
    newProposal.executor = executor;
    newProposal.targets = targets;
    newProposal.values = values;
    newProposal.signatures = signatures;
    newProposal.calldatas = calldatas;
    newProposal.withDelegatecalls = withDelegatecalls;
    newProposal.startBlock = vars.startBlock;
    newProposal.endBlock = vars.endBlock;
    newProposal.strategy = _governanceStrategy;
    newProposal.ipfsHash = ipfsHash;
    _proposalsCount++;

    emit ProposalCreated(
      vars.previousProposalsCount,
      msg.sender,
      executor,
      targets,
      values,
      signatures,
      calldatas,
      withDelegatecalls,
      vars.startBlock,
      vars.endBlock,
      _governanceStrategy,
      ipfsHash
    );

    return newProposal.id;
  }

  /**
   * @dev Cancels a Proposal.
   * - Callable by the _guardian with relaxed conditions, or by anybody if the conditions of
   *   cancellation on the executor are fulfilled
   * @param proposalId id of the proposal
   **/
  function cancel(uint256 proposalId) external override {
    ProposalState state = getProposalState(proposalId);
    require(
      state != ProposalState.Executed &&
        state != ProposalState.Canceled &&
        state != ProposalState.Expired,
      'ONLY_BEFORE_EXECUTED'
    );

    Proposal storage proposal = _proposals[proposalId];
    require(
      msg.sender == _guardian ||
        IProposalValidator(address(proposal.executor)).validateProposalCancellation(
          this,
          proposal.creator,
          block.number - 1
        ),
      'PROPOSITION_CANCELLATION_INVALID'
    );
    proposal.canceled = true;
    for (uint256 i = 0; i < proposal.targets.length; i++) {
      proposal.executor.cancelTransaction(
        proposal.targets[i],
        proposal.values[i],
        proposal.signatures[i],
        proposal.calldatas[i],
        proposal.executionTime,
        proposal.withDelegatecalls[i]
      );
    }

    emit ProposalCanceled(proposalId);
  }

  /**
   * @dev Queue the proposal (If Proposal Succeeded)
   * @param proposalId id of the proposal to queue
   **/
  function queue(uint256 proposalId) external override {
    require(getProposalState(proposalId) == ProposalState.Succeeded, 'INVALID_STATE_FOR_QUEUE');
    Proposal storage proposal = _proposals[proposalId];
    uint256 executionTime = block.timestamp.add(proposal.executor.getDelay());
    for (uint256 i = 0; i < proposal.targets.length; i++) {
      _queueOrRevert(
        proposal.executor,
        proposal.targets[i],
        proposal.values[i],
        proposal.signatures[i],
        proposal.calldatas[i],
        executionTime,
        proposal.withDelegatecalls[i]
      );
    }
    proposal.executionTime = executionTime;

    emit ProposalQueued(proposalId, executionTime, msg.sender);
  }

  /**
   * @dev Execute the proposal (If Proposal Queued)
   * @param proposalId id of the proposal to execute
   **/
  function execute(uint256 proposalId) external payable override {
    require(getProposalState(proposalId) == ProposalState.Queued, 'ONLY_QUEUED_PROPOSALS');
    Proposal storage proposal = _proposals[proposalId];
    proposal.executed = true;
    for (uint256 i = 0; i < proposal.targets.length; i++) {
      proposal.executor.executeTransaction{value: proposal.values[i]}(
        proposal.targets[i],
        proposal.values[i],
        proposal.signatures[i],
        proposal.calldatas[i],
        proposal.executionTime,
        proposal.withDelegatecalls[i]
      );
    }
    emit ProposalExecuted(proposalId, msg.sender);
  }

  /**
   * @dev Function allowing msg.sender to vote for/against a proposal
   * @param proposalId id of the proposal
   * @param support boolean, true = vote for, false = vote against
   **/
  function submitVote(uint256 proposalId, bool support) external override {
    return _submitVote(msg.sender, proposalId, support);
  }

  /**
   * @dev Function to register the vote of user that has voted offchain via signature
   * @param proposalId id of the proposal
   * @param support boolean, true = vote for, false = vote against
   * @param v v part of the voter signature
   * @param r r part of the voter signature
   * @param s s part of the voter signature
   **/
  function submitVoteBySignature(
    uint256 proposalId,
    bool support,
    uint8 v,
    bytes32 r,
    bytes32 s
  ) external override {
    bytes32 digest = keccak256(
      abi.encodePacked(
        '\x19\x01',
        keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(NAME)), getChainId(), address(this))),
        keccak256(abi.encode(VOTE_EMITTED_TYPEHASH, proposalId, support))
      )
    );
    address signer = ecrecover(digest, v, r, s);
    require(signer != address(0), 'INVALID_SIGNATURE');
    return _submitVote(signer, proposalId, support);
  }

  /**
   * @dev Set new GovernanceStrategy
   * Note: owner should be a timelocked executor, so needs to make a proposal
   * @param governanceStrategy new Address of the GovernanceStrategy contract
   **/
  function setGovernanceStrategy(address governanceStrategy) external override onlyOwner {
    _setGovernanceStrategy(governanceStrategy);
  }

  /**
   * @dev Set new Voting Delay (delay before a newly created proposal can be voted on)
   * Note: owner should be a timelocked executor, so needs to make a proposal
   * @param votingDelay new voting delay in terms of blocks
   **/
  function setVotingDelay(uint256 votingDelay) external override onlyOwner {
    _setVotingDelay(votingDelay);
  }

  /**
   * @dev Add new addresses to the list of authorized executors
   * @param executors list of new addresses to be authorized executors
   **/
  function authorizeExecutors(address[] memory executors) public override onlyOwner {
    for (uint256 i = 0; i < executors.length; i++) {
      _authorizeExecutor(executors[i]);
    }
  }

  /**
   * @dev Remove addresses to the list of authorized executors
   * @param executors list of addresses to be removed as authorized executors
   **/
  function unauthorizeExecutors(address[] memory executors) public override onlyOwner {
    for (uint256 i = 0; i < executors.length; i++) {
      _unauthorizeExecutor(executors[i]);
    }
  }

  /**
   * @dev Let the guardian abdicate from its priviledged rights
   **/
  function __abdicate() external override onlyGuardian {
    _guardian = address(0);
  }

  /**
   * @dev Getter of the current GovernanceStrategy address
   * @return The address of the current GovernanceStrategy contracts
   **/
  function getGovernanceStrategy() external view override returns (address) {
    return _governanceStrategy;
  }

  /**
   * @dev Getter of the current Voting Delay (delay before a created proposal can be voted on)
   * Different from the voting duration
   * @return The voting delay in number of blocks
   **/
  function getVotingDelay() external view override returns (uint256) {
    return _votingDelay;
  }

  /**
   * @dev Returns whether an address is an authorized executor
   * @param executor address to evaluate as authorized executor
   * @return true if authorized
   **/
  function isExecutorAuthorized(address executor) public view override returns (bool) {
    return _authorizedExecutors[executor];
  }

  /**
   * @dev Getter the address of the guardian, that can mainly cancel proposals
   * @return The address of the guardian
   **/
  function getGuardian() external view override returns (address) {
    return _guardian;
  }

  /**
   * @dev Getter of the proposal count (the current number of proposals ever created)
   * @return the proposal count
   **/
  function getProposalsCount() external view override returns (uint256) {
    return _proposalsCount;
  }

  /**
   * @dev Getter of a proposal by id
   * @param proposalId id of the proposal to get
   * @return the proposal as ProposalWithoutVotes memory object
   **/
  function getProposalById(uint256 proposalId)
    external
    view
    override
    returns (ProposalWithoutVotes memory)
  {
    Proposal storage proposal = _proposals[proposalId];
    ProposalWithoutVotes memory proposalWithoutVotes = ProposalWithoutVotes({
      id: proposal.id,
      creator: proposal.creator,
      executor: proposal.executor,
      targets: proposal.targets,
      values: proposal.values,
      signatures: proposal.signatures,
      calldatas: proposal.calldatas,
      withDelegatecalls: proposal.withDelegatecalls,
      startBlock: proposal.startBlock,
      endBlock: proposal.endBlock,
      executionTime: proposal.executionTime,
      forVotes: proposal.forVotes,
      againstVotes: proposal.againstVotes,
      executed: proposal.executed,
      canceled: proposal.canceled,
      strategy: proposal.strategy,
      ipfsHash: proposal.ipfsHash
    });

    return proposalWithoutVotes;
  }

  /**
   * @dev Getter of the Vote of a voter about a proposal
   * Note: Vote is a struct: ({bool support, uint248 votingPower})
   * @param proposalId id of the proposal
   * @param voter address of the voter
   * @return The associated Vote memory object
   **/
  function getVoteOnProposal(uint256 proposalId, address voter)
    external
    view
    override
    returns (Vote memory)
  {
    return _proposals[proposalId].votes[voter];
  }

  /**
   * @dev Get the current state of a proposal
   * @param proposalId id of the proposal
   * @return The current state if the proposal
   **/
  function getProposalState(uint256 proposalId) public view override returns (ProposalState) {
    require(_proposalsCount >= proposalId, 'INVALID_PROPOSAL_ID');
    Proposal storage proposal = _proposals[proposalId];
    if (proposal.canceled) {
      return ProposalState.Canceled;
    } else if (block.number <= proposal.startBlock) {
      return ProposalState.Pending;
    } else if (block.number <= proposal.endBlock) {
      return ProposalState.Active;
    } else if (!IProposalValidator(address(proposal.executor)).isProposalPassed(this, proposalId)) {
      return ProposalState.Failed;
    } else if (proposal.executionTime == 0) {
      return ProposalState.Succeeded;
    } else if (proposal.executed) {
      return ProposalState.Executed;
    } else if (proposal.executor.isProposalOverGracePeriod(this, proposalId)) {
      return ProposalState.Expired;
    } else {
      return ProposalState.Queued;
    }
  }

  function _queueOrRevert(
    IExecutorWithTimelock executor,
    address target,
    uint256 value,
    string memory signature,
    bytes memory callData,
    uint256 executionTime,
    bool withDelegatecall
  ) internal {
    require(
      !executor.isActionQueued(
        keccak256(abi.encode(target, value, signature, callData, executionTime, withDelegatecall))
      ),
      'DUPLICATED_ACTION'
    );
    executor.queueTransaction(target, value, signature, callData, executionTime, withDelegatecall);
  }

  function _submitVote(
    address voter,
    uint256 proposalId,
    bool support
  ) internal {
    require(getProposalState(proposalId) == ProposalState.Active, 'VOTING_CLOSED');
    Proposal storage proposal = _proposals[proposalId];
    Vote storage vote = proposal.votes[voter];

    require(vote.votingPower == 0, 'VOTE_ALREADY_SUBMITTED');

    uint256 votingPower = IVotingStrategy(proposal.strategy).getVotingPowerAt(
      voter,
      proposal.startBlock
    );

    if (support) {
      proposal.forVotes = proposal.forVotes.add(votingPower);
    } else {
      proposal.againstVotes = proposal.againstVotes.add(votingPower);
    }

    vote.support = support;
    vote.votingPower = uint248(votingPower);

    emit VoteEmitted(proposalId, voter, support, votingPower);
  }

  function _setGovernanceStrategy(address governanceStrategy) internal {
    _governanceStrategy = governanceStrategy;

    emit GovernanceStrategyChanged(governanceStrategy, msg.sender);
  }

  function _setVotingDelay(uint256 votingDelay) internal {
    _votingDelay = votingDelay;

    emit VotingDelayChanged(votingDelay, msg.sender);
  }

  function _authorizeExecutor(address executor) internal {
    _authorizedExecutors[executor] = true;
    emit ExecutorAuthorized(executor);
  }

  function _unauthorizeExecutor(address executor) internal {
    _authorizedExecutors[executor] = false;
    emit ExecutorUnauthorized(executor);
  }
}

File 6 of 11 : IAaveGovernanceV2.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.7.5;
pragma abicoder v2;

import {IExecutorWithTimelock} from './IExecutorWithTimelock.sol';

interface IAaveGovernanceV2 {
  enum ProposalState {Pending, Canceled, Active, Failed, Succeeded, Queued, Expired, Executed}

  struct Vote {
    bool support;
    uint248 votingPower;
  }

  struct Proposal {
    uint256 id;
    address creator;
    IExecutorWithTimelock executor;
    address[] targets;
    uint256[] values;
    string[] signatures;
    bytes[] calldatas;
    bool[] withDelegatecalls;
    uint256 startBlock;
    uint256 endBlock;
    uint256 executionTime;
    uint256 forVotes;
    uint256 againstVotes;
    bool executed;
    bool canceled;
    address strategy;
    bytes32 ipfsHash;
    mapping(address => Vote) votes;
  }

  struct ProposalWithoutVotes {
    uint256 id;
    address creator;
    IExecutorWithTimelock executor;
    address[] targets;
    uint256[] values;
    string[] signatures;
    bytes[] calldatas;
    bool[] withDelegatecalls;
    uint256 startBlock;
    uint256 endBlock;
    uint256 executionTime;
    uint256 forVotes;
    uint256 againstVotes;
    bool executed;
    bool canceled;
    address strategy;
    bytes32 ipfsHash;
  }

  /**
   * @dev emitted when a new proposal is created
   * @param id Id of the proposal
   * @param creator address of the creator
   * @param executor The ExecutorWithTimelock contract that will execute the proposal
   * @param targets list of contracts called by proposal's associated transactions
   * @param values list of value in wei for each propoposal's associated transaction
   * @param signatures list of function signatures (can be empty) to be used when created the callData
   * @param calldatas list of calldatas: if associated signature empty, calldata ready, else calldata is arguments
   * @param withDelegatecalls boolean, true = transaction delegatecalls the taget, else calls the target
   * @param startBlock block number when vote starts
   * @param endBlock block number when vote ends
   * @param strategy address of the governanceStrategy contract
   * @param ipfsHash IPFS hash of the proposal
   **/
  event ProposalCreated(
    uint256 id,
    address indexed creator,
    IExecutorWithTimelock indexed executor,
    address[] targets,
    uint256[] values,
    string[] signatures,
    bytes[] calldatas,
    bool[] withDelegatecalls,
    uint256 startBlock,
    uint256 endBlock,
    address strategy,
    bytes32 ipfsHash
  );

  /**
   * @dev emitted when a proposal is canceled
   * @param id Id of the proposal
   **/
  event ProposalCanceled(uint256 id);

  /**
   * @dev emitted when a proposal is queued
   * @param id Id of the proposal
   * @param executionTime time when proposal underlying transactions can be executed
   * @param initiatorQueueing address of the initiator of the queuing transaction
   **/
  event ProposalQueued(uint256 id, uint256 executionTime, address indexed initiatorQueueing);
  /**
   * @dev emitted when a proposal is executed
   * @param id Id of the proposal
   * @param initiatorExecution address of the initiator of the execution transaction
   **/
  event ProposalExecuted(uint256 id, address indexed initiatorExecution);
  /**
   * @dev emitted when a vote is registered
   * @param id Id of the proposal
   * @param voter address of the voter
   * @param support boolean, true = vote for, false = vote against
   * @param votingPower Power of the voter/vote
   **/
  event VoteEmitted(uint256 id, address indexed voter, bool support, uint256 votingPower);

  event GovernanceStrategyChanged(address indexed newStrategy, address indexed initiatorChange);

  event VotingDelayChanged(uint256 newVotingDelay, address indexed initiatorChange);

  event ExecutorAuthorized(address executor);

  event ExecutorUnauthorized(address executor);

  /**
   * @dev Creates a Proposal (needs Proposition Power of creator > Threshold)
   * @param executor The ExecutorWithTimelock contract that will execute the proposal
   * @param targets list of contracts called by proposal's associated transactions
   * @param values list of value in wei for each propoposal's associated transaction
   * @param signatures list of function signatures (can be empty) to be used when created the callData
   * @param calldatas list of calldatas: if associated signature empty, calldata ready, else calldata is arguments
   * @param withDelegatecalls if true, transaction delegatecalls the taget, else calls the target
   * @param ipfsHash IPFS hash of the proposal
   **/
  function create(
    IExecutorWithTimelock executor,
    address[] memory targets,
    uint256[] memory values,
    string[] memory signatures,
    bytes[] memory calldatas,
    bool[] memory withDelegatecalls,
    bytes32 ipfsHash
  ) external returns (uint256);

  /**
   * @dev Cancels a Proposal,
   * either at anytime by guardian
   * or when proposal is Pending/Active and threshold no longer reached
   * @param proposalId id of the proposal
   **/
  function cancel(uint256 proposalId) external;

  /**
   * @dev Queue the proposal (If Proposal Succeeded)
   * @param proposalId id of the proposal to queue
   **/
  function queue(uint256 proposalId) external;

  /**
   * @dev Execute the proposal (If Proposal Queued)
   * @param proposalId id of the proposal to execute
   **/
  function execute(uint256 proposalId) external payable;

  /**
   * @dev Function allowing msg.sender to vote for/against a proposal
   * @param proposalId id of the proposal
   * @param support boolean, true = vote for, false = vote against
   **/
  function submitVote(uint256 proposalId, bool support) external;

  /**
   * @dev Function to register the vote of user that has voted offchain via signature
   * @param proposalId id of the proposal
   * @param support boolean, true = vote for, false = vote against
   * @param v v part of the voter signature
   * @param r r part of the voter signature
   * @param s s part of the voter signature
   **/
  function submitVoteBySignature(
    uint256 proposalId,
    bool support,
    uint8 v,
    bytes32 r,
    bytes32 s
  ) external;

  /**
   * @dev Set new GovernanceStrategy
   * Note: owner should be a timelocked executor, so needs to make a proposal
   * @param governanceStrategy new Address of the GovernanceStrategy contract
   **/
  function setGovernanceStrategy(address governanceStrategy) external;

  /**
   * @dev Set new Voting Delay (delay before a newly created proposal can be voted on)
   * Note: owner should be a timelocked executor, so needs to make a proposal
   * @param votingDelay new voting delay in seconds
   **/
  function setVotingDelay(uint256 votingDelay) external;

  /**
   * @dev Add new addresses to the list of authorized executors
   * @param executors list of new addresses to be authorized executors
   **/
  function authorizeExecutors(address[] memory executors) external;

  /**
   * @dev Remove addresses to the list of authorized executors
   * @param executors list of addresses to be removed as authorized executors
   **/
  function unauthorizeExecutors(address[] memory executors) external;

  /**
   * @dev Let the guardian abdicate from its priviledged rights
   **/
  function __abdicate() external;

  /**
   * @dev Getter of the current GovernanceStrategy address
   * @return The address of the current GovernanceStrategy contracts
   **/
  function getGovernanceStrategy() external view returns (address);

  /**
   * @dev Getter of the current Voting Delay (delay before a created proposal can be voted on)
   * Different from the voting duration
   * @return The voting delay in seconds
   **/
  function getVotingDelay() external view returns (uint256);

  /**
   * @dev Returns whether an address is an authorized executor
   * @param executor address to evaluate as authorized executor
   * @return true if authorized
   **/
  function isExecutorAuthorized(address executor) external view returns (bool);

  /**
   * @dev Getter the address of the guardian, that can mainly cancel proposals
   * @return The address of the guardian
   **/
  function getGuardian() external view returns (address);

  /**
   * @dev Getter of the proposal count (the current number of proposals ever created)
   * @return the proposal count
   **/
  function getProposalsCount() external view returns (uint256);

  /**
   * @dev Getter of a proposal by id
   * @param proposalId id of the proposal to get
   * @return the proposal as ProposalWithoutVotes memory object
   **/
  function getProposalById(uint256 proposalId) external view returns (ProposalWithoutVotes memory);

  /**
   * @dev Getter of the Vote of a voter about a proposal
   * Note: Vote is a struct: ({bool support, uint248 votingPower})
   * @param proposalId id of the proposal
   * @param voter address of the voter
   * @return The associated Vote memory object
   **/
  function getVoteOnProposal(uint256 proposalId, address voter) external view returns (Vote memory);

  /**
   * @dev Get the current state of a proposal
   * @param proposalId id of the proposal
   * @return The current state if the proposal
   **/
  function getProposalState(uint256 proposalId) external view returns (ProposalState);
}

File 7 of 11 : IExecutorWithTimelock.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.7.5;
pragma abicoder v2;

import {IAaveGovernanceV2} from './IAaveGovernanceV2.sol';

interface IExecutorWithTimelock {
  /**
   * @dev emitted when a new pending admin is set
   * @param newPendingAdmin address of the new pending admin
   **/
  event NewPendingAdmin(address newPendingAdmin);

  /**
   * @dev emitted when a new admin is set
   * @param newAdmin address of the new admin
   **/
  event NewAdmin(address newAdmin);

  /**
   * @dev emitted when a new delay (between queueing and execution) is set
   * @param delay new delay
   **/
  event NewDelay(uint256 delay);

  /**
   * @dev emitted when a new (trans)action is Queued.
   * @param actionHash hash of the action
   * @param target address of the targeted contract
   * @param value wei value of the transaction
   * @param signature function signature of the transaction
   * @param data function arguments of the transaction or callData if signature empty
   * @param executionTime time at which to execute the transaction
   * @param withDelegatecall boolean, true = transaction delegatecalls the target, else calls the target
   **/
  event QueuedAction(
    bytes32 actionHash,
    address indexed target,
    uint256 value,
    string signature,
    bytes data,
    uint256 executionTime,
    bool withDelegatecall
  );

  /**
   * @dev emitted when an action is Cancelled
   * @param actionHash hash of the action
   * @param target address of the targeted contract
   * @param value wei value of the transaction
   * @param signature function signature of the transaction
   * @param data function arguments of the transaction or callData if signature empty
   * @param executionTime time at which to execute the transaction
   * @param withDelegatecall boolean, true = transaction delegatecalls the target, else calls the target
   **/
  event CancelledAction(
    bytes32 actionHash,
    address indexed target,
    uint256 value,
    string signature,
    bytes data,
    uint256 executionTime,
    bool withDelegatecall
  );

  /**
   * @dev emitted when an action is Cancelled
   * @param actionHash hash of the action
   * @param target address of the targeted contract
   * @param value wei value of the transaction
   * @param signature function signature of the transaction
   * @param data function arguments of the transaction or callData if signature empty
   * @param executionTime time at which to execute the transaction
   * @param withDelegatecall boolean, true = transaction delegatecalls the target, else calls the target
   * @param resultData the actual callData used on the target
   **/
  event ExecutedAction(
    bytes32 actionHash,
    address indexed target,
    uint256 value,
    string signature,
    bytes data,
    uint256 executionTime,
    bool withDelegatecall,
    bytes resultData
  );
  /**
   * @dev Getter of the current admin address (should be governance)
   * @return The address of the current admin 
   **/
  function getAdmin() external view returns (address);
  /**
   * @dev Getter of the current pending admin address
   * @return The address of the pending admin 
   **/
  function getPendingAdmin() external view returns (address);
  /**
   * @dev Getter of the delay between queuing and execution
   * @return The delay in seconds
   **/
  function getDelay() external view returns (uint256);
  /**
   * @dev Returns whether an action (via actionHash) is queued
   * @param actionHash hash of the action to be checked
   * keccak256(abi.encode(target, value, signature, data, executionTime, withDelegatecall))
   * @return true if underlying action of actionHash is queued
   **/
  function isActionQueued(bytes32 actionHash) external view returns (bool);
  /**
   * @dev Checks whether a proposal is over its grace period 
   * @param governance Governance contract
   * @param proposalId Id of the proposal against which to test
   * @return true of proposal is over grace period
   **/
  function isProposalOverGracePeriod(IAaveGovernanceV2 governance, uint256 proposalId)
    external
    view
    returns (bool);
  /**
   * @dev Getter of grace period constant
   * @return grace period in seconds
   **/
  function GRACE_PERIOD() external view returns (uint256);
  /**
   * @dev Getter of minimum delay constant
   * @return minimum delay in seconds
   **/
  function MINIMUM_DELAY() external view returns (uint256);
  /**
   * @dev Getter of maximum delay constant
   * @return maximum delay in seconds
   **/
  function MAXIMUM_DELAY() external view returns (uint256);
  /**
   * @dev Function, called by Governance, that queue a transaction, returns action hash
   * @param target smart contract target
   * @param value wei value of the transaction
   * @param signature function signature of the transaction
   * @param data function arguments of the transaction or callData if signature empty
   * @param executionTime time at which to execute the transaction
   * @param withDelegatecall boolean, true = transaction delegatecalls the target, else calls the target
   **/
  function queueTransaction(
    address target,
    uint256 value,
    string memory signature,
    bytes memory data,
    uint256 executionTime,
    bool withDelegatecall
  ) external returns (bytes32);
  /**
   * @dev Function, called by Governance, that cancels a transaction, returns the callData executed
   * @param target smart contract target
   * @param value wei value of the transaction
   * @param signature function signature of the transaction
   * @param data function arguments of the transaction or callData if signature empty
   * @param executionTime time at which to execute the transaction
   * @param withDelegatecall boolean, true = transaction delegatecalls the target, else calls the target
   **/
  function executeTransaction(
    address target,
    uint256 value,
    string memory signature,
    bytes memory data,
    uint256 executionTime,
    bool withDelegatecall
  ) external payable returns (bytes memory);
  /**
   * @dev Function, called by Governance, that cancels a transaction, returns action hash
   * @param target smart contract target
   * @param value wei value of the transaction
   * @param signature function signature of the transaction
   * @param data function arguments of the transaction or callData if signature empty
   * @param executionTime time at which to execute the transaction
   * @param withDelegatecall boolean, true = transaction delegatecalls the target, else calls the target
   **/
  function cancelTransaction(
    address target,
    uint256 value,
    string memory signature,
    bytes memory data,
    uint256 executionTime,
    bool withDelegatecall
  ) external returns (bytes32);
}

File 8 of 11 : IGovernanceStrategy.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.7.5;
pragma abicoder v2;

interface IGovernanceStrategy {
  /**
   * @dev Returns the Proposition Power of a user at a specific block number.
   * @param user Address of the user.
   * @param blockNumber Blocknumber at which to fetch Proposition Power
   * @return Power number
   **/
  function getPropositionPowerAt(address user, uint256 blockNumber) external view returns (uint256);
  /**
   * @dev Returns the total supply of Outstanding Proposition Tokens 
   * @param blockNumber Blocknumber at which to evaluate
   * @return total supply at blockNumber
   **/
  function getTotalPropositionSupplyAt(uint256 blockNumber) external view returns (uint256);
  /**
   * @dev Returns the total supply of Outstanding Voting Tokens 
   * @param blockNumber Blocknumber at which to evaluate
   * @return total supply at blockNumber
   **/
  function getTotalVotingSupplyAt(uint256 blockNumber) external view returns (uint256);
  /**
   * @dev Returns the Vote Power of a user at a specific block number.
   * @param user Address of the user.
   * @param blockNumber Blocknumber at which to fetch Vote Power
   * @return Vote number
   **/
  function getVotingPowerAt(address user, uint256 blockNumber) external view returns (uint256);
}

File 9 of 11 : IProposalValidator.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.7.5;
pragma abicoder v2;

import {IAaveGovernanceV2} from './IAaveGovernanceV2.sol';

interface IProposalValidator {

  /**
   * @dev Called to validate a proposal (e.g when creating new proposal in Governance)
   * @param governance Governance Contract
   * @param user Address of the proposal creator
   * @param blockNumber Block Number against which to make the test (e.g proposal creation block -1).
   * @return boolean, true if can be created
   **/
  function validateCreatorOfProposal(
    IAaveGovernanceV2 governance,
    address user,
    uint256 blockNumber
  ) external view returns (bool);

  /**
   * @dev Called to validate the cancellation of a proposal
   * @param governance Governance Contract
   * @param user Address of the proposal creator
   * @param blockNumber Block Number against which to make the test (e.g proposal creation block -1).
   * @return boolean, true if can be cancelled
   **/
  function validateProposalCancellation(
    IAaveGovernanceV2 governance,
    address user,
    uint256 blockNumber
  ) external view returns (bool);

  /**
   * @dev Returns whether a user has enough Proposition Power to make a proposal.
   * @param governance Governance Contract
   * @param user Address of the user to be challenged.
   * @param blockNumber Block Number against which to make the challenge.
   * @return true if user has enough power
   **/
  function isPropositionPowerEnough(
    IAaveGovernanceV2 governance,
    address user,
    uint256 blockNumber
  ) external view returns (bool);

  /**
   * @dev Returns the minimum Proposition Power needed to create a proposition.
   * @param governance Governance Contract
   * @param blockNumber Blocknumber at which to evaluate
   * @return minimum Proposition Power needed
   **/
  function getMinimumPropositionPowerNeeded(IAaveGovernanceV2 governance, uint256 blockNumber)
    external
    view
    returns (uint256);

  /**
   * @dev Returns whether a proposal passed or not
   * @param governance Governance Contract
   * @param proposalId Id of the proposal to set
   * @return true if proposal passed
   **/
  function isProposalPassed(IAaveGovernanceV2 governance, uint256 proposalId)
    external
    view
    returns (bool);

  /**
   * @dev Check whether a proposal has reached quorum, ie has enough FOR-voting-power
   * Here quorum is not to understand as number of votes reached, but number of for-votes reached
   * @param governance Governance Contract
   * @param proposalId Id of the proposal to verify
   * @return voting power needed for a proposal to pass
   **/
  function isQuorumValid(IAaveGovernanceV2 governance, uint256 proposalId)
    external
    view
    returns (bool);

  /**
   * @dev Check whether a proposal has enough extra FOR-votes than AGAINST-votes
   * FOR VOTES - AGAINST VOTES > VOTE_DIFFERENTIAL * voting supply
   * @param governance Governance Contract
   * @param proposalId Id of the proposal to verify
   * @return true if enough For-Votes
   **/
  function isVoteDifferentialValid(IAaveGovernanceV2 governance, uint256 proposalId)
    external
    view
    returns (bool);

  /**
   * @dev Calculates the minimum amount of Voting Power needed for a proposal to Pass
   * @param votingSupply Total number of oustanding voting tokens
   * @return voting power needed for a proposal to pass
   **/
  function getMinimumVotingPowerNeeded(uint256 votingSupply) external view returns (uint256);

  /**
   * @dev Get proposition threshold constant value
   * @return the proposition threshold value (100 <=> 1%)
   **/
  function PROPOSITION_THRESHOLD() external view returns (uint256);

  /**
   * @dev Get voting duration constant value
   * @return the voting duration value in seconds
   **/
  function VOTING_DURATION() external view returns (uint256);

  /**
   * @dev Get the vote differential threshold constant value
   * to compare with % of for votes/total supply - % of against votes/total supply
   * @return the vote differential threshold value (100 <=> 1%)
   **/
  function VOTE_DIFFERENTIAL() external view returns (uint256);

  /**
   * @dev Get quorum threshold constant value
   * to compare with % of for votes/total supply
   * @return the quorum threshold value (100 <=> 1%)
   **/
  function MINIMUM_QUORUM() external view returns (uint256);

  /**
   * @dev precision helper: 100% = 10000
   * @return one hundred percents with our chosen precision
   **/
  function ONE_HUNDRED_WITH_PRECISION() external view returns (uint256);
}

File 10 of 11 : IVotingStrategy.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.7.5;
pragma abicoder v2;

interface IVotingStrategy {
  function getVotingPowerAt(address user, uint256 blockNumber) external view returns (uint256);
}

File 11 of 11 : Helpers.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.7.5;
pragma abicoder v2;

function getChainId() pure returns (uint256) {
  uint256 chainId;
  assembly {
    chainId := chainid()
  }
  return chainId;
}

function isContract(address account) view returns (bool) {
  // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
  // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
  // for accounts without code, i.e. `keccak256('')`
  bytes32 codehash;
  bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
  // solhint-disable-next-line no-inline-assembly
  assembly {
    codehash := extcodehash(account)
  }
  return (codehash != accountHash && codehash != 0x0);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"governanceStrategy","type":"address"},{"internalType":"uint256","name":"votingDelay","type":"uint256"},{"internalType":"address","name":"guardian","type":"address"},{"internalType":"address[]","name":"executors","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"executor","type":"address"}],"name":"ExecutorAuthorized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"executor","type":"address"}],"name":"ExecutorUnauthorized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"initiatorChange","type":"address"}],"name":"GovernanceStrategyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ProposalCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":true,"internalType":"contract IExecutorWithTimelock","name":"executor","type":"address"},{"indexed":false,"internalType":"address[]","name":"targets","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"},{"indexed":false,"internalType":"string[]","name":"signatures","type":"string[]"},{"indexed":false,"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"indexed":false,"internalType":"bool[]","name":"withDelegatecalls","type":"bool[]"},{"indexed":false,"internalType":"uint256","name":"startBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"},{"indexed":false,"internalType":"address","name":"strategy","type":"address"},{"indexed":false,"internalType":"bytes32","name":"ipfsHash","type":"bytes32"}],"name":"ProposalCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"initiatorExecution","type":"address"}],"name":"ProposalExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"executionTime","type":"uint256"},{"indexed":true,"internalType":"address","name":"initiatorQueueing","type":"address"}],"name":"ProposalQueued","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"bool","name":"support","type":"bool"},{"indexed":false,"internalType":"uint256","name":"votingPower","type":"uint256"}],"name":"VoteEmitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newVotingDelay","type":"uint256"},{"indexed":true,"internalType":"address","name":"initiatorChange","type":"address"}],"name":"VotingDelayChanged","type":"event"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VOTE_EMITTED_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"__abdicate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"executors","type":"address[]"}],"name":"authorizeExecutors","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"cancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IExecutorWithTimelock","name":"executor","type":"address"},{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"string[]","name":"signatures","type":"string[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"bool[]","name":"withDelegatecalls","type":"bool[]"},{"internalType":"bytes32","name":"ipfsHash","type":"bytes32"}],"name":"create","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"execute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getGovernanceStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGuardian","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"getProposalById","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"contract IExecutorWithTimelock","name":"executor","type":"address"},{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"string[]","name":"signatures","type":"string[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"bool[]","name":"withDelegatecalls","type":"bool[]"},{"internalType":"uint256","name":"startBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"},{"internalType":"uint256","name":"executionTime","type":"uint256"},{"internalType":"uint256","name":"forVotes","type":"uint256"},{"internalType":"uint256","name":"againstVotes","type":"uint256"},{"internalType":"bool","name":"executed","type":"bool"},{"internalType":"bool","name":"canceled","type":"bool"},{"internalType":"address","name":"strategy","type":"address"},{"internalType":"bytes32","name":"ipfsHash","type":"bytes32"}],"internalType":"struct IAaveGovernanceV2.ProposalWithoutVotes","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"getProposalState","outputs":[{"internalType":"enum IAaveGovernanceV2.ProposalState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getProposalsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"address","name":"voter","type":"address"}],"name":"getVoteOnProposal","outputs":[{"components":[{"internalType":"bool","name":"support","type":"bool"},{"internalType":"uint248","name":"votingPower","type":"uint248"}],"internalType":"struct IAaveGovernanceV2.Vote","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVotingDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"executor","type":"address"}],"name":"isExecutorAuthorized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"queue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"governanceStrategy","type":"address"}],"name":"setGovernanceStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"votingDelay","type":"uint256"}],"name":"setVotingDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"bool","name":"support","type":"bool"}],"name":"submitVote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"bool","name":"support","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"submitVoteBySignature","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"executors","type":"address[]"}],"name":"unauthorizeExecutors","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x6080604052600436106101665760003560e01c8063760fbc13116100d1578063a3f4df7e1161008a578063ddf0b00911610064578063ddf0b00914610403578063f2fde38b14610423578063f8741a9c14610443578063fe0d94c11461046357610166565b8063a3f4df7e146103ac578063a75b87d2146103ce578063af1e0bd3146103e357610166565b8063760fbc131461030b5780638da5cb5b146103205780639080936f1461033557806398e527d3146103625780639aad6f6a14610377578063a2b170b01461039757610166565b80634185ff83116101235780634185ff831461023c578063548b514e14610269578063612c56fa1461029657806364c786d9146102b657806370b0f660146102d6578063715018a6146102f657610166565b806306be3e8e1461016b5780631a1caf7f1461019657806320606b70146101b857806334b18c26146101da5780633656de21146101ef57806340e58ee51461021c575b600080fd5b34801561017757600080fd5b50610180610476565b60405161018d9190612ac4565b60405180910390f35b3480156101a257600080fd5b506101b66101b1366004612668565b610485565b005b3480156101c457600080fd5b506101cd610511565b60405161018d9190612b89565b3480156101e657600080fd5b506101cd610535565b3480156101fb57600080fd5b5061020f61020a366004612830565b610559565b60405161018d9190612ed8565b34801561022857600080fd5b506101b6610237366004612830565b61090a565b34801561024857600080fd5b5061025c610257366004612848565b610be5565b60405161018d9190613032565b34801561027557600080fd5b5061028961028436600461264c565b610c3e565b60405161018d9190612b7e565b3480156102a257600080fd5b506101b66102b1366004612877565b610c5c565b3480156102c257600080fd5b506101b66102d1366004612668565b610c67565b3480156102e257600080fd5b506101b66102f1366004612830565b610cef565b34801561030257600080fd5b506101b6610d53565b34801561031757600080fd5b506101b6610df5565b34801561032c57600080fd5b50610180610e31565b34801561034157600080fd5b50610355610350366004612830565b610e40565b60405161018d9190612c10565b34801561036e57600080fd5b506101cd611011565b34801561038357600080fd5b506101b661039236600461264c565b611017565b3480156103a357600080fd5b506101cd611078565b3480156103b857600080fd5b506103c161107e565b60405161018d9190612c24565b3480156103da57600080fd5b506101806110ac565b3480156103ef57600080fd5b506101b66103fe36600461289b565b6110bb565b34801561040f57600080fd5b506101b661041e366004612830565b61125d565b34801561042f57600080fd5b506101b661043e36600461264c565b611559565b34801561044f57600080fd5b506101cd61045e36600461274a565b611651565b6101b6610471366004612830565b6119da565b6001546001600160a01b031690565b61048d611bd9565b6000546001600160a01b039081169116146104dd576040805162461bcd60e51b81526020600482018190526024820152600080516020613201833981519152604482015290519081900360640190fd5b60005b815181101561050d576105058282815181106104f857fe5b6020026020010151611bdd565b6001016104e0565b5050565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b7f4e031542a9553ed1c4e810c54674ab4b984243e335b246aa3de73663bf4c11ee81565b610561612094565b6000828152600460205260409020610577612094565b60408051610220810182528354815260018401546001600160a01b0390811660208084019190915260028601549091168284015260038501805484518184028101840190955280855292936060850193909283018282801561060257602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116105e4575b505050505081526020018360040180548060200260200160405190810160405280929190818152602001828054801561065a57602002820191906000526020600020905b815481526020019060010190808311610646575b5050505050815260200183600501805480602002602001604051908101604052809291908181526020016000905b828210156107335760008481526020908190208301805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561071f5780601f106106f45761010080835404028352916020019161071f565b820191906000526020600020905b81548152906001019060200180831161070257829003601f168201915b505050505081526020019060010190610688565b50505050815260200183600601805480602002602001604051908101604052809291908181526020016000905b8282101561080b5760008481526020908190208301805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156107f75780601f106107cc576101008083540402835291602001916107f7565b820191906000526020600020905b8154815290600101906020018083116107da57829003601f168201915b505050505081526020019060010190610760565b5050505081526020018360070180548060200260200160405190810160405280929190818152602001828054801561088257602002820191906000526020600020906000905b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116108515790505b50505091835250506008840154602082015260098401546040820152600a8401546060820152600b8401546080820152600c84015460a0820152600d84015460ff808216151560c0840152610100808304909116151560e0840152620100009091046001600160a01b031690820152600e90930154610120909301929092525090505b919050565b600061091582610e40565b9050600781600781111561092557fe5b1415801561093f5750600181600781111561093c57fe5b14155b80156109575750600681600781111561095457fe5b14155b61097c5760405162461bcd60e51b815260040161097390612e4e565b60405180910390fd5b60008281526004602052604090206006546001600160a01b0316331480610a2f5750600281015460018201546040516331a7bc4160e01b81526001600160a01b03928316926331a7bc41926109df92309290911690436000190190600401612bec565b60206040518083038186803b1580156109f757600080fd5b505afa158015610a0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f91906126a3565b610a4b5760405162461bcd60e51b815260040161097390612e19565b600d8101805461ff00191661010017905560005b6003820154811015610ba85760028201546003830180546001600160a01b0390921691631dc40b51919084908110610a9357fe5b6000918252602090912001546004850180546001600160a01b039092169185908110610abb57fe5b9060005260206000200154856005018581548110610ad557fe5b90600052602060002001866006018681548110610aee57fe5b9060005260206000200187600a0154886007018881548110610b0c57fe5b90600052602060002090602091828204019190069054906101000a900460ff166040518763ffffffff1660e01b8152600401610b4d96959493929190612b45565b602060405180830381600087803b158015610b6757600080fd5b505af1158015610b7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9f91906126bf565b50600101610a5f565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c83604051610bd89190612b89565b60405180910390a1505050565b610bed61213a565b5060008281526004602090815260408083206001600160a01b0385168452600f0182529182902082518084019093525460ff8116151583526001600160f81b03610100909104169082015292915050565b6001600160a01b031660009081526005602052604090205460ff1690565b61050d338383611c38565b610c6f611bd9565b6000546001600160a01b03908116911614610cbf576040805162461bcd60e51b81526020600482018190526024820152600080516020613201833981519152604482015290519081900360640190fd5b60005b815181101561050d57610ce7828281518110610cda57fe5b6020026020010151611df2565b600101610cc2565b610cf7611bd9565b6000546001600160a01b03908116911614610d47576040805162461bcd60e51b81526020600482018190526024820152600080516020613201833981519152604482015290519081900360640190fd5b610d5081611e45565b50565b610d5b611bd9565b6000546001600160a01b03908116911614610dab576040805162461bcd60e51b81526020600482018190526024820152600080516020613201833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6006546001600160a01b03163314610e1f5760405162461bcd60e51b815260040161097390612db8565b600680546001600160a01b0319169055565b6000546001600160a01b031690565b6000816003541015610e645760405162461bcd60e51b815260040161097390612e7c565b6000828152600460205260409020600d810154610100900460ff1615610e8e576001915050610905565b80600801544311610ea3576000915050610905565b80600901544311610eb8576002915050610905565b60028101546040516306fbb3ab60e01b81526001600160a01b03909116906306fbb3ab90610eec9030908790600401612ad8565b60206040518083038186803b158015610f0457600080fd5b505afa158015610f18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3c91906126a3565b610f4a576003915050610905565b600a810154610f5d576004915050610905565b600d81015460ff1615610f74576007915050610905565b600281015460405163f670a5f960e01b81526001600160a01b039091169063f670a5f990610fa89030908790600401612ad8565b60206040518083038186803b158015610fc057600080fd5b505afa158015610fd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff891906126a3565b15611007576006915050610905565b6005915050610905565b60035490565b61101f611bd9565b6000546001600160a01b0390811691161461106f576040805162461bcd60e51b81526020600482018190526024820152600080516020613201833981519152604482015290519081900360640190fd5b610d5081611e87565b60025490565b6040518060400160405280601281526020017120b0bb329023b7bb32b93730b731b2903b1960711b81525081565b6006546001600160a01b031690565b60408051808201909152601281527120b0bb329023b7bb32b93730b731b2903b1960711b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f4cc6f35bf1a450a8f51b0719ea5910c789b7b914b5c4f0451867c8a5475a4982611131611ed4565b306040516020016111459493929190612b92565b604051602081830303815290604052805190602001207f4e031542a9553ed1c4e810c54674ab4b984243e335b246aa3de73663bf4c11ee878760405160200161119093929190612bb6565b604051602081830303815290604052805190602001206040516020016111b7929190612aa9565b6040516020818303038152906040528051906020012090506000600182868686604051600081526020016040526040516111f49493929190612bce565b6020604051602081039080840390855afa158015611216573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166112495760405162461bcd60e51b815260040161097390612d26565b611254818888611c38565b50505050505050565b600461126882610e40565b600781111561127357fe5b146112905760405162461bcd60e51b815260040161097390612c95565b60008181526004602081815260408084206002810154825163675e4d4160e11b81529251919594611327946001600160a01b039092169363cebc9a829381830193929091829003018186803b1580156112e857600080fd5b505afa1580156112fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132091906126bf565b4290611ed8565b905060005b6003830154811015611510576002830154600384018054611508926001600160a01b031691908490811061135c57fe5b6000918252602090912001546004860180546001600160a01b03909216918590811061138457fe5b906000526020600020015486600501858154811061139e57fe5b600091825260209182902001805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561142c5780601f106114015761010080835404028352916020019161142c565b820191906000526020600020905b81548152906001019060200180831161140f57829003601f168201915b505050505087600601868154811061144057fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156114ce5780601f106114a3576101008083540402835291602001916114ce565b820191906000526020600020905b8154815290600101906020018083116114b157829003601f168201915b5050505050878960070188815481106114e357fe5b90600052602060002090602091828204019190069054906101000a900460ff16611f39565b60010161132c565b50600a820181905560405133907f11a0b38e70585e4b09b794bd1d9f9b1a51a802eb8ee2101eeee178d0349e73fe9061154c9086908590613109565b60405180910390a2505050565b611561611bd9565b6000546001600160a01b039081169116146115b1576040805162461bcd60e51b81526020600482018190526024820152600080516020613201833981519152604482015290519081900360640190fd5b6001600160a01b0381166115f65760405162461bcd60e51b81526004018080602001828103825260268152602001806131db6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008651600014156116755760405162461bcd60e51b815260040161097390612cf7565b85518751148015611687575084518751145b8015611694575083518751145b80156116a1575082518751145b6116bd5760405162461bcd60e51b815260040161097390612de2565b6116c688610c3e565b6116e25760405162461bcd60e51b815260040161097390612d81565b604051631a1b205360e31b81526001600160a01b0389169063d0d90298906117169030903390600019430190600401612bec565b60206040518083038186803b15801561172e57600080fd5b505afa158015611742573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176691906126a3565b6117825760405162461bcd60e51b815260040161097390612c37565b61178a612151565b600254611798904390611ed8565b81600001818152505061181d896001600160a01b031663a438d2086040518163ffffffff1660e01b815260040160206040518083038186803b1580156117dd57600080fd5b505afa1580156117f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061181591906126bf565b825190611ed8565b602082810191909152600380546040808501828152600092835260048552912090518155600181018054336001600160a01b0319918216179091556002820180549091166001600160a01b038e161790558a51909261188292840191908c0190612172565b50875161189890600483019060208b01906121d7565b5086516118ae90600583019060208a0190612212565b5085516118c4906006830190602089019061226b565b5084516118da90600783019060208801906122c4565b508160000151816008018190555081602001518160090181905550600160009054906101000a90046001600160a01b031681600d0160026101000a8154816001600160a01b0302191690836001600160a01b031602179055508381600e0181905550600360008154809291906001019190505550896001600160a01b0316336001600160a01b03167fd272d67d2c8c66de43c1d2515abb064978a5020c173e15903b6a2ab3bf7440ec84604001518c8c8c8c8c8a600001518b60200151600160009054906101000a90046001600160a01b03168f6040516119c49a99989796959493929190613054565b60405180910390a3549998505050505050505050565b60056119e582610e40565b60078111156119f057fe5b14611a0d5760405162461bcd60e51b815260040161097390612ea9565b6000818152600460205260408120600d8101805460ff19166001179055905b6003820154811015611b935760028201546004830180546001600160a01b0390921691638902ab65919084908110611a6057fe5b9060005260206000200154846003018481548110611a7a57fe5b6000918252602090912001546004860180546001600160a01b039092169186908110611aa257fe5b9060005260206000200154866005018681548110611abc57fe5b90600052602060002001876006018781548110611ad557fe5b9060005260206000200188600a0154896007018981548110611af357fe5b90600052602060002090602091828204019190069054906101000a900460ff166040518863ffffffff1660e01b8152600401611b3496959493929190612b45565b6000604051808303818588803b158015611b4d57600080fd5b505af1158015611b61573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052611b8a91908101906126d7565b50600101611a2c565b50336001600160a01b03167f9c85b616f29fca57a17eafe71cf9ff82ffef41766e2cf01ea7f8f7878dd3ec2483604051611bcd9190612b89565b60405180910390a25050565b3390565b6001600160a01b03811660009081526005602052604090819020805460ff19169055517f5e8105a2af24345971359d2289f43efa80d093f4a7123561b8d63836b98724f490611c2d908390612ac4565b60405180910390a150565b6002611c4383610e40565b6007811115611c4e57fe5b14611c6b5760405162461bcd60e51b815260040161097390612c6e565b60008281526004602090815260408083206001600160a01b0387168452600f8101909252909120805461010090046001600160f81b031615611cbf5760405162461bcd60e51b815260040161097390612d51565b600d820154600883015460405163eaeded5f60e01b81526000926201000090046001600160a01b03169163eaeded5f91611cfd918a91600401612ad8565b60206040518083038186803b158015611d1557600080fd5b505afa158015611d29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d4d91906126bf565b90508315611d6e57600b830154611d649082611ed8565b600b840155611d83565b600c830154611d7d9082611ed8565b600c8401555b815460ff60ff1990911685151517166101006001600160f81b038316021782556040516001600160a01b038716907f0c611e7b6ae0de26f4772260e1bbdb5f58cbb7c275fe2de14671968d29add8d690611de2908890889086906130f3565b60405180910390a2505050505050565b6001600160a01b03811660009081526005602052604090819020805460ff19166001179055517f52762435f58790076157ea2a4914a5a4d0aa0eb421588891377692f7fd3bc08290611c2d908390612ac4565b600281905560405133907fc46fc23e244f0720a98ddbac6efb5bb40d212cf15e6478fc4b3017648715289d90611e7c908490612b89565b60405180910390a250565b600180546001600160a01b0319166001600160a01b0383169081179091556040513391907f9e8e9f668db69a2cefb172dabe284d0d3aea2b7ee64212a205bd033bd03a3d5590600090a350565b4690565b600082820183811015611f32576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b866001600160a01b031663b1fc8796878787878787604051602001611f6396959493929190612af1565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401611f959190612b89565b60206040518083038186803b158015611fad57600080fd5b505afa158015611fc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe591906126a3565b156120025760405162461bcd60e51b815260040161097390612ccc565b604051638d8fe2e360e01b81526001600160a01b03881690638d8fe2e39061203890899089908990899089908990600401612af1565b602060405180830381600087803b15801561205257600080fd5b505af1158015612066573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208a91906126bf565b5050505050505050565b6040518061022001604052806000815260200160006001600160a01b0316815260200160006001600160a01b031681526020016060815260200160608152602001606081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200160001515815260200160006001600160a01b03168152602001600080191681525090565b604080518082019091526000808252602082015290565b60405180606001604052806000815260200160008152602001600081525090565b8280548282559060005260206000209081019282156121c7579160200282015b828111156121c757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612192565b506121d3929150612360565b5090565b8280548282559060005260206000209081019282156121c7579160200282015b828111156121c75782518255916020019190600101906121f7565b82805482825590600052602060002090810192821561225f579160200282015b8281111561225f578251805161224f918491602090910190612375565b5091602001919060010190612232565b506121d39291506123f0565b8280548282559060005260206000209081019282156122b8579160200282015b828111156122b857825180516122a8918491602090910190612375565b509160200191906001019061228b565b506121d392915061240d565b82805482825590600052602060002090601f016020900481019282156121c75791602002820160005b8382111561232a57835183826101000a81548160ff02191690831515021790555092602001926001016020816000010492830192600103026122ed565b80156123575782816101000a81549060ff021916905560010160208160000104928301926001030261232a565b50506121d39291505b5b808211156121d35760008155600101612361565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826123ab57600085556121c7565b82601f106123c457805160ff19168380011785556121c7565b828001600101855582156121c757918201828111156121c75782518255916020019190600101906121f7565b808211156121d3576000612404828261242a565b506001016123f0565b808211156121d3576000612421828261242a565b5060010161240d565b50805460018160011615610100020316600290046000825580601f106124505750610d50565b601f016020900490600052602060002090810190610d509190612360565b600082601f83011261247e578081fd5b813561249161248c8261313b565b613117565b8181529150602080830190848101818402860182018710156124b257600080fd5b60005b848110156124da5781356124c8816131b7565b845292820192908201906001016124b5565b505050505092915050565b600082601f8301126124f5578081fd5b813561250361248c8261313b565b81815291506020808301908481018184028601820187101561252457600080fd5b60005b848110156124da57813561253a816131cc565b84529282019290820190600101612527565b600082601f83011261255c578081fd5b813561256a61248c8261313b565b818152915060208083019084810160005b848110156124da578135870188603f82011261259657600080fd5b838101356125a661248c82613159565b81815260408b818486010111156125bc57600080fd5b8281850188840137506000918101860191909152855250928201929082019060010161257b565b600082601f8301126125f3578081fd5b813561260161248c8261313b565b81815291506020808301908481018184028601820187101561262257600080fd5b60005b848110156124da57813584529282019290820190600101612625565b8035610905816131b7565b60006020828403121561265d578081fd5b8135611f32816131b7565b600060208284031215612679578081fd5b813567ffffffffffffffff81111561268f578182fd5b61269b8482850161246e565b949350505050565b6000602082840312156126b4578081fd5b8151611f32816131cc565b6000602082840312156126d0578081fd5b5051919050565b6000602082840312156126e8578081fd5b815167ffffffffffffffff8111156126fe578182fd5b8201601f8101841361270e578182fd5b805161271c61248c82613159565b818152856020838501011115612730578384fd5b612741826020830160208601613187565b95945050505050565b600080600080600080600060e0888a031215612764578283fd5b61276d88612641565b9650602088013567ffffffffffffffff80821115612789578485fd5b6127958b838c0161246e565b975060408a01359150808211156127aa578485fd5b6127b68b838c016125e3565b965060608a01359150808211156127cb578485fd5b6127d78b838c0161254c565b955060808a01359150808211156127ec578485fd5b6127f88b838c0161254c565b945060a08a013591508082111561280d578384fd5b5061281a8a828b016124e5565b92505060c0880135905092959891949750929550565b600060208284031215612841578081fd5b5035919050565b6000806040838503121561285a578182fd5b82359150602083013561286c816131b7565b809150509250929050565b60008060408385031215612889578182fd5b82359150602083013561286c816131cc565b600080600080600060a086880312156128b2578283fd5b8535945060208601356128c4816131cc565b9350604086013560ff811681146128d9578384fd5b94979396509394606081013594506080013592915050565b6001600160a01b03169052565b6000815180845260208085019450808401835b838110156129365781516001600160a01b031687529582019590820190600101612911565b509495945050505050565b6000815180845260208085019450808401835b83811015612936578151151587529582019590820190600101612954565b6000815180845260208085018081965082840281019150828601855b858110156129b85782840389526129a68483516129fa565b9885019893509084019060010161298e565b5091979650505050505050565b6000815180845260208085019450808401835b83811015612936578151875295820195908201906001016129d8565b15159052565b60008151808452612a12816020860160208601613187565b601f01601f19169290920160200192915050565b60008154600180821660008114612a445760018114612a6257612aa0565b60028304607f16865260ff1983166020870152604086019350612aa0565b60028304808752612a728661317b565b60005b82811015612a965781546020828b0101528482019150602081019050612a75565b8801602001955050505b50505092915050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b600060018060a01b038816825286602083015260c06040830152612b1860c08301876129fa565b8281036060840152612b2a81876129fa565b6080840195909552505090151560a090910152949350505050565b600060018060a01b038816825286602083015260c06040830152612b6c60c0830187612a26565b8281036060840152612b2a8187612a26565b901515815260200190565b90815260200190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091521515604082015260600190565b93845260ff9290921660208401526040830152606082015260800190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6020810160088310612c1e57fe5b91905290565b600060208252611f3260208301846129fa565b6020808252601c908201527f50524f504f534954494f4e5f4352454154494f4e5f494e56414c494400000000604082015260600190565b6020808252600d908201526c1593d5125391d7d0d313d4d151609a1b604082015260600190565b60208082526017908201527f494e56414c49445f53544154455f464f525f5155455545000000000000000000604082015260600190565b602080825260119082015270222aa82624a1a0aa22a22fa0a1aa24a7a760791b604082015260600190565b602080825260159082015274494e56414c49445f454d5054595f5441524745545360581b604082015260600190565b602080825260119082015270494e56414c49445f5349474e415455524560781b604082015260600190565b6020808252601690820152751593d51157d053149150511657d4d55093525515115160521b604082015260600190565b60208082526017908201527f4558454355544f525f4e4f545f415554484f52495a4544000000000000000000604082015260600190565b60208082526010908201526f27a7262cafa12cafa3aaa0a92224a0a760811b604082015260600190565b6020808252601a908201527f494e434f4e53495354454e545f504152414d535f4c454e475448000000000000604082015260600190565b6020808252818101527f50524f504f534954494f4e5f43414e43454c4c4154494f4e5f494e56414c4944604082015260600190565b60208082526014908201527313d3931657d0915193d49157d1561150d555115160621b604082015260600190565b6020808252601390820152721253959053125117d41493d413d4d05317d251606a1b604082015260600190565b6020808252601590820152744f4e4c595f5155455545445f50524f504f53414c5360581b604082015260600190565b600060208252825160208301526020830151612ef760408401826128f1565b506040830151612f0a60608401826128f1565b506060830151610220806080850152612f276102408501836128fe565b91506080850151601f19808685030160a0870152612f4584836129c5565b935060a08701519150808685030160c0870152612f628483612972565b935060c08701519150808685030160e0870152612f7f8483612972565b935060e08701519150610100818786030181880152612f9e8584612941565b90880151610120888101919091528801516101408089019190915288015161016080890191909152880151610180808901919091528801516101a08089019190915288015190945091506101c09050612ff9818701836129f4565b86015190506101e061300d868201836129f4565b8601519050610200613021868201836128f1565b959095015193019290925250919050565b8151151581526020918201516001600160f81b03169181019190915260400190565b60006101408c835280602084015261306e8184018d6128fe565b90508281036040840152613082818c6129c5565b90508281036060840152613096818b612972565b905082810360808401526130aa818a612972565b905082810360a08401526130be8189612941565b60c0840197909752505060e08101939093526001600160a01b0391909116610100830152610120909101529695505050505050565b9283529015156020830152604082015260600190565b918252602082015260400190565b60405181810167ffffffffffffffff8111828210171561313357fe5b604052919050565b600067ffffffffffffffff82111561314f57fe5b5060209081020190565b600067ffffffffffffffff82111561316d57fe5b50601f01601f191660200190565b60009081526020902090565b60005b838110156131a257818101518382015260200161318a565b838111156131b1576000848401525b50505050565b6001600160a01b0381168114610d5057600080fd5b8015158114610d5057600080fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122082c433529ae20de59a6c20d2e34aea9955d400fd3964697e7add737ffd5d8a6e64736f6c63430007050033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.