ETH Price: $1,791.11 (+10.03%)
 

Overview

ETH Balance

Scroll LogoScroll LogoScroll Logo0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Admin97113192024-09-29 8:03:25206 days ago1727597005IN
0xD80F36D2...dd523fD82
0 ETH0.000003660.07
Set Base Swapper97111722024-09-29 7:56:14206 days ago1727596574IN
0xD80F36D2...dd523fD82
0 ETH0.000008590.05948202
Set Implementati...26984382024-01-23 6:11:39456 days ago1705990299IN
0xD80F36D2...dd523fD82
0 ETH0.000084430.4

Latest 24 internal transactions

Parent Transaction Hash Block From To
125158002025-01-07 9:16:14105 days ago1736241374
0xD80F36D2...dd523fD82
0.00320046 ETH
125158002025-01-07 9:16:14105 days ago1736241374
0xD80F36D2...dd523fD82
0.00320046 ETH
115742012024-12-02 4:12:03142 days ago1733112723
0xD80F36D2...dd523fD82
0.02647387 ETH
115742012024-12-02 4:12:03142 days ago1733112723
0xD80F36D2...dd523fD82
0.02647387 ETH
102021542024-10-16 0:39:19189 days ago1729039159
0xD80F36D2...dd523fD82
0.01 ETH
102021542024-10-16 0:39:19189 days ago1729039159
0xD80F36D2...dd523fD82
0.01 ETH
100733422024-10-11 18:08:15193 days ago1728670095
0xD80F36D2...dd523fD82
0.01000042 ETH
100733422024-10-11 18:08:15193 days ago1728670095
0xD80F36D2...dd523fD82
0.01000042 ETH
100259602024-10-10 3:37:51195 days ago1728531471
0xD80F36D2...dd523fD82
0.015 ETH
100259602024-10-10 3:37:51195 days ago1728531471
0xD80F36D2...dd523fD82
0.015 ETH
100051282024-10-09 10:37:41195 days ago1728470261
0xD80F36D2...dd523fD82
0.0012 ETH
100051282024-10-09 10:37:41195 days ago1728470261
0xD80F36D2...dd523fD82
0.0012 ETH
99817632024-10-08 15:28:10196 days ago1728401290
0xD80F36D2...dd523fD82
0.011 ETH
99817632024-10-08 15:28:10196 days ago1728401290
0xD80F36D2...dd523fD82
0.011 ETH
99803902024-10-08 14:23:09196 days ago1728397389
0xD80F36D2...dd523fD82
0.018 ETH
99803902024-10-08 14:23:09196 days ago1728397389
0xD80F36D2...dd523fD82
0.018 ETH
99539852024-10-07 16:39:25197 days ago1728319165
0xD80F36D2...dd523fD82
0.05 ETH
99539852024-10-07 16:39:25197 days ago1728319165
0xD80F36D2...dd523fD82
0.05 ETH
99521352024-10-07 15:07:29197 days ago1728313649
0xD80F36D2...dd523fD82
0.011 ETH
99521352024-10-07 15:07:29197 days ago1728313649
0xD80F36D2...dd523fD82
0.011 ETH
98882452024-10-05 10:02:54199 days ago1728122574
0xD80F36D2...dd523fD82
0.006 ETH
98882452024-10-05 10:02:54199 days ago1728122574
0xD80F36D2...dd523fD82
0.006 ETH
98270132024-10-03 7:26:44202 days ago1727940404
0xD80F36D2...dd523fD82
0.012833 ETH
98270132024-10-03 7:26:44202 days ago1727940404
0xD80F36D2...dd523fD82
0.012833 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Swapper

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 4 : Swapper.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0 <0.9.0;

import './SwapperStorage.sol';

contract Swapper is SwapperStorage {

    fallback() external payable {
        address imp = implementation;
        assembly {
            calldatacopy(0, 0, calldatasize())
            let result := delegatecall(gas(), imp, 0, calldatasize(), 0, 0)
            returndatacopy(0, 0, returndatasize())
            switch result
            case 0 { revert(0, returndatasize()) }
            default { return(0, returndatasize()) }
        }
    }

    receive() external payable {}

}

File 2 of 4 : SwapperStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0 <0.9.0;

import '../../utils/Admin.sol';
import '../../utils/Implementation.sol';

abstract contract SwapperStorage is Admin, Implementation {

    // tokenBX => base swapper, address(1) is reserved for ETH
    mapping(address => address) public baseSwappers;

    // tokenBX => oracleId
    mapping(address => bytes32) public oracleIds;

    // tokenBX => maxSlippageRatio
    mapping(address => uint256) public maxSlippageRatios;

}

File 3 of 4 : Admin.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0 <0.9.0;

