Source Code
Overview
S Balance
S Value
$0.00| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
CircleTokenAdapter
Compiler Version
v0.8.27+commit.40a35a09
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.27;
import {ICircleFiatToken} from "./interfaces/ICircleFiatToken.sol";
import {IMintedBurnableERC20} from "./interfaces/IMintedBurnableERC20.sol";
/// Adapter in between a Circle stablecoin (USDC/EURC) and the Bridge contract.
/// Implements methods required in tokens by the Bridge, translates their calls
/// to calling methods of the target stablecoin.
/// The contract should be deployable as implementation of deprecated FiatToken,
/// therefore it must be careful in using any storage.
/// @custom:security-contact [email protected]
contract CircleTokenAdapter is IMintedBurnableERC20 {
// All variables should be immutable to be compiled into the contract bytecode.
/// @notice Target stablecoin token.
ICircleFiatToken public immutable token;
/// @notice The bridge contract (allowed to call methods of the adapter).
address public immutable bridge;
constructor(ICircleFiatToken _token, address _bridge) {
require(address(_token) != address(0), "Token not set");
require(_bridge != address(0), "Bridge not set");
token = _token;
bridge = _bridge;
}
/// @notice Mint fiat tokens to an address.
/// @param account The address that will receive the minted tokens.
/// @param amount The amount of tokens to mint.
/// @return True if the operation was successful.
function mint(address account, uint256 amount) external returns (bool) {
require(msg.sender == bridge, "Sender is not bridge");
return token.mint(account, amount);
}
/// @notice Burn tokens from `account` account.
/// @param account The address whose tokens will be burned.
/// @param value the amount of tokens to be burned.
function burnFrom(address account, uint256 value) external {
require(msg.sender == bridge, "Sender is not bridge");
require(token.transferFrom(account, address(this), value), "TransferFrom failed");
token.burn(value);
}
/// Unsupported - only for compliance with IMintedBurnableERC20 interface.
function burn(uint256) external pure {
revert("Burn unsupported");
}
}// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.27; /// Circle's FiatToken interface. /// @custom:security-contact [email protected] interface ICircleFiatToken { /** * @dev Mint `amount` of tokens to given `account`. */ function mint(address _to, uint256 _amount) external returns (bool); /** * @dev Destroys a `value` amount of tokens from the caller. */ function burn(uint256 _amount) external; /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.27; /// Minted ERC-20 tokens represents an Ethereum ERC-20 tokens on L2. /// @custom:security-contact [email protected] interface IMintedBurnableERC20 { /** * @dev Mint `amount` of tokens to given `account`. */ function mint(address account, uint256 amount) external returns (bool); /** * @dev Destroys a `value` amount of tokens from the caller. */ function burn(uint256 value) external; /** * @dev Destroys a `value` amount of tokens from `account`, deducting from the caller's allowance. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least `value`. */ function burnFrom(address account, uint256 value) external; }
{
"evmVersion": "cancun",
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract ICircleFiatToken","name":"_token","type":"address"},{"internalType":"address","name":"_bridge","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"bridge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract ICircleFiatToken","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60c060405234801561000f575f5ffd5b5060405161061f38038061061f83398101604081905261002e916100ee565b6001600160a01b0382166100795760405162461bcd60e51b815260206004820152600d60248201526c151bdad95b881b9bdd081cd95d609a1b60448201526064015b60405180910390fd5b6001600160a01b0381166100c05760405162461bcd60e51b815260206004820152600e60248201526d109c9a5919d9481b9bdd081cd95d60921b6044820152606401610070565b6001600160a01b039182166080521660a052610126565b6001600160a01b03811681146100eb575f5ffd5b50565b5f5f604083850312156100ff575f5ffd5b825161010a816100d7565b602084015190925061011b816100d7565b809150509250929050565b60805160a0516104b76101685f395f818160ae0152818161011b015261026101525f818160ed015281816101aa015281816102f101526103b301526104b75ff3fe608060405234801561000f575f5ffd5b5060043610610055575f3560e01c806340c10f191461005957806342966c681461008157806379cc679014610096578063e78cea92146100a9578063fc0c546a146100e8575b5f5ffd5b61006c610067366004610416565b61010f565b60405190151581526020015b60405180910390f35b61009461008f36600461044b565b61021b565b005b6100946100a4366004610416565b610256565b6100d07f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610078565b6100d07f000000000000000000000000000000000000000000000000000000000000000081565b5f336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101845760405162461bcd60e51b815260206004820152601460248201527353656e646572206973206e6f742062726964676560601b60448201526064015b60405180910390fd5b6040516340c10f1960e01b81526001600160a01b038481166004830152602482018490527f000000000000000000000000000000000000000000000000000000000000000016906340c10f19906044016020604051808303815f875af11580156101f0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102149190610462565b9392505050565b60405162461bcd60e51b815260206004820152601060248201526f109d5c9b881d5b9cdd5c1c1bdc9d195960821b604482015260640161017b565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146102c55760405162461bcd60e51b815260206004820152601460248201527353656e646572206973206e6f742062726964676560601b604482015260640161017b565b6040516323b872dd60e01b81526001600160a01b038381166004830152306024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303815f875af1158015610337573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061035b9190610462565b61039d5760405162461bcd60e51b8152602060048201526013602482015272151c985b9cd9995c919c9bdb4819985a5b1959606a1b604482015260640161017b565b604051630852cd8d60e31b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c68906024015f604051808303815f87803b1580156103fc575f5ffd5b505af115801561040e573d5f5f3e3d5ffd5b505050505050565b5f5f60408385031215610427575f5ffd5b82356001600160a01b038116811461043d575f5ffd5b946020939093013593505050565b5f6020828403121561045b575f5ffd5b5035919050565b5f60208284031215610472575f5ffd5b81518015158114610214575f5ffdfea2646970667358221220158bb8e7d41615b8746c354a6d7630b88f58556b99324aa050decdf884fc8fed64736f6c634300081b0033000000000000000000000000e715cba7b5ccb33790cebff1436809d36cb17e570000000000000000000000009ef7629f9b930168b76283add7120777b3c895b3
Deployed Bytecode
0x608060405234801561000f575f5ffd5b5060043610610055575f3560e01c806340c10f191461005957806342966c681461008157806379cc679014610096578063e78cea92146100a9578063fc0c546a146100e8575b5f5ffd5b61006c610067366004610416565b61010f565b60405190151581526020015b60405180910390f35b61009461008f36600461044b565b61021b565b005b6100946100a4366004610416565b610256565b6100d07f0000000000000000000000009ef7629f9b930168b76283add7120777b3c895b381565b6040516001600160a01b039091168152602001610078565b6100d07f000000000000000000000000e715cba7b5ccb33790cebff1436809d36cb17e5781565b5f336001600160a01b037f0000000000000000000000009ef7629f9b930168b76283add7120777b3c895b316146101845760405162461bcd60e51b815260206004820152601460248201527353656e646572206973206e6f742062726964676560601b60448201526064015b60405180910390fd5b6040516340c10f1960e01b81526001600160a01b038481166004830152602482018490527f000000000000000000000000e715cba7b5ccb33790cebff1436809d36cb17e5716906340c10f19906044016020604051808303815f875af11580156101f0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102149190610462565b9392505050565b60405162461bcd60e51b815260206004820152601060248201526f109d5c9b881d5b9cdd5c1c1bdc9d195960821b604482015260640161017b565b336001600160a01b037f0000000000000000000000009ef7629f9b930168b76283add7120777b3c895b316146102c55760405162461bcd60e51b815260206004820152601460248201527353656e646572206973206e6f742062726964676560601b604482015260640161017b565b6040516323b872dd60e01b81526001600160a01b038381166004830152306024830152604482018390527f000000000000000000000000e715cba7b5ccb33790cebff1436809d36cb17e5716906323b872dd906064016020604051808303815f875af1158015610337573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061035b9190610462565b61039d5760405162461bcd60e51b8152602060048201526013602482015272151c985b9cd9995c919c9bdb4819985a5b1959606a1b604482015260640161017b565b604051630852cd8d60e31b8152600481018290527f000000000000000000000000e715cba7b5ccb33790cebff1436809d36cb17e576001600160a01b0316906342966c68906024015f604051808303815f87803b1580156103fc575f5ffd5b505af115801561040e573d5f5f3e3d5ffd5b505050505050565b5f5f60408385031215610427575f5ffd5b82356001600160a01b038116811461043d575f5ffd5b946020939093013593505050565b5f6020828403121561045b575f5ffd5b5035919050565b5f60208284031215610472575f5ffd5b81518015158114610214575f5ffdfea2646970667358221220158bb8e7d41615b8746c354a6d7630b88f58556b99324aa050decdf884fc8fed64736f6c634300081b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e715cba7b5ccb33790cebff1436809d36cb17e570000000000000000000000009ef7629f9b930168b76283add7120777b3c895b3
-----Decoded View---------------
Arg [0] : _token (address): 0xe715cbA7B5cCb33790ceBFF1436809d36cb17E57
Arg [1] : _bridge (address): 0x9Ef7629F9B930168b76283AdD7120777b3c895b3
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000e715cba7b5ccb33790cebff1436809d36cb17e57
Arg [1] : 0000000000000000000000009ef7629f9b930168b76283add7120777b3c895b3
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in S
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.