123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545 |
- {
- "address": "0x00ebaBf931186c546d2413D553Bc81d2435d01Cf",
- "abi": [
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "src",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "guy",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "wad",
- "type": "uint256"
- }
- ],
- "name": "Approval",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "dst",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "wad",
- "type": "uint256"
- }
- ],
- "name": "Deposit",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "previousOwner",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "newOwner",
- "type": "address"
- }
- ],
- "name": "OwnershipTransferred",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "src",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "dst",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "wad",
- "type": "uint256"
- }
- ],
- "name": "Transfer",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "src",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "dst",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "wad",
- "type": "uint256"
- }
- ],
- "name": "TransferNative",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "src",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "wad",
- "type": "uint256"
- }
- ],
- "name": "Withdrawal",
- "type": "event"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "name": "allowance",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "guy",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "wad",
- "type": "uint256"
- }
- ],
- "name": "approve",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "name": "balanceOf",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "decimals",
- "outputs": [
- {
- "internalType": "uint8",
- "name": "",
- "type": "uint8"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "deposit",
- "outputs": [],
- "stateMutability": "payable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "name",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "name": "noUnwrapTo",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "view",
- "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": "_addr",
- "type": "address"
- }
- ],
- "name": "setNoUnwrapTo",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "symbol",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "totalSupply",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "dst",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "wad",
- "type": "uint256"
- }
- ],
- "name": "transfer",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "src",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "dst",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "wad",
- "type": "uint256"
- }
- ],
- "name": "transferFrom",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "newOwner",
- "type": "address"
- }
- ],
- "name": "transferOwnership",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "wad",
- "type": "uint256"
- }
- ],
- "name": "withdraw",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "stateMutability": "payable",
- "type": "receive"
- }
- ],
- "transactionHash": "0xab5680637a9046f817986e6659a2bf6e0ec34cb2001fe1d4231ac263c89b0496",
- "receipt": {
- "to": null,
- "from": "0x368715F09C1AB5E0B55bF5bA19cD887189A28DBE",
- "contractAddress": "0x00ebaBf931186c546d2413D553Bc81d2435d01Cf",
- "transactionIndex": 1,
- "gasUsed": "38176732",
- "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000080000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000080000000000000000000000000000000000040000000000000000000020000000000000000000000000000000000000000000000000000000000000000000",
- "blockHash": "0xd688a4977641423cb7afa8cf77aa554a41e8d5aa7bc2c915596f869e53892c98",
- "transactionHash": "0xab5680637a9046f817986e6659a2bf6e0ec34cb2001fe1d4231ac263c89b0496",
- "logs": [
- {
- "transactionIndex": 1,
- "blockNumber": 14284958,
- "transactionHash": "0xab5680637a9046f817986e6659a2bf6e0ec34cb2001fe1d4231ac263c89b0496",
- "address": "0x00ebaBf931186c546d2413D553Bc81d2435d01Cf",
- "topics": [
- "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
- "0x0000000000000000000000000000000000000000000000000000000000000000",
- "0x000000000000000000000000368715f09c1ab5e0b55bf5ba19cd887189a28dbe"
- ],
- "data": "0x",
- "logIndex": 0,
- "blockHash": "0xd688a4977641423cb7afa8cf77aa554a41e8d5aa7bc2c915596f869e53892c98"
- }
- ],
- "blockNumber": 14284958,
- "cumulativeGasUsed": "38176732",
- "status": 1,
- "byzantium": true
- },
- "args": [],
- "numDeployments": 1,
- "solcInputHash": "c474952dec744e7c88dc7c3d2b8d163f",
- "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"TransferNative\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"noUnwrapTo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"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\":\"_addr\",\"type\":\"address\"}],\"name\":\"setNoUnwrapTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/MirrorgateEthVault.sol\":\"MirrorgateEthVault\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x549c5343ad9f7e3f38aa4c4761854403502574bbc15b822db2ce892ff9b79da7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor () {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0x1153f6dd334c01566417b8c551122450542a2b75a2bbb379d59a8c320ed6da28\",\"license\":\"MIT\"},\"contracts/MirrorgateEthVault.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\r\\n// Copyright (C) 2015, 2016, 2017 Dapphub\\r\\n\\r\\n// This program is free software: you can redistribute it and/or modify\\r\\n// it under the terms of the GNU General Public License as published by\\r\\n// the Free Software Foundation, either version 3 of the License, or\\r\\n// (at your option) any later version.\\r\\n\\r\\n// This program is distributed in the hope that it will be useful,\\r\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\r\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\r\\n// GNU General Public License for more details.\\r\\n\\r\\n// You should have received a copy of the GNU General Public License\\r\\n// along with this program. If not, see <http://www.gnu.org/licenses/>.\\r\\n\\r\\npragma solidity ^0.7.6;\\r\\n\\r\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\r\\nimport \\\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\\\";\\r\\nimport \\\"./interfaces/IMirrorgateEthVault.sol\\\";\\r\\n\\r\\n// This contract always UNWRAPS the erc20 for native gas token on transfer + transferFrom.\\r\\n// If you wish to disable the transfer auto-unwrap, you can specify _to addresses with `setNoUnwrapTo`\\r\\ncontract MirrorgateEthVault is IMirrorgateEthVault, Ownable, ReentrancyGuard {\\r\\n string public constant name = \\\"Mirrorgate Ether Vault\\\";\\r\\n string public constant symbol = \\\"MGETH\\\";\\r\\n uint8 public constant decimals = 18;\\r\\n\\r\\n uint256 public totalSupply;\\r\\n\\r\\n event Approval(address indexed src, address indexed guy, uint wad);\\r\\n event Transfer(address indexed src, address indexed dst, uint wad);\\r\\n event Deposit(address indexed dst, uint wad);\\r\\n event Withdrawal(address indexed src, uint wad);\\r\\n event TransferNative(address indexed src, address indexed dst, uint wad);\\r\\n\\r\\n mapping(address => uint) public balanceOf;\\r\\n mapping(address => mapping(address => uint)) public allowance;\\r\\n mapping(address => bool) public noUnwrapTo;\\r\\n\\r\\n // if you do NOT wish to unwrap eth on transfers TO certain addresses\\r\\n function setNoUnwrapTo(address _addr) external onlyOwner {\\r\\n noUnwrapTo[_addr] = true;\\r\\n }\\r\\n\\r\\n function deposit() public payable override {\\r\\n balanceOf[msg.sender] += msg.value;\\r\\n totalSupply += msg.value;\\r\\n emit Deposit(msg.sender, msg.value);\\r\\n }\\r\\n\\r\\n function withdraw(uint wad) external override {\\r\\n require(balanceOf[msg.sender] >= wad);\\r\\n balanceOf[msg.sender] -= wad;\\r\\n msg.sender.transfer(wad);\\r\\n totalSupply -= wad;\\r\\n emit Withdrawal(msg.sender, wad);\\r\\n }\\r\\n\\r\\n function approve(address guy, uint wad) external override returns (bool) {\\r\\n allowance[msg.sender][guy] = wad;\\r\\n emit Approval(msg.sender, guy, wad);\\r\\n return true;\\r\\n }\\r\\n\\r\\n function transfer(address dst, uint wad) external override returns (bool) {\\r\\n return transferFrom(msg.sender, dst, wad);\\r\\n }\\r\\n\\r\\n function transferFrom(address src, address dst, uint wad) public override nonReentrant returns (bool) {\\r\\n require(balanceOf[src] >= wad);\\r\\n\\r\\n if (src != msg.sender && allowance[src][msg.sender] != uint(- 1)) {\\r\\n require(allowance[src][msg.sender] >= wad);\\r\\n allowance[src][msg.sender] -= wad;\\r\\n }\\r\\n\\r\\n // always decrement the src (payer) address\\r\\n balanceOf[src] -= wad;\\r\\n\\r\\n if (noUnwrapTo[dst]) {\\r\\n // we do *not* unwrap\\r\\n balanceOf[dst] += wad;\\r\\n emit Transfer(src, dst, wad);\\r\\n\\r\\n } else {\\r\\n // unwrap and send native gas token\\r\\n totalSupply -= wad;\\r\\n // if its getting unwrapped, decrement the totalSupply\\r\\n (bool success,) = dst.call{value : wad}(\\\"\\\");\\r\\n require(success, \\\"SGETH: failed to transfer\\\");\\r\\n emit TransferNative(src, dst, wad);\\r\\n }\\r\\n\\r\\n return true;\\r\\n }\\r\\n\\r\\n function renounceOwnership() public override onlyOwner {}\\r\\n\\r\\n receive() external payable {\\r\\n deposit();\\r\\n }\\r\\n\\r\\n}\\r\\n\",\"keccak256\":\"0xda0a53107820e554dfc5f8bd804074b88b0a1880307a8f1f5735aed612c3050d\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IMirrorgateEthVault.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\r\\npragma solidity 0.7.6;\\r\\n\\r\\ninterface IMirrorgateEthVault {\\r\\n function deposit() external payable;\\r\\n\\r\\n function transfer(address to, uint value) external returns (bool);\\r\\n\\r\\n function withdraw(uint) external;\\r\\n\\r\\n function approve(address guy, uint wad) external returns (bool);\\r\\n\\r\\n function transferFrom(address src, address dst, uint wad) external returns (bool);\\r\\n}\\r\\n\",\"keccak256\":\"0xdf47cb2c23c753b5dc60855d22247cece601a94318f2cae85f34d239675ce71e\",\"license\":\"BUSL-1.1\"}},\"version\":1}",
- "bytecode": "0x608060405234801561001057600080fd5b50600061001b61006e565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018055610072565b3390565b610ba5806100816000396000f3fe6080604052600436106100f75760003560e01c8063715018a61161008a578063d0e30db011610059578063d0e30db01461039b578063dd5f0f68146103a3578063dd62ed3e146103d6578063f2fde38b1461041157610106565b8063715018a6146103075780638da5cb5b1461031c57806395d89b411461034d578063a9059cbb1461036257610106565b806329c80c2f116100c657806329c80c2f1461024c5780632e1a7d4d1461027f578063313ce567146102a957806370a08231146102d457610106565b806306fdde031461010b578063095ea7b31461019557806318160ddd146101e257806323b872dd1461020957610106565b3661010657610104610444565b005b600080fd5b34801561011757600080fd5b5061012061049b565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015a578181015183820152602001610142565b50505050905090810190601f1680156101875780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101a157600080fd5b506101ce600480360360408110156101b857600080fd5b506001600160a01b0381351690602001356104cd565b604080519115158252519081900360200190f35b3480156101ee57600080fd5b506101f7610533565b60408051918252519081900360200190f35b34801561021557600080fd5b506101ce6004803603606081101561022c57600080fd5b506001600160a01b03813581169160208101359091169060400135610539565b34801561025857600080fd5b506101ce6004803603602081101561026f57600080fd5b50356001600160a01b03166107f8565b34801561028b57600080fd5b50610104600480360360208110156102a257600080fd5b503561080d565b3480156102b557600080fd5b506102be6108ab565b6040805160ff9092168252519081900360200190f35b3480156102e057600080fd5b506101f7600480360360208110156102f757600080fd5b50356001600160a01b03166108b0565b34801561031357600080fd5b506101046108c2565b34801561032857600080fd5b50610331610938565b604080516001600160a01b039092168252519081900360200190f35b34801561035957600080fd5b50610120610947565b34801561036e57600080fd5b506101ce6004803603604081101561038557600080fd5b506001600160a01b038135169060200135610968565b610104610444565b3480156103af57600080fd5b50610104600480360360208110156103c657600080fd5b50356001600160a01b031661097c565b3480156103e257600080fd5b506101f7600480360360408110156103f957600080fd5b506001600160a01b0381358116916020013516610a14565b34801561041d57600080fd5b506101046004803603602081101561043457600080fd5b50356001600160a01b0316610a31565b336000818152600360209081526040918290208054349081019091556002805482019055825190815291517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9281900390910190a2565b60405180604001604052806016815260200175135a5c9c9bdc99d85d1948115d1a195c8815985d5b1d60521b81525081565b3360008181526004602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60025481565b600060026001541415610593576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001556001600160a01b0384166000908152600360205260409020548211156105bd57600080fd5b6001600160a01b03841633148015906105fb57506001600160a01b038416600090815260046020908152604080832033845290915290205460001914155b1561065b576001600160a01b038416600090815260046020908152604080832033845290915290205482111561063057600080fd5b6001600160a01b03841660009081526004602090815260408083203384529091529020805483900390555b6001600160a01b03808516600090815260036020908152604080832080548790039055928616825260059052205460ff16156106ef576001600160a01b038084166000818152600360209081526040918290208054870190558151868152915192938816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a36107eb565b6002805483900390556040516000906001600160a01b0385169084908381818185875af1925050503d8060008114610743576040519150601f19603f3d011682016040523d82523d6000602084013e610748565b606091505b505090508061079e576040805162461bcd60e51b815260206004820152601960248201527f53474554483a206661696c656420746f207472616e7366657200000000000000604482015290519081900360640190fd5b836001600160a01b0316856001600160a01b03167fb4a87134099d10c48345145381989042ab07dc53e6e62a6511fca55438562e26856040518082815260200191505060405180910390a3505b5060018080559392505050565b60056020526000908152604090205460ff1681565b3360009081526003602052604090205481111561082957600080fd5b33600081815260036020526040808220805485900390555183156108fc0291849190818181858888f19350505050158015610868573d6000803e3d6000fd5b5060028054829003905560408051828152905133917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65919081900360200190a250565b601281565b60036020526000908152604090205481565b6108ca610b45565b6001600160a01b03166108db610938565b6001600160a01b031614610936576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b565b6000546001600160a01b031690565b6040518060400160405280600581526020016409a8e8aa8960db1b81525081565b6000610975338484610539565b9392505050565b610984610b45565b6001600160a01b0316610995610938565b6001600160a01b0316146109f0576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03166000908152600560205260409020805460ff19166001179055565b600460209081526000928352604080842090915290825290205481565b610a39610b45565b6001600160a01b0316610a4a610938565b6001600160a01b031614610aa5576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610aea5760405162461bcd60e51b8152600401808060200182810382526026815260200180610b4a6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220219f7a14eb78e615a4be2c379c993b8b0b85bfd20afb997770e1f5611c34763464736f6c63430007060033",
- "deployedBytecode": "0x6080604052600436106100f75760003560e01c8063715018a61161008a578063d0e30db011610059578063d0e30db01461039b578063dd5f0f68146103a3578063dd62ed3e146103d6578063f2fde38b1461041157610106565b8063715018a6146103075780638da5cb5b1461031c57806395d89b411461034d578063a9059cbb1461036257610106565b806329c80c2f116100c657806329c80c2f1461024c5780632e1a7d4d1461027f578063313ce567146102a957806370a08231146102d457610106565b806306fdde031461010b578063095ea7b31461019557806318160ddd146101e257806323b872dd1461020957610106565b3661010657610104610444565b005b600080fd5b34801561011757600080fd5b5061012061049b565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015a578181015183820152602001610142565b50505050905090810190601f1680156101875780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101a157600080fd5b506101ce600480360360408110156101b857600080fd5b506001600160a01b0381351690602001356104cd565b604080519115158252519081900360200190f35b3480156101ee57600080fd5b506101f7610533565b60408051918252519081900360200190f35b34801561021557600080fd5b506101ce6004803603606081101561022c57600080fd5b506001600160a01b03813581169160208101359091169060400135610539565b34801561025857600080fd5b506101ce6004803603602081101561026f57600080fd5b50356001600160a01b03166107f8565b34801561028b57600080fd5b50610104600480360360208110156102a257600080fd5b503561080d565b3480156102b557600080fd5b506102be6108ab565b6040805160ff9092168252519081900360200190f35b3480156102e057600080fd5b506101f7600480360360208110156102f757600080fd5b50356001600160a01b03166108b0565b34801561031357600080fd5b506101046108c2565b34801561032857600080fd5b50610331610938565b604080516001600160a01b039092168252519081900360200190f35b34801561035957600080fd5b50610120610947565b34801561036e57600080fd5b506101ce6004803603604081101561038557600080fd5b506001600160a01b038135169060200135610968565b610104610444565b3480156103af57600080fd5b50610104600480360360208110156103c657600080fd5b50356001600160a01b031661097c565b3480156103e257600080fd5b506101f7600480360360408110156103f957600080fd5b506001600160a01b0381358116916020013516610a14565b34801561041d57600080fd5b506101046004803603602081101561043457600080fd5b50356001600160a01b0316610a31565b336000818152600360209081526040918290208054349081019091556002805482019055825190815291517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9281900390910190a2565b60405180604001604052806016815260200175135a5c9c9bdc99d85d1948115d1a195c8815985d5b1d60521b81525081565b3360008181526004602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60025481565b600060026001541415610593576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001556001600160a01b0384166000908152600360205260409020548211156105bd57600080fd5b6001600160a01b03841633148015906105fb57506001600160a01b038416600090815260046020908152604080832033845290915290205460001914155b1561065b576001600160a01b038416600090815260046020908152604080832033845290915290205482111561063057600080fd5b6001600160a01b03841660009081526004602090815260408083203384529091529020805483900390555b6001600160a01b03808516600090815260036020908152604080832080548790039055928616825260059052205460ff16156106ef576001600160a01b038084166000818152600360209081526040918290208054870190558151868152915192938816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a36107eb565b6002805483900390556040516000906001600160a01b0385169084908381818185875af1925050503d8060008114610743576040519150601f19603f3d011682016040523d82523d6000602084013e610748565b606091505b505090508061079e576040805162461bcd60e51b815260206004820152601960248201527f53474554483a206661696c656420746f207472616e7366657200000000000000604482015290519081900360640190fd5b836001600160a01b0316856001600160a01b03167fb4a87134099d10c48345145381989042ab07dc53e6e62a6511fca55438562e26856040518082815260200191505060405180910390a3505b5060018080559392505050565b60056020526000908152604090205460ff1681565b3360009081526003602052604090205481111561082957600080fd5b33600081815260036020526040808220805485900390555183156108fc0291849190818181858888f19350505050158015610868573d6000803e3d6000fd5b5060028054829003905560408051828152905133917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65919081900360200190a250565b601281565b60036020526000908152604090205481565b6108ca610b45565b6001600160a01b03166108db610938565b6001600160a01b031614610936576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b565b6000546001600160a01b031690565b6040518060400160405280600581526020016409a8e8aa8960db1b81525081565b6000610975338484610539565b9392505050565b610984610b45565b6001600160a01b0316610995610938565b6001600160a01b0316146109f0576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03166000908152600560205260409020805460ff19166001179055565b600460209081526000928352604080842090915290825290205481565b610a39610b45565b6001600160a01b0316610a4a610938565b6001600160a01b031614610aa5576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610aea5760405162461bcd60e51b8152600401808060200182810382526026815260200180610b4a6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220219f7a14eb78e615a4be2c379c993b8b0b85bfd20afb997770e1f5611c34763464736f6c63430007060033",
- "devdoc": {
- "kind": "dev",
- "methods": {
- "owner()": {
- "details": "Returns the address of the current owner."
- },
- "renounceOwnership()": {
- "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
- },
- "transferOwnership(address)": {
- "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
- }
- },
- "version": 1
- },
- "userdoc": {
- "kind": "user",
- "methods": {},
- "version": 1
- },
- "storageLayout": {
- "storage": [
- {
- "astId": 7,
- "contract": "contracts/MirrorgateEthVault.sol:MirrorgateEthVault",
- "label": "_owner",
- "offset": 0,
- "slot": "0",
- "type": "t_address"
- },
- {
- "astId": 2080,
- "contract": "contracts/MirrorgateEthVault.sol:MirrorgateEthVault",
- "label": "_status",
- "offset": 0,
- "slot": "1",
- "type": "t_uint256"
- },
- {
- "astId": 4686,
- "contract": "contracts/MirrorgateEthVault.sol:MirrorgateEthVault",
- "label": "totalSupply",
- "offset": 0,
- "slot": "2",
- "type": "t_uint256"
- },
- {
- "astId": 4726,
- "contract": "contracts/MirrorgateEthVault.sol:MirrorgateEthVault",
- "label": "balanceOf",
- "offset": 0,
- "slot": "3",
- "type": "t_mapping(t_address,t_uint256)"
- },
- {
- "astId": 4732,
- "contract": "contracts/MirrorgateEthVault.sol:MirrorgateEthVault",
- "label": "allowance",
- "offset": 0,
- "slot": "4",
- "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))"
- },
- {
- "astId": 4736,
- "contract": "contracts/MirrorgateEthVault.sol:MirrorgateEthVault",
- "label": "noUnwrapTo",
- "offset": 0,
- "slot": "5",
- "type": "t_mapping(t_address,t_bool)"
- }
- ],
- "types": {
- "t_address": {
- "encoding": "inplace",
- "label": "address",
- "numberOfBytes": "20"
- },
- "t_bool": {
- "encoding": "inplace",
- "label": "bool",
- "numberOfBytes": "1"
- },
- "t_mapping(t_address,t_bool)": {
- "encoding": "mapping",
- "key": "t_address",
- "label": "mapping(address => bool)",
- "numberOfBytes": "32",
- "value": "t_bool"
- },
- "t_mapping(t_address,t_mapping(t_address,t_uint256))": {
- "encoding": "mapping",
- "key": "t_address",
- "label": "mapping(address => mapping(address => uint256))",
- "numberOfBytes": "32",
- "value": "t_mapping(t_address,t_uint256)"
- },
- "t_mapping(t_address,t_uint256)": {
- "encoding": "mapping",
- "key": "t_address",
- "label": "mapping(address => uint256)",
- "numberOfBytes": "32",
- "value": "t_uint256"
- },
- "t_uint256": {
- "encoding": "inplace",
- "label": "uint256",
- "numberOfBytes": "32"
- }
- }
- }
- }
|