abstract contract Admin {

    error OnlyAdmin();

    event NewAdmin(address newAdmin);

    address public admin;

    modifier _onlyAdmin_() {
        if (msg.sender != admin) {
            revert OnlyAdmin();
        }
        _;
    }

    constructor () {
        admin = msg.sender;
        emit NewAdmin(admin);
    }

    /**
     * @notice Set a new admin for the contract.
     * @dev This function allows the current admin to assign a new admin address without performing any explicit verification.
     *      It's the current admin's responsibility to ensure that the 'newAdmin' address is correct and secure.
     * @param newAdmin The address of the new admin.
     */
    function setAdmin(address newAdmin) external _onlyAdmin_ {
        admin = newAdmin;
        emit NewAdmin(newAdmin);
    }

}

File 4 of 4 : Implementation.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0 <0.9.0;

import './Admin.sol';

abstract contract Implementation is Admin {

    event NewImplementation(address newImplementation);

    address public implementation;

    // @notice Set a new implementation address for the contract
    function setImplementation(address newImplementation) external _onlyAdmin_ {
        implementation = newImplementation;
        emit NewImplementation(newImplementation);
    }

}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"name":"OnlyAdmin","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"NewAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newImplementation","type":"address"}],"name":"NewImplementation","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"baseSwappers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxSlippageRatios","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"oracleIds","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"setImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b50600080546001600160a01b031916339081179091556040519081527f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c9060200160405180910390a1610347806100686000396000f3fe6080604052600436106100745760003560e01c8063704b6c021161004e578063704b6c021461015b57806378bf9d4e1461017b578063d784d426146101a8578063f851a440146101c85761007b565b80632a63ac5c146100ad57806331fe80bb146101005780635c60da1b1461013b5761007b565b3661007b57005b6001546001600160a01b03163660008037600080366000845af43d6000803e8080156100a6573d6000f35b3d6000fd5b005b3480156100b957600080fd5b506100e36100c83660046102e1565b6002602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010c57600080fd5b5061012d61011b3660046102e1565b60036020526000908152604090205481565b6040519081526020016100f7565b34801561014757600080fd5b506001546100e3906001600160a01b031681565b34801561016757600080fd5b506100ab6101763660046102e1565b6101e8565b34801561018757600080fd5b5061012d6101963660046102e1565b60046020526000908152604090205481565b3480156101b457600080fd5b506100ab6101c33660046102e1565b610268565b3480156101d457600080fd5b506000546100e3906001600160a01b031681565b6000546001600160a01b0316331461021357604051634755657960e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c906020015b60405180910390a150565b6000546001600160a01b0316331461029357604051634755657960e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f6b70829fcbe4891157f7a7496f9870927de3c8237adbe9cd39bae09b7382c4099060200161025d565b6000602082840312156102f357600080fd5b81356001600160a01b038116811461030a57600080fd5b939250505056fea2646970667358221220072b474bc4292a9933cefb8ae3485e6f812a3b483a70a75a497c0079be5ef11664736f6c63430008140033

Deployed Bytecode

0x6080604052600436106100745760003560e01c8063704b6c021161004e578063704b6c021461015b57806378bf9d4e1461017b578063d784d426146101a8578063f851a440146101c85761007b565b80632a63ac5c146100ad57806331fe80bb146101005780635c60da1b1461013b5761007b565b3661007b57005b6001546001600160a01b03163660008037600080366000845af43d6000803e8080156100a6573d6000f35b3d6000fd5b005b3480156100b957600080fd5b506100e36100c83660046102e1565b6002602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010c57600080fd5b5061012d61011b3660046102e1565b60036020526000908152604090205481565b6040519081526020016100f7565b34801561014757600080fd5b506001546100e3906001600160a01b031681565b34801561016757600080fd5b506100ab6101763660046102e1565b6101e8565b34801561018757600080fd5b5061012d6101963660046102e1565b60046020526000908152604090205481565b3480156101b457600080fd5b506100ab6101c33660046102e1565b610268565b3480156101d457600080fd5b506000546100e3906001600160a01b031681565b6000546001600160a01b0316331461021357604051634755657960e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c906020015b60405180910390a150565b6000546001600160a01b0316331461029357604051634755657960e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f6b70829fcbe4891157f7a7496f9870927de3c8237adbe9cd39bae09b7382c4099060200161025d565b6000602082840312156102f357600080fd5b81356001600160a01b038116811461030a57600080fd5b939250505056fea2646970667358221220072b474bc4292a9933cefb8ae3485e6f812a3b483a70a75a497c0079be5ef11664736f6c63430008140033

Block Transaction Gas Used Reward
view all blocks sequenced

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
[ Download: CSV Export  ]
[ 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.