Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 3,752 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Mkr To Sky | 22867405 | 229 days ago | IN | 0 ETH | 0.00016044 | ||||
| Mkr To Sky | 22867397 | 229 days ago | IN | 0 ETH | 0.00021319 | ||||
| Mkr To Sky | 22858991 | 230 days ago | IN | 0 ETH | 0.00008585 | ||||
| Mkr To Sky | 22853728 | 231 days ago | IN | 0 ETH | 0.00019597 | ||||
| Mkr To Sky | 22823955 | 235 days ago | IN | 0 ETH | 0.00004634 | ||||
| Mkr To Sky | 22817661 | 236 days ago | IN | 0 ETH | 0.00037165 | ||||
| Mkr To Sky | 22817346 | 236 days ago | IN | 0 ETH | 0.00031075 | ||||
| Mkr To Sky | 22817271 | 236 days ago | IN | 0 ETH | 0.00026868 | ||||
| Mkr To Sky | 22816343 | 236 days ago | IN | 0 ETH | 0.00022134 | ||||
| Mkr To Sky | 22816246 | 236 days ago | IN | 0 ETH | 0.00023694 | ||||
| Mkr To Sky | 22816123 | 236 days ago | IN | 0 ETH | 0.00005308 | ||||
| Mkr To Sky | 22815951 | 237 days ago | IN | 0 ETH | 0.00023144 | ||||
| Mkr To Sky | 22815447 | 237 days ago | IN | 0 ETH | 0.00003114 | ||||
| Mkr To Sky | 22815109 | 237 days ago | IN | 0 ETH | 0.0001989 | ||||
| Mkr To Sky | 22814198 | 237 days ago | IN | 0 ETH | 0.00017997 | ||||
| Mkr To Sky | 22813973 | 237 days ago | IN | 0 ETH | 0.0001839 | ||||
| Mkr To Sky | 22813815 | 237 days ago | IN | 0 ETH | 0.00002495 | ||||
| Mkr To Sky | 22812848 | 237 days ago | IN | 0 ETH | 0.0000263 | ||||
| Mkr To Sky | 22812625 | 237 days ago | IN | 0 ETH | 0.00018102 | ||||
| Mkr To Sky | 22812559 | 237 days ago | IN | 0 ETH | 0.00017989 | ||||
| Mkr To Sky | 22811468 | 237 days ago | IN | 0 ETH | 0.0001114 | ||||
| Mkr To Sky | 22811236 | 237 days ago | IN | 0 ETH | 0.0002184 | ||||
| Mkr To Sky | 22810648 | 237 days ago | IN | 0 ETH | 0.00018484 | ||||
| Mkr To Sky | 22810071 | 237 days ago | IN | 0 ETH | 0.00018368 | ||||
| Mkr To Sky | 22808945 | 237 days ago | IN | 0 ETH | 0.0001952 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
MkrSky
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0-or-later
/// MkrSky.sol -- Mkr/Sky Exchanger
// Copyright (C) 2023 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.8.21;
interface GemLike {
function burn(address, uint256) external;
function mint(address, uint256) external;
}
contract MkrSky {
GemLike public immutable mkr;
GemLike public immutable sky;
uint256 public immutable rate;
event MkrToSky(address indexed caller, address indexed usr, uint256 mkrAmt, uint256 skyAmt);
event SkyToMkr(address indexed caller, address indexed usr, uint256 skyAmt, uint256 mkrAmt);
constructor(address mkr_, address sky_, uint256 rate_) {
mkr = GemLike(mkr_);
sky = GemLike(sky_);
rate = rate_;
}
function mkrToSky(address usr, uint256 mkrAmt) external {
mkr.burn(msg.sender, mkrAmt);
uint256 skyAmt = mkrAmt * rate;
sky.mint(usr, skyAmt);
emit MkrToSky(msg.sender, usr, mkrAmt, skyAmt);
}
function skyToMkr(address usr, uint256 skyAmt) external {
sky.burn(msg.sender, skyAmt);
uint256 mkrAmt = skyAmt / rate; // Rounding down, dust will be lost if it is not multiple of rate
mkr.mint(usr, mkrAmt);
emit SkyToMkr(msg.sender, usr, skyAmt, mkrAmt);
}
}{
"remappings": [
"dss-interfaces/=lib/token-tests/lib/dss-test/lib/dss-interfaces/src/",
"dss-test/=lib/token-tests/lib/dss-test/src/",
"forge-std/=lib/token-tests/lib/dss-test/lib/forge-std/src/",
"token-tests/=lib/token-tests/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "paris",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"mkr_","type":"address"},{"internalType":"address","name":"sky_","type":"address"},{"internalType":"uint256","name":"rate_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"usr","type":"address"},{"indexed":false,"internalType":"uint256","name":"mkrAmt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"skyAmt","type":"uint256"}],"name":"MkrToSky","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"usr","type":"address"},{"indexed":false,"internalType":"uint256","name":"skyAmt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mkrAmt","type":"uint256"}],"name":"SkyToMkr","type":"event"},{"inputs":[],"name":"mkr","outputs":[{"internalType":"contract GemLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"mkrAmt","type":"uint256"}],"name":"mkrToSky","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sky","outputs":[{"internalType":"contract GemLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"skyAmt","type":"uint256"}],"name":"skyToMkr","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60e060405234801561001057600080fd5b506040516105d03803806105d083398101604081905261002f91610066565b6001600160a01b03928316608052911660a05260c0526100a2565b80516001600160a01b038116811461006157600080fd5b919050565b60008060006060848603121561007b57600080fd5b6100848461004a565b92506100926020850161004a565b9150604084015190509250925092565b60805160a05160c0516104d86100f8600039600081816061015281816101a80152610329015260008181609b015281816101fb01526102c101526000818160da01528181610140015261037c01526104d86000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80632c4e722e1461005c57806369231804146100965780637e992cb8146100d5578063ab89605a146100fc578063c24c191414610111575b600080fd5b6100837f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b6100bd7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161008d565b6100bd7f000000000000000000000000000000000000000000000000000000000000000081565b61010f61010a36600461041d565b610124565b005b61010f61011f36600461041d565b6102a5565b604051632770a7eb60e21b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639dc29fac90604401600060405180830381600087803b15801561018c57600080fd5b505af11580156101a0573d6000803e3d6000fd5b5050505060007f0000000000000000000000000000000000000000000000000000000000000000826101d29190610455565b6040516340c10f1960e01b81526001600160a01b038581166004830152602482018390529192507f0000000000000000000000000000000000000000000000000000000000000000909116906340c10f1990604401600060405180830381600087803b15801561024157600080fd5b505af1158015610255573d6000803e3d6000fd5b505060408051858152602081018590526001600160a01b03871693503392507f751bfeaa2bccc50ef150efeaf65ef79018f1dd61e4078d49943229e31eb8ce1a91015b60405180910390a3505050565b604051632770a7eb60e21b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639dc29fac90604401600060405180830381600087803b15801561030d57600080fd5b505af1158015610321573d6000803e3d6000fd5b5050505060007f0000000000000000000000000000000000000000000000000000000000000000826103539190610480565b6040516340c10f1960e01b81526001600160a01b038581166004830152602482018390529192507f0000000000000000000000000000000000000000000000000000000000000000909116906340c10f1990604401600060405180830381600087803b1580156103c257600080fd5b505af11580156103d6573d6000803e3d6000fd5b505060408051858152602081018590526001600160a01b03871693503392507f0b1fb0d52b80bbeb62e78812263b366050decf127155b6dc1c7d4879e39c85669101610298565b6000806040838503121561043057600080fd5b82356001600160a01b038116811461044757600080fd5b946020939093013593505050565b808202811582820484141761047a57634e487b7160e01b600052601160045260246000fd5b92915050565b60008261049d57634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220658c9359b98835c3c954ea156e254499f0d7a1cff3076961279c5f27a565e0b264736f6c634300081500330000000000000000000000009f8f72aa9304c8b593d555f12ef6589cc3a579a200000000000000000000000056072c95faa701256059aa122697b133aded92790000000000000000000000000000000000000000000000000000000000005dc0
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100575760003560e01c80632c4e722e1461005c57806369231804146100965780637e992cb8146100d5578063ab89605a146100fc578063c24c191414610111575b600080fd5b6100837f0000000000000000000000000000000000000000000000000000000000005dc081565b6040519081526020015b60405180910390f35b6100bd7f00000000000000000000000056072c95faa701256059aa122697b133aded927981565b6040516001600160a01b03909116815260200161008d565b6100bd7f0000000000000000000000009f8f72aa9304c8b593d555f12ef6589cc3a579a281565b61010f61010a36600461041d565b610124565b005b61010f61011f36600461041d565b6102a5565b604051632770a7eb60e21b8152336004820152602481018290527f0000000000000000000000009f8f72aa9304c8b593d555f12ef6589cc3a579a26001600160a01b031690639dc29fac90604401600060405180830381600087803b15801561018c57600080fd5b505af11580156101a0573d6000803e3d6000fd5b5050505060007f0000000000000000000000000000000000000000000000000000000000005dc0826101d29190610455565b6040516340c10f1960e01b81526001600160a01b038581166004830152602482018390529192507f00000000000000000000000056072c95faa701256059aa122697b133aded9279909116906340c10f1990604401600060405180830381600087803b15801561024157600080fd5b505af1158015610255573d6000803e3d6000fd5b505060408051858152602081018590526001600160a01b03871693503392507f751bfeaa2bccc50ef150efeaf65ef79018f1dd61e4078d49943229e31eb8ce1a91015b60405180910390a3505050565b604051632770a7eb60e21b8152336004820152602481018290527f00000000000000000000000056072c95faa701256059aa122697b133aded92796001600160a01b031690639dc29fac90604401600060405180830381600087803b15801561030d57600080fd5b505af1158015610321573d6000803e3d6000fd5b5050505060007f0000000000000000000000000000000000000000000000000000000000005dc0826103539190610480565b6040516340c10f1960e01b81526001600160a01b038581166004830152602482018390529192507f0000000000000000000000009f8f72aa9304c8b593d555f12ef6589cc3a579a2909116906340c10f1990604401600060405180830381600087803b1580156103c257600080fd5b505af11580156103d6573d6000803e3d6000fd5b505060408051858152602081018590526001600160a01b03871693503392507f0b1fb0d52b80bbeb62e78812263b366050decf127155b6dc1c7d4879e39c85669101610298565b6000806040838503121561043057600080fd5b82356001600160a01b038116811461044757600080fd5b946020939093013593505050565b808202811582820484141761047a57634e487b7160e01b600052601160045260246000fd5b92915050565b60008261049d57634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220658c9359b98835c3c954ea156e254499f0d7a1cff3076961279c5f27a565e0b264736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000009f8f72aa9304c8b593d555f12ef6589cc3a579a200000000000000000000000056072c95faa701256059aa122697b133aded92790000000000000000000000000000000000000000000000000000000000005dc0
-----Decoded View---------------
Arg [0] : mkr_ (address): 0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2
Arg [1] : sky_ (address): 0x56072C95FAA701256059aa122697B133aDEd9279
Arg [2] : rate_ (uint256): 24000
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000009f8f72aa9304c8b593d555f12ef6589cc3a579a2
Arg [1] : 00000000000000000000000056072c95faa701256059aa122697b133aded9279
Arg [2] : 0000000000000000000000000000000000000000000000000000000000005dc0
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.