ETH Price: $3,395.51 (+2.39%)

Contract

0x0437465dfb5B79726e35F08559B0cBea55bb585C
 
Transaction Hash
Method
Block
From
To
Deny148723792022-05-30 11:53:13943 days ago1653911593IN
StarkNet: L1 Escrow
0 ETH0.0008250235.60584967
Approve147870282022-05-16 15:28:51957 days ago1652714931IN
StarkNet: L1 Escrow
0 ETH0.0011644421.63663919
Rely147683802022-05-13 16:15:05960 days ago1652458505IN
StarkNet: L1 Escrow
0 ETH0.00481923102.21280321
Approve147543092022-05-11 10:22:37962 days ago1652264557IN
StarkNet: L1 Escrow
0 ETH0.0018161257.02846735
Rely147516532022-05-11 0:21:55962 days ago1652228515IN
StarkNet: L1 Escrow
0 ETH0.0024524190
Rely147516472022-05-11 0:20:56962 days ago1652228456IN
StarkNet: L1 Escrow
0 ETH0.0024513390
Approve147516462022-05-11 0:20:50962 days ago1652228450IN
StarkNet: L1 Escrow
0 ETH0.0048706290
Rely147478522022-05-10 9:43:31963 days ago1652175811IN
StarkNet: L1 Escrow
0 ETH0.0023568550
Rely147475942022-05-10 8:38:16963 days ago1652171896IN
StarkNet: L1 Escrow
0 ETH0.001572333.34757305
Approve147475912022-05-10 8:37:55963 days ago1652171875IN
StarkNet: L1 Escrow
0 ETH0.0010192629.77692732
Approve147473812022-05-10 7:50:20963 days ago1652169020IN
StarkNet: L1 Escrow
0 ETH0.0019116235.31540547

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
L1Escrow

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
File 1 of 1 : L1Escrow.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
// Copyright (C) 2021 Dai Foundation
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.

pragma solidity ^0.7.6;

interface ApproveLike {
  function approve(address, uint256) external returns (bool success);
}

// Escrow funds on L1, manage approval rights
contract L1Escrow {

  // --- Auth ---
  mapping (address => uint256) public wards;
  function rely(address usr) external auth {
    wards[usr] = 1;
    emit Rely(usr);
  }
  function deny(address usr) external auth {
    wards[usr] = 0;
    emit Deny(usr);
  }
  modifier auth {
    require(wards[msg.sender] == 1, "L1Escrow/not-authorized");
    _;
  }

  event Rely(address indexed usr);
  event Deny(address indexed usr);

  event Approve(address indexed token, address indexed spender, uint256 value);

  constructor() {
    wards[msg.sender] = 1;
    emit Rely(msg.sender);
  }

  function approve(address token, address spender, uint256 value) external auth {
    emit Approve(token, spender, value);
    ApproveLike(token).approve(spender, value);
  }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approve","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"usr","type":"address"}],"name":"Deny","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"usr","type":"address"}],"name":"Rely","type":"event"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"deny","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"rely","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"wards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b503360008181526020819052604080822060019055517fdd0e34038ac38b2a1ce960229778ac48a8719bc900b6c4f8d0475c6e8b385a609190a26103b4806100596000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806365fae35e146100515780639c52a7f114610079578063bf353dbb1461009f578063e1f21c67146100d7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b031661010d565b005b6100776004803603602081101561008f57600080fd5b50356001600160a01b03166101b6565b6100c5600480360360208110156100b557600080fd5b50356001600160a01b031661025e565b60408051918252519081900360200190f35b610077600480360360608110156100ed57600080fd5b506001600160a01b03813581169160208101359091169060400135610270565b33600090815260208190526040902054600114610171576040805162461bcd60e51b815260206004820152601760248201527f4c31457363726f772f6e6f742d617574686f72697a6564000000000000000000604482015290519081900360640190fd5b6001600160a01b03811660008181526020819052604080822060019055517fdd0e34038ac38b2a1ce960229778ac48a8719bc900b6c4f8d0475c6e8b385a609190a250565b3360009081526020819052604090205460011461021a576040805162461bcd60e51b815260206004820152601760248201527f4c31457363726f772f6e6f742d617574686f72697a6564000000000000000000604482015290519081900360640190fd5b6001600160a01b038116600081815260208190526040808220829055517f184450df2e323acec0ed3b5c7531b81f9b4cdef7914dfd4c0a4317416bb5251b9190a250565b60006020819052908152604090205481565b336000908152602081905260409020546001146102d4576040805162461bcd60e51b815260206004820152601760248201527f4c31457363726f772f6e6f742d617574686f72697a6564000000000000000000604482015290519081900360640190fd5b816001600160a01b0316836001600160a01b03167f6e11fb1b7f119e3f2fa29896ef5fdf8b8a2d0d4df6fe90ba8668e7d8b2ffa25e836040518082815260200191505060405180910390a3826001600160a01b031663095ea7b383836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b505050506040513d60208110156103a057600080fd5b505050505056fea164736f6c6343000706000a

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806365fae35e146100515780639c52a7f114610079578063bf353dbb1461009f578063e1f21c67146100d7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b031661010d565b005b6100776004803603602081101561008f57600080fd5b50356001600160a01b03166101b6565b6100c5600480360360208110156100b557600080fd5b50356001600160a01b031661025e565b60408051918252519081900360200190f35b610077600480360360608110156100ed57600080fd5b506001600160a01b03813581169160208101359091169060400135610270565b33600090815260208190526040902054600114610171576040805162461bcd60e51b815260206004820152601760248201527f4c31457363726f772f6e6f742d617574686f72697a6564000000000000000000604482015290519081900360640190fd5b6001600160a01b03811660008181526020819052604080822060019055517fdd0e34038ac38b2a1ce960229778ac48a8719bc900b6c4f8d0475c6e8b385a609190a250565b3360009081526020819052604090205460011461021a576040805162461bcd60e51b815260206004820152601760248201527f4c31457363726f772f6e6f742d617574686f72697a6564000000000000000000604482015290519081900360640190fd5b6001600160a01b038116600081815260208190526040808220829055517f184450df2e323acec0ed3b5c7531b81f9b4cdef7914dfd4c0a4317416bb5251b9190a250565b60006020819052908152604090205481565b336000908152602081905260409020546001146102d4576040805162461bcd60e51b815260206004820152601760248201527f4c31457363726f772f6e6f742d617574686f72697a6564000000000000000000604482015290519081900360640190fd5b816001600160a01b0316836001600160a01b03167f6e11fb1b7f119e3f2fa29896ef5fdf8b8a2d0d4df6fe90ba8668e7d8b2ffa25e836040518082815260200191505060405180910390a3826001600160a01b031663095ea7b383836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b505050506040513d60208110156103a057600080fd5b505050505056fea164736f6c6343000706000a

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.