ETH Price: $1,982.43 (+1.59%)
Gas: 2.79 Gwei
 

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deny221389042025-03-27 14:39:23321 days ago1743086363IN
0x629aD4D7...b04D8b1Cd
0 ETH0.000041971.80398851
Rely221389042025-03-27 14:39:23321 days ago1743086363IN
0x629aD4D7...b04D8b1Cd
0 ETH0.000085211.80398851

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

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

Contract Name:
AllocatorBuffer

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 200 runs

Other Settings:
london EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-FileCopyrightText: © 2023 Dai Foundation <www.daifoundation.org>
// SPDX-License-Identifier: AGPL-3.0-or-later
//
// 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 <http://www.gnu.org/licenses/>.

pragma solidity ^0.8.16;

interface GemLike {
    function approve(address, uint256) external;
}

contract AllocatorBuffer {
    // --- storage variables ---

    mapping(address => uint256) public wards;

    // --- events ---

    event Rely(address indexed usr);
    event Deny(address indexed usr);
    event Approve(address indexed asset, address indexed spender, uint256 amount);

    // --- modifiers ---

    modifier auth() {
        require(wards[msg.sender] == 1, "AllocatorBuffer/not-authorized");
        _;
    }

    // --- constructor ---

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

    // --- administration ---

    function rely(address usr) external auth {
        wards[usr] = 1;
        emit Rely(usr);
    }

    function deny(address usr) external auth {
        wards[usr] = 0;
        emit Deny(usr);
    }

    // --- functions ---

    function approve(address asset, address spender, uint256 amount) external auth {
        GemLike(asset).approve(spender, amount);
        emit Approve(asset, spender, amount);
    }
}

Settings
{
  "remappings": [
    "ds-test/=lib/dss-test/lib/forge-std/lib/ds-test/src/",
    "dss-interfaces/=lib/dss-test/lib/dss-interfaces/src/",
    "dss-test/=lib/dss-test/src/",
    "forge-std/=lib/dss-test/lib/forge-std/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","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":"asset","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","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"}]

0x608060405234801561001057600080fd5b503360008181526020819052604080822060019055517fdd0e34038ac38b2a1ce960229778ac48a8719bc900b6c4f8d0475c6e8b385a609190a2610378806100596000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806365fae35e146100515780639c52a7f114610066578063bf353dbb14610079578063e1f21c67146100ab575b600080fd5b61006461005f3660046102ad565b6100be565b005b6100646100743660046102ad565b61013b565b6100996100873660046102ad565b60006020819052908152604090205481565b60405190815260200160405180910390f35b6100646100b93660046102cf565b6101ae565b336000908152602081905260409020546001146100f65760405162461bcd60e51b81526004016100ed9061030b565b60405180910390fd5b6001600160a01b03811660008181526020819052604080822060019055517fdd0e34038ac38b2a1ce960229778ac48a8719bc900b6c4f8d0475c6e8b385a609190a250565b3360009081526020819052604090205460011461016a5760405162461bcd60e51b81526004016100ed9061030b565b6001600160a01b038116600081815260208190526040808220829055517f184450df2e323acec0ed3b5c7531b81f9b4cdef7914dfd4c0a4317416bb5251b9190a250565b336000908152602081905260409020546001146101dd5760405162461bcd60e51b81526004016100ed9061030b565b60405163095ea7b360e01b81526001600160a01b0383811660048301526024820183905284169063095ea7b390604401600060405180830381600087803b15801561022757600080fd5b505af115801561023b573d6000803e3d6000fd5b50505050816001600160a01b0316836001600160a01b03167f6e11fb1b7f119e3f2fa29896ef5fdf8b8a2d0d4df6fe90ba8668e7d8b2ffa25e8360405161028491815260200190565b60405180910390a3505050565b80356001600160a01b03811681146102a857600080fd5b919050565b6000602082840312156102bf57600080fd5b6102c882610291565b9392505050565b6000806000606084860312156102e457600080fd5b6102ed84610291565b92506102fb60208501610291565b9150604084013590509250925092565b6020808252601e908201527f416c6c6f6361746f724275666665722f6e6f742d617574686f72697a6564000060408201526060019056fea2646970667358221220395345e76debd5d9d8552511ea732fab6a94bab60f52cab70bc21f4d0c9be23164736f6c63430008100033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806365fae35e146100515780639c52a7f114610066578063bf353dbb14610079578063e1f21c67146100ab575b600080fd5b61006461005f3660046102ad565b6100be565b005b6100646100743660046102ad565b61013b565b6100996100873660046102ad565b60006020819052908152604090205481565b60405190815260200160405180910390f35b6100646100b93660046102cf565b6101ae565b336000908152602081905260409020546001146100f65760405162461bcd60e51b81526004016100ed9061030b565b60405180910390fd5b6001600160a01b03811660008181526020819052604080822060019055517fdd0e34038ac38b2a1ce960229778ac48a8719bc900b6c4f8d0475c6e8b385a609190a250565b3360009081526020819052604090205460011461016a5760405162461bcd60e51b81526004016100ed9061030b565b6001600160a01b038116600081815260208190526040808220829055517f184450df2e323acec0ed3b5c7531b81f9b4cdef7914dfd4c0a4317416bb5251b9190a250565b336000908152602081905260409020546001146101dd5760405162461bcd60e51b81526004016100ed9061030b565b60405163095ea7b360e01b81526001600160a01b0383811660048301526024820183905284169063095ea7b390604401600060405180830381600087803b15801561022757600080fd5b505af115801561023b573d6000803e3d6000fd5b50505050816001600160a01b0316836001600160a01b03167f6e11fb1b7f119e3f2fa29896ef5fdf8b8a2d0d4df6fe90ba8668e7d8b2ffa25e8360405161028491815260200190565b60405180910390a3505050565b80356001600160a01b03811681146102a857600080fd5b919050565b6000602082840312156102bf57600080fd5b6102c882610291565b9392505050565b6000806000606084860312156102e457600080fd5b6102ed84610291565b92506102fb60208501610291565b9150604084013590509250925092565b6020808252601e908201527f416c6c6f6361746f724275666665722f6e6f742d617574686f72697a6564000060408201526060019056fea2646970667358221220395345e76debd5d9d8552511ea732fab6a94bab60f52cab70bc21f4d0c9be23164736f6c63430008100033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.