Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
UsdsJoin
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 /// UsdsJoin.sol -- Usds adapter // Copyright (C) 2018 Rain <[email protected]> // 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 UsdsLike { function burn(address,uint256) external; function mint(address,uint256) external; } interface VatLike { function move(address,address,uint256) external; } contract UsdsJoin { VatLike public immutable vat; // CDP Engine UsdsLike public immutable usds; // Stablecoin Token uint256 constant RAY = 10 ** 27; // --- Events --- event Join(address indexed caller, address indexed usr, uint256 wad); event Exit(address indexed caller, address indexed usr, uint256 wad); constructor(address vat_, address usds_) { vat = VatLike(vat_); usds = UsdsLike(usds_); } function join(address usr, uint256 wad) external { vat.move(address(this), usr, RAY * wad); usds.burn(msg.sender, wad); emit Join(msg.sender, usr, wad); } function exit(address usr, uint256 wad) external { vat.move(msg.sender, address(this), RAY * wad); usds.mint(usr, wad); emit Exit(msg.sender, usr, wad); } // To fully cover daiJoin abi function dai() external view returns (address) { return address(usds); } }
{ "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "forge-std/=lib/openzeppelin-foundry-upgrades/lib/forge-std/src/", "ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/", "dss-interfaces/=lib/token-tests/lib/dss-test/lib/dss-interfaces/src/", "dss-test/=lib/token-tests/lib/dss-test/src/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/", "openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/", "solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/", "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":"vat_","type":"address"},{"internalType":"address","name":"usds_","type":"address"}],"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":"wad","type":"uint256"}],"name":"Exit","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":"wad","type":"uint256"}],"name":"Join","type":"event"},{"inputs":[],"name":"dai","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"join","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usds","outputs":[{"internalType":"contract UsdsLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vat","outputs":[{"internalType":"contract VatLike","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c060405234801561001057600080fd5b5060405161056738038061056783398101604081905261002f91610062565b6001600160a01b039182166080521660a052610095565b80516001600160a01b038116811461005d57600080fd5b919050565b6000806040838503121561007557600080fd5b61007e83610046565b915061008c60208401610046565b90509250929050565b60805160a05161048d6100da6000396000818160b90152818160f0015281816101dc015261035901526000818160610152818161011e0152610291015261048d6000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806336569e771461005c5780633b4da69f1461009f5780634cf282fb146100b4578063ef693bed146100db578063f4b9fa75146100ee575b600080fd5b6100837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b6100b26100ad3660046103f4565b610114565b005b6100837f000000000000000000000000000000000000000000000000000000000000000081565b6100b26100e93660046103f4565b610287565b7f0000000000000000000000000000000000000000000000000000000000000000610083565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663bb35783b308461015b856b033b2e3c9fd0803ce800000061042c565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b1580156101aa57600080fd5b505af11580156101be573d6000803e3d6000fd5b5050604051632770a7eb60e21b8152336004820152602481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169250639dc29fac9150604401600060405180830381600087803b15801561022a57600080fd5b505af115801561023e573d6000803e3d6000fd5b50506040518381526001600160a01b03851692503391507f0e64978d073561c3dfd4d4e3e4dce066cde2ab246a44f990fabb0a21a4a3bd95906020015b60405180910390a35050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663bb35783b33306102ce856b033b2e3c9fd0803ce800000061042c565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561031d57600080fd5b505af1158015610331573d6000803e3d6000fd5b50506040516340c10f1960e01b81526001600160a01b038581166004830152602482018590527f00000000000000000000000000000000000000000000000000000000000000001692506340c10f199150604401600060405180830381600087803b15801561039f57600080fd5b505af11580156103b3573d6000803e3d6000fd5b50506040518381526001600160a01b03851692503391507fbc2a67d422c268da6fe45f3e7d194e1d98906d221f1cfad62a5c80f2cd209f4c9060200161027b565b6000806040838503121561040757600080fd5b82356001600160a01b038116811461041e57600080fd5b946020939093013593505050565b808202811582820484141761045157634e487b7160e01b600052601160045260246000fd5b9291505056fea2646970667358221220c0c56218479e43cc4e7e1a60769ed4f242a70461851cafd353aa06c6eaaad12264736f6c6343000815003300000000000000000000000035d1b3f3d7966a1dfe207aa4514c12a259a0492b000000000000000000000000dc035d45d973e3ec169d2276ddab16f1e407384f
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100575760003560e01c806336569e771461005c5780633b4da69f1461009f5780634cf282fb146100b4578063ef693bed146100db578063f4b9fa75146100ee575b600080fd5b6100837f00000000000000000000000035d1b3f3d7966a1dfe207aa4514c12a259a0492b81565b6040516001600160a01b03909116815260200160405180910390f35b6100b26100ad3660046103f4565b610114565b005b6100837f000000000000000000000000dc035d45d973e3ec169d2276ddab16f1e407384f81565b6100b26100e93660046103f4565b610287565b7f000000000000000000000000dc035d45d973e3ec169d2276ddab16f1e407384f610083565b6001600160a01b037f00000000000000000000000035d1b3f3d7966a1dfe207aa4514c12a259a0492b1663bb35783b308461015b856b033b2e3c9fd0803ce800000061042c565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b1580156101aa57600080fd5b505af11580156101be573d6000803e3d6000fd5b5050604051632770a7eb60e21b8152336004820152602481018490527f000000000000000000000000dc035d45d973e3ec169d2276ddab16f1e407384f6001600160a01b03169250639dc29fac9150604401600060405180830381600087803b15801561022a57600080fd5b505af115801561023e573d6000803e3d6000fd5b50506040518381526001600160a01b03851692503391507f0e64978d073561c3dfd4d4e3e4dce066cde2ab246a44f990fabb0a21a4a3bd95906020015b60405180910390a35050565b6001600160a01b037f00000000000000000000000035d1b3f3d7966a1dfe207aa4514c12a259a0492b1663bb35783b33306102ce856b033b2e3c9fd0803ce800000061042c565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561031d57600080fd5b505af1158015610331573d6000803e3d6000fd5b50506040516340c10f1960e01b81526001600160a01b038581166004830152602482018590527f000000000000000000000000dc035d45d973e3ec169d2276ddab16f1e407384f1692506340c10f199150604401600060405180830381600087803b15801561039f57600080fd5b505af11580156103b3573d6000803e3d6000fd5b50506040518381526001600160a01b03851692503391507fbc2a67d422c268da6fe45f3e7d194e1d98906d221f1cfad62a5c80f2cd209f4c9060200161027b565b6000806040838503121561040757600080fd5b82356001600160a01b038116811461041e57600080fd5b946020939093013593505050565b808202811582820484141761045157634e487b7160e01b600052601160045260246000fd5b9291505056fea2646970667358221220c0c56218479e43cc4e7e1a60769ed4f242a70461851cafd353aa06c6eaaad12264736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000035d1b3f3d7966a1dfe207aa4514c12a259a0492b000000000000000000000000dc035d45d973e3ec169d2276ddab16f1e407384f
-----Decoded View---------------
Arg [0] : vat_ (address): 0x35D1b3F3D7966A1DFe207aa4514C12a259A0492B
Arg [1] : usds_ (address): 0xdC035D45d973E3EC169d2276DDab16f1e407384F
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000035d1b3f3d7966a1dfe207aa4514c12a259a0492b
Arg [1] : 000000000000000000000000dc035d45d973e3ec169d2276ddab16f1e407384f
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 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.