Contract Overview
Balance:
0 Ether
EtherValue:
$0.00
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Latest 1 internal transaction
Parent Txn Hash | Block | From | To | Value | |||
---|---|---|---|---|---|---|---|
0xd53b7dcf52e140c2d41aebef1da586909723c7c8daafa3feb85fcd84b079bb6a | 916709 | 95 days 5 hrs ago | 0x3849ff242ff385f5124e6420be681963d3977685 | 0xa8303990d90919da61cbacaccabb0d1b2efe75a1 | 0 Ether |
[ Download CSV Export ]
Contract Name:
CrossChainOracle
Compiler Version
v0.8.6+commit.11564f7e
Contract Source Code (Solidity)
/** *Submitted for verification at bobascan.com on 2022-12-19 */ /** *Submitted for verification at snowtrace.io on 2021-11-09 */ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.8.0; // Sources flattened with hardhat v2.6.2 https://hardhat.org // File contracts/Staking/Owned.sol // https://docs.synthetix.io/contracts/Owned contract Owned { address public owner; address public nominatedOwner; constructor (address _owner) public { require(_owner != address(0), "Owner address cannot be 0"); owner = _owner; emit OwnerChanged(address(0), _owner); } function nominateNewOwner(address _owner) external onlyOwner { nominatedOwner = _owner; emit OwnerNominated(_owner); } function acceptOwnership() external { require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership"); emit OwnerChanged(owner, nominatedOwner); owner = nominatedOwner; nominatedOwner = address(0); } modifier onlyOwner { require(msg.sender == owner, "Only the contract owner may perform this action"); _; } event OwnerNominated(address newOwner); event OwnerChanged(address oldOwner, address newOwner); } // File contracts/Oracle/CrossChainOracle.sol // ==================================================================== // | ______ _______ | // | / _____________ __ __ / ____(_____ ____ _____ ________ | // | / /_ / ___/ __ `| |/_/ / /_ / / __ \/ __ `/ __ \/ ___/ _ \ | // | / __/ / / / /_/ _> < / __/ / / / / / /_/ / / / / /__/ __/ | // | /_/ /_/ \__,_/_/|_| /_/ /_/_/ /_/\__,_/_/ /_/\___/\___/ | // | | // ==================================================================== // ========================= CrossChainOracle ========================= // ==================================================================== // Prices manually set by a bot // Frax Finance: https://github.com/FraxFinance // Primary Author(s) // Travis Moore: https://github.com/FortisFortuna // Reviewer(s) / Contributor(s) // Jason Huan: https://github.com/jasonhuan // Sam Kazemian: https://github.com/samkazemian contract CrossChainOracle is Owned { // Core address public timelock_address; address public bot_address; // Prices mapping(address => uint256) public prices; /* ========== MODIFIERS ========== */ modifier onlyByOwnGov() { require(msg.sender == owner || msg.sender == timelock_address, "Not owner or timelock"); _; } modifier onlyByOwnGovBot() { require(msg.sender == owner || msg.sender == timelock_address || msg.sender == bot_address, "Not owner, tlck, or bot"); _; } /* ========== CONSTRUCTOR ========== */ constructor ( address _creator_address, address _timelock_address, address _bot_address ) Owned(_creator_address) { timelock_address = _timelock_address; bot_address = _bot_address; } /* ========== VIEWS ========== */ function getPrice(address token_address) public view returns (uint256) { return prices[token_address]; } /* ========== RESTRICTED FUNCTIONS, BUT BOT CAN SET ========== */ // Set the price for a token function setPrice(address token_address, uint256 price_e6) public onlyByOwnGovBot { prices[token_address] = price_e6; } // Batch set prices for multiple tokens function setMultiplePrices(address[] memory token_addresses, uint256[] memory prices_e6) public onlyByOwnGovBot { for (uint i = 0; i < token_addresses.length; i++){ prices[token_addresses[i]] = prices_e6[i]; } } /* ========== RESTRICTED FUNCTIONS ========== */ function setTimelock(address _new_timelock_address) external onlyByOwnGov { timelock_address = _new_timelock_address; } function setBot(address _new_bot_address) external onlyByOwnGov { bot_address = _new_bot_address; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_creator_address","type":"address"},{"internalType":"address","name":"_timelock_address","type":"address"},{"internalType":"address","name":"_bot_address","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bot_address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token_address","type":"address"}],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"prices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_new_bot_address","type":"address"}],"name":"setBot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"token_addresses","type":"address[]"},{"internalType":"uint256[]","name":"prices_e6","type":"uint256[]"}],"name":"setMultiplePrices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token_address","type":"address"},{"internalType":"uint256","name":"price_e6","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_new_timelock_address","type":"address"}],"name":"setTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timelock_address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50604051610d77380380610d7783398101604081905261002f91610130565b826001600160a01b03811661008a5760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015260640160405180910390fd5b600080546001600160a01b0319166001600160a01b03831690811782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a150600280546001600160a01b039384166001600160a01b0319918216179091556003805492909316911617905550610173565b80516001600160a01b038116811461012b57600080fd5b919050565b60008060006060848603121561014557600080fd5b61014e84610114565b925061015c60208501610114565b915061016a60408501610114565b90509250925092565b610bf5806101826000396000f3fe608060405234801561001057600080fd5b50600436106100d35760003560e01c806379ba509711610081578063cfed246b1161005b578063cfed246b146101ef578063dbea953d1461020f578063dc6663c71461022f57600080fd5b806379ba5097146101b45780638da5cb5b146101bc578063bdacb303146101dc57600080fd5b806341976e09116100b257806341976e091461011357806353a47bb71461015c5780636b5caec4146101a157600080fd5b8062e4768b146100d857806304f4a374146100ed5780631627540c14610100575b600080fd5b6100eb6100e636600461099d565b61024f565b005b6100eb6100fb3660046109c7565b610342565b6100eb61010e36600461097b565b6104a1565b61014961012136600461097b565b73ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090205490565b6040519081526020015b60405180910390f35b60015461017c9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610153565b6100eb6101af36600461097b565b6105c1565b6100eb6106ab565b60005461017c9073ffffffffffffffffffffffffffffffffffffffff1681565b6100eb6101ea36600461097b565b6107f6565b6101496101fd36600461097b565b60046020526000908152604090205481565b60035461017c9073ffffffffffffffffffffffffffffffffffffffff1681565b60025461017c9073ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633148061028c575060025473ffffffffffffffffffffffffffffffffffffffff1633145b806102ae575060035473ffffffffffffffffffffffffffffffffffffffff1633145b610319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e6f74206f776e65722c20746c636b2c206f7220626f7400000000000000000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff909116600090815260046020526040902055565b60005473ffffffffffffffffffffffffffffffffffffffff1633148061037f575060025473ffffffffffffffffffffffffffffffffffffffff1633145b806103a1575060035473ffffffffffffffffffffffffffffffffffffffff1633145b610407576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4e6f74206f776e65722c20746c636b2c206f7220626f740000000000000000006044820152606401610310565b60005b825181101561049c5781818151811061042557610425610b61565b60200260200101516004600085848151811061044357610443610b61565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550808061049490610b01565b91505061040a565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e00000000000000000000000000000000006064820152608401610310565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229060200160405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff163314806105fe575060025473ffffffffffffffffffffffffffffffffffffffff1633145b610664576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610310565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60015473ffffffffffffffffffffffffffffffffffffffff163314610752576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527f2063616e20616363657074206f776e65727368697000000000000000000000006064820152608401610310565b6000546001546040805173ffffffffffffffffffffffffffffffffffffffff93841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff841617909155169055565b60005473ffffffffffffffffffffffffffffffffffffffff16331480610833575060025473ffffffffffffffffffffffffffffffffffffffff1633145b610899576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f74206f776e6572206f722074696d656c6f636b00000000000000000000006044820152606401610310565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461090457600080fd5b919050565b600082601f83011261091a57600080fd5b8135602061092f61092a83610add565b610a8e565b80838252828201915082860187848660051b890101111561094f57600080fd5b60005b8581101561096e57813584529284019290840190600101610952565b5090979650505050505050565b60006020828403121561098d57600080fd5b610996826108e0565b9392505050565b600080604083850312156109b057600080fd5b6109b9836108e0565b946020939093013593505050565b600080604083850312156109da57600080fd5b823567ffffffffffffffff808211156109f257600080fd5b818501915085601f830112610a0657600080fd5b81356020610a1661092a83610add565b8083825282820191508286018a848660051b8901011115610a3657600080fd5b600096505b84871015610a6057610a4c816108e0565b835260019690960195918301918301610a3b565b5096505086013592505080821115610a7757600080fd5b50610a8485828601610909565b9150509250929050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610ad557610ad5610b90565b604052919050565b600067ffffffffffffffff821115610af757610af7610b90565b5060051b60200190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610b5a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220d941baf38146f0b21d35ad99ce455401beef3da5997bcf08afbd44ccfb022f0d64736f6c63430008060033000000000000000000000000eef54910b5200f94e91e4a9a891ca95797b6fbf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bb437059584e30598b3af0154472e47e6e2a45b9
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000eef54910b5200f94e91e4a9a891ca95797b6fbf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bb437059584e30598b3af0154472e47e6e2a45b9
-----Decoded View---------------
Arg [0] : _creator_address (address): 0xeef54910b5200f94e91e4a9a891ca95797b6fbf8
Arg [1] : _timelock_address (address): 0x0000000000000000000000000000000000000000
Arg [2] : _bot_address (address): 0xbb437059584e30598b3af0154472e47e6e2a45b9
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000eef54910b5200f94e91e4a9a891ca95797b6fbf8
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 000000000000000000000000bb437059584e30598b3af0154472e47e6e2a45b9
Deployed ByteCode Sourcemap
2322:1908:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3463:143;;;;;;:::i;:::-;;:::i;:::-;;3659:248;;;;;;:::i;:::-;;:::i;577:141::-;;;;;;:::i;:::-;;:::i;3230:118::-;;;;;;:::i;:::-;3319:21;;3292:7;3319:21;;;:6;:21;;;;;;;3230:118;;;;4754:25:1;;;4742:2;4727:18;3230:118:0;;;;;;;;345:29;;;;;;;;;;;;2681:42:1;2669:55;;;2651:74;;2639:2;2624:18;345:29:0;2606:125:1;4112:113:0;;;;;;:::i;:::-;;:::i;726:271::-;;;:::i;318:20::-;;;;;;;;;3971:133;;;;;;:::i;:::-;;:::i;2465:41::-;;;;;;:::i;:::-;;;;;;;;;;;;;;2415:26;;;;;;;;;2377:31;;;;;;;;;3463:143;2770:5;;;;2756:10;:19;;:53;;-1:-1:-1;2793:16:0;;;;2779:10;:30;2756:53;:82;;;-1:-1:-1;2827:11:0;;;;2813:10;:25;2756:82;2748:118;;;;;;;3270:2:1;2748:118:0;;;3252:21:1;3309:2;3289:18;;;3282:30;3348:25;3328:18;;;3321:53;3391:18;;2748:118:0;;;;;;;;;3566:21:::1;::::0;;::::1;;::::0;;;:6:::1;:21;::::0;;;;:32;3463:143::o;3659:248::-;2770:5;;;;2756:10;:19;;:53;;-1:-1:-1;2793:16:0;;;;2779:10;:30;2756:53;:82;;;-1:-1:-1;2827:11:0;;;;2813:10;:25;2756:82;2748:118;;;;;;;3270:2:1;2748:118:0;;;3252:21:1;3309:2;3289:18;;;3282:30;3348:25;3328:18;;;3321:53;3391:18;;2748:118:0;3242:173:1;2748:118:0;3787:6:::1;3782:118;3803:15;:22;3799:1;:26;3782:118;;;3876:9;3886:1;3876:12;;;;;;;;:::i;:::-;;;;;;;3847:6;:26;3854:15;3870:1;3854:18;;;;;;;;:::i;:::-;;;;;;;3847:26;;;;;;;;;;;;;;;:41;;;;3827:3;;;;;:::i;:::-;;;;3782:118;;;;3659:248:::0;;:::o;577:141::-;1057:5;;;;1043:10;:19;1035:79;;;;;;;4394:2:1;1035:79:0;;;4376:21:1;4433:2;4413:18;;;4406:30;4472:34;4452:18;;;4445:62;4543:17;4523:18;;;4516:45;4578:19;;1035:79:0;4366:237:1;1035:79:0;649:14:::1;:23:::0;;;::::1;;::::0;::::1;::::0;;::::1;::::0;;;688:22:::1;::::0;2651:74:1;;;688:22:0::1;::::0;2639:2:1;2624:18;688:22:0::1;;;;;;;577:141:::0;:::o;4112:113::-;2617:5;;;;2603:10;:19;;:53;;-1:-1:-1;2640:16:0;;;;2626:10;:30;2603:53;2595:87;;;;;;;4044:2:1;2595:87:0;;;4026:21:1;4083:2;4063:18;;;4056:30;4122:23;4102:18;;;4095:51;4163:18;;2595:87:0;4016:171:1;2595:87:0;4187:11:::1;:30:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;4112:113::o;726:271::-;795:14;;;;781:10;:28;773:94;;;;;;;3622:2:1;773:94:0;;;3604:21:1;3661:2;3641:18;;;3634:30;3700:34;3680:18;;;3673:62;3771:23;3751:18;;;3744:51;3812:19;;773:94:0;3594:243:1;773:94:0;896:5;;;903:14;883:35;;;896:5;;;;2971:34:1;;903:14:0;;;;3036:2:1;3021:18;;3014:43;883:35:0;;2883:18:1;883:35:0;;;;;;;937:14;;;;929:22;;;;;;937:14;;;929:22;;;;962:27;;;726:271::o;3971:133::-;2617:5;;;;2603:10;:19;;:53;;-1:-1:-1;2640:16:0;;;;2626:10;:30;2603:53;2595:87;;;;;;;4044:2:1;2595:87:0;;;4026:21:1;4083:2;4063:18;;;4056:30;4122:23;4102:18;;;4095:51;4163:18;;2595:87:0;4016:171:1;2595:87:0;4056:16:::1;:40:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;3971:133::o;14:196:1:-;82:20;;142:42;131:54;;121:65;;111:2;;200:1;197;190:12;111:2;63:147;;;:::o;215:673::-;269:5;322:3;315:4;307:6;303:17;299:27;289:2;;340:1;337;330:12;289:2;376:6;363:20;402:4;426:60;442:43;482:2;442:43;:::i;:::-;426:60;:::i;:::-;508:3;532:2;527:3;520:15;560:2;555:3;551:12;544:19;;595:2;587:6;583:15;647:3;642:2;636;633:1;629:10;621:6;617:23;613:32;610:41;607:2;;;664:1;661;654:12;607:2;686:1;696:163;710:2;707:1;704:9;696:163;;;767:17;;755:30;;805:12;;;;837;;;;728:1;721:9;696:163;;;-1:-1:-1;877:5:1;;279:609;-1:-1:-1;;;;;;;279:609:1:o;893:186::-;952:6;1005:2;993:9;984:7;980:23;976:32;973:2;;;1021:1;1018;1011:12;973:2;1044:29;1063:9;1044:29;:::i;:::-;1034:39;963:116;-1:-1:-1;;;963:116:1:o;1084:254::-;1152:6;1160;1213:2;1201:9;1192:7;1188:23;1184:32;1181:2;;;1229:1;1226;1219:12;1181:2;1252:29;1271:9;1252:29;:::i;:::-;1242:39;1328:2;1313:18;;;;1300:32;;-1:-1:-1;;;1171:167:1:o;1343:1157::-;1461:6;1469;1522:2;1510:9;1501:7;1497:23;1493:32;1490:2;;;1538:1;1535;1528:12;1490:2;1578:9;1565:23;1607:18;1648:2;1640:6;1637:14;1634:2;;;1664:1;1661;1654:12;1634:2;1702:6;1691:9;1687:22;1677:32;;1747:7;1740:4;1736:2;1732:13;1728:27;1718:2;;1769:1;1766;1759:12;1718:2;1805;1792:16;1827:4;1851:60;1867:43;1907:2;1867:43;:::i;1851:60::-;1933:3;1957:2;1952:3;1945:15;1985:2;1980:3;1976:12;1969:19;;2016:2;2012;2008:11;2064:7;2059:2;2053;2050:1;2046:10;2042:2;2038:19;2034:28;2031:41;2028:2;;;2085:1;2082;2075:12;2028:2;2107:1;2098:10;;2117:169;2131:2;2128:1;2125:9;2117:169;;;2188:23;2207:3;2188:23;:::i;:::-;2176:36;;2149:1;2142:9;;;;;2232:12;;;;2264;;2117:169;;;-1:-1:-1;2305:5:1;-1:-1:-1;;2348:18:1;;2335:32;;-1:-1:-1;;2379:16:1;;;2376:2;;;2408:1;2405;2398:12;2376:2;;2431:63;2486:7;2475:8;2464:9;2460:24;2431:63;:::i;:::-;2421:73;;;1480:1020;;;;;:::o;4790:334::-;4861:2;4855:9;4917:2;4907:13;;4922:66;4903:86;4891:99;;5020:18;5005:34;;5041:22;;;5002:62;4999:2;;;5067:18;;:::i;:::-;5103:2;5096:22;4835:289;;-1:-1:-1;4835:289:1:o;5129:183::-;5189:4;5222:18;5214:6;5211:30;5208:2;;;5244:18;;:::i;:::-;-1:-1:-1;5289:1:1;5285:14;5301:4;5281:25;;5198:114::o;5317:349::-;5356:3;5387:66;5380:5;5377:77;5374:2;;;5487:77;5484:1;5477:88;5588:4;5585:1;5578:15;5616:4;5613:1;5606:15;5374:2;-1:-1:-1;5658:1:1;5647:13;;5364:302::o;5671:184::-;5723:77;5720:1;5713:88;5820:4;5817:1;5810:15;5844:4;5841:1;5834:15;5860:184;5912:77;5909:1;5902:88;6009:4;6006:1;5999:15;6033:4;6030:1;6023:15
Swarm Source
ipfs://d941baf38146f0b21d35ad99ce455401beef3da5997bcf08afbd44ccfb022f0d
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.