Source Code
Overview
CELO Balance
CELO Value
$0.00Multichain Info
Latest 1 from a total of 1 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Transfer Ownersh... | 52190219 | 68 days ago | IN | 0 CELO | 0.00078707 |
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x5AD965F6...fcdC0B70b The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
ERC2771Forwarder
Compiler Version
v0.8.30+commit.73712a01
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPLv3
pragma solidity ^0.8.23;
import { Ownable } from "@openzeppelin-v5/contracts/access/Ownable.sol";
/**
* @title Forwards calls preserving the original msg.sender according to ERC-2771
*/
contract ERC2771Forwarder is Ownable {
constructor() Ownable(_msgSender()) {}
/**
* @dev Forwards a call passing along the original msg.sender encoded as specified in ERC-2771.
* @param target The target contract to call
* @param msgSender The original msg.sender passed along by the trusted contract owner
* @param data The call data
*/
function forward2771Call(address target, address msgSender, bytes memory data)
external payable onlyOwner
returns(bool success, bytes memory returnData)
{
// solhint-disable-next-line avoid-low-level-calls
(success, returnData) = target.call{value: msg.value}(abi.encodePacked(data, msgSender));
}
/**
* @dev Allows to withdraw native tokens (ETH) which got stuck in this contract.
* This could happen if a call fails, but the caller doesn't revert the tx.
*/
function withdrawLostNativeTokens(address payable receiver) external onlyOwner {
receiver.transfer(address(this).balance);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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 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) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/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.
*
* The initial owner is set to the address provided by the deployer. 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.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(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 {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}{
"remappings": [],
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "shanghai",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"address","name":"msgSender","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"forward2771Call","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"returnData","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"receiver","type":"address"}],"name":"withdrawLostNativeTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
0x6080604052348015600e575f5ffd5b503380603357604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b603a81603f565b50608e565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6104938061009b5f395ff3fe608060405260043610610049575f3560e01c8063177ec5941461004d578063715018a6146100775780638da5cb5b1461008d578063a2852784146100b3578063f2fde38b146100d2575b5f5ffd5b61006061005b3660046102b6565b6100f1565b60405161006e9291906103af565b60405180910390f35b348015610082575f5ffd5b5061008b610180565b005b348015610098575f5ffd5b505f546040516001600160a01b03909116815260200161006e565b3480156100be575f5ffd5b5061008b6100cd3660046103ea565b610193565b3480156100dd575f5ffd5b5061008b6100ec3660046103ea565b6101d1565b5f60606100fc610213565b846001600160a01b031634848660405160200161011a92919061040c565b60408051601f198184030181529082905261013491610442565b5f6040518083038185875af1925050503d805f811461016e576040519150601f19603f3d011682016040523d82523d5f602084013e610173565b606091505b5090969095509350505050565b610188610213565b6101915f61023f565b565b61019b610213565b6040516001600160a01b038216904780156108fc02915f818181858888f193505050501580156101cd573d5f5f3e3d5ffd5b5050565b6101d9610213565b6001600160a01b03811661020757604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6102108161023f565b50565b5f546001600160a01b031633146101915760405163118cdaa760e01b81523360048201526024016101fe565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114610210575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b5f5f5f606084860312156102c8575f5ffd5b83356102d38161028e565b925060208401356102e38161028e565b9150604084013567ffffffffffffffff8111156102fe575f5ffd5b8401601f8101861361030e575f5ffd5b803567ffffffffffffffff811115610328576103286102a2565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715610357576103576102a2565b60405281815282820160200188101561036e575f5ffd5b816020840160208301375f602083830101528093505050509250925092565b5f5b838110156103a757818101518382015260200161038f565b50505f910152565b8215158152604060208201525f82518060408401526103d581606085016020870161038d565b601f01601f1916919091016060019392505050565b5f602082840312156103fa575f5ffd5b81356104058161028e565b9392505050565b5f835161041d81846020880161038d565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b5f825161045381846020870161038d565b919091019291505056fea2646970667358221220ddba59935fe436deff37903bc76b09e0dc677768bc115ce2ac1f67d9f3ffc6dc64736f6c634300081e0033
Deployed Bytecode
0x608060405260043610610049575f3560e01c8063177ec5941461004d578063715018a6146100775780638da5cb5b1461008d578063a2852784146100b3578063f2fde38b146100d2575b5f5ffd5b61006061005b3660046102b6565b6100f1565b60405161006e9291906103af565b60405180910390f35b348015610082575f5ffd5b5061008b610180565b005b348015610098575f5ffd5b505f546040516001600160a01b03909116815260200161006e565b3480156100be575f5ffd5b5061008b6100cd3660046103ea565b610193565b3480156100dd575f5ffd5b5061008b6100ec3660046103ea565b6101d1565b5f60606100fc610213565b846001600160a01b031634848660405160200161011a92919061040c565b60408051601f198184030181529082905261013491610442565b5f6040518083038185875af1925050503d805f811461016e576040519150601f19603f3d011682016040523d82523d5f602084013e610173565b606091505b5090969095509350505050565b610188610213565b6101915f61023f565b565b61019b610213565b6040516001600160a01b038216904780156108fc02915f818181858888f193505050501580156101cd573d5f5f3e3d5ffd5b5050565b6101d9610213565b6001600160a01b03811661020757604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6102108161023f565b50565b5f546001600160a01b031633146101915760405163118cdaa760e01b81523360048201526024016101fe565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114610210575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b5f5f5f606084860312156102c8575f5ffd5b83356102d38161028e565b925060208401356102e38161028e565b9150604084013567ffffffffffffffff8111156102fe575f5ffd5b8401601f8101861361030e575f5ffd5b803567ffffffffffffffff811115610328576103286102a2565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715610357576103576102a2565b60405281815282820160200188101561036e575f5ffd5b816020840160208301375f602083830101528093505050509250925092565b5f5b838110156103a757818101518382015260200161038f565b50505f910152565b8215158152604060208201525f82518060408401526103d581606085016020870161038d565b601f01601f1916919091016060019392505050565b5f602082840312156103fa575f5ffd5b81356104058161028e565b9392505050565b5f835161041d81846020880161038d565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b5f825161045381846020870161038d565b919091019291505056fea2646970667358221220ddba59935fe436deff37903bc76b09e0dc677768bc115ce2ac1f67d9f3ffc6dc64736f6c634300081e0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.