Contract
0x98b2920d53612483f91f12ed7754e51b4a77919e
17
Contract Overview
Balance:
0 FTM
My Name Tag:
Not Available
[ Download CSV Export ]
Latest 25 internal transaction
[ Download CSV Export ]
Contract Name:
ConstAddressDeployer
Compiler Version
v0.8.9+commit.e5eed63a
Contract Source Code (Solidity)
/** *Submitted for verification at FtmScan.com on 2022-09-02 */ /** *Submitted for verification at Etherscan.io on 2022-08-31 */ // Sources flattened with hardhat v2.10.1 https://hardhat.org // File contracts/ConstAddressDeployer.sol // SPDX-License-Identifier: MIT pragma solidity 0.8.9; contract ConstAddressDeployer { error EmptyBytecode(); error FailedDeploy(); error FailedInit(); event Deployed(bytes32 indexed bytecodeHash, bytes32 indexed salt, address indexed deployedAddress); /** * @dev Deploys a contract using `CREATE2`. The address where the contract * will be deployed can be known in advance via {deployedAddress}. * * The bytecode for a contract can be obtained from Solidity with * `type(contractName).creationCode`. * * Requirements: * * - `bytecode` must not be empty. * - `salt` must have not been used for `bytecode` already by the same `msg.sender`. */ function deploy(bytes memory bytecode, bytes32 salt) external returns (address deployedAddress_) { deployedAddress_ = _deploy(bytecode, keccak256(abi.encode(msg.sender, salt))); } /** * @dev Deploys a contract using `CREATE2` and initialize it. The address where the contract * will be deployed can be known in advance via {deployedAddress}. * * The bytecode for a contract can be obtained from Solidity with * `type(contractName).creationCode`. * * Requirements: * * - `bytecode` must not be empty. * - `salt` must have not been used for `bytecode` already by the same `msg.sender`. * - `init` is used to initialize the deployed contract * as an option to not have the constructor args affect the address derived by `CREATE2`. */ function deployAndInit( bytes memory bytecode, bytes32 salt, bytes calldata init ) external returns (address deployedAddress_) { deployedAddress_ = _deploy(bytecode, keccak256(abi.encode(msg.sender, salt))); // solhint-disable-next-line avoid-low-level-calls (bool success, ) = deployedAddress_.call(init); if (!success) revert FailedInit(); } /** * @dev Returns the address where a contract will be stored if deployed via {deploy} or {deployAndInit} by `sender`. * Any change in the `bytecode`, `sender`, or `salt` will result in a new destination address. */ function deployedAddress( bytes calldata bytecode, address sender, bytes32 salt ) external view returns (address deployedAddress_) { bytes32 newSalt = keccak256(abi.encode(sender, salt)); deployedAddress_ = address( uint160( uint256( keccak256( abi.encodePacked( hex'ff', address(this), newSalt, keccak256(bytecode) // init code hash ) ) ) ) ); } function _deploy(bytes memory bytecode, bytes32 salt) internal returns (address deployedAddress_) { if (bytecode.length == 0) revert EmptyBytecode(); // solhint-disable-next-line no-inline-assembly assembly { deployedAddress_ := create2(0, add(bytecode, 32), mload(bytecode), salt) } if (deployedAddress_ == address(0)) revert FailedDeploy(); emit Deployed(keccak256(bytecode), salt, deployedAddress_); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"EmptyBytecode","type":"error"},{"inputs":[],"name":"FailedDeploy","type":"error"},{"inputs":[],"name":"FailedInit","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"bytecodeHash","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"salt","type":"bytes32"},{"indexed":true,"internalType":"address","name":"deployedAddress","type":"address"}],"name":"Deployed","type":"event"},{"inputs":[{"internalType":"bytes","name":"bytecode","type":"bytes"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"deploy","outputs":[{"internalType":"address","name":"deployedAddress_","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"bytecode","type":"bytes"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"init","type":"bytes"}],"name":"deployAndInit","outputs":[{"internalType":"address","name":"deployedAddress_","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"bytecode","type":"bytes"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"deployedAddress","outputs":[{"internalType":"address","name":"deployedAddress_","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506105a4806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80634af63f0214610046578063c2b1041c14610075578063cf4d643214610088575b600080fd5b6100596100543660046103f7565b61009b565b6040516001600160a01b03909116815260200160405180910390f35b610059610083366004610485565b6100da565b6100596100963660046104ee565b6101a9565b604080513360208201529081018290526000906100d39084906060015b6040516020818303038152906040528051906020012061026e565b9392505050565b604080516001600160a01b038416602082015290810182905260009081906060016040516020818303038152906040528051906020012090503081878760405161012592919061055e565b6040519081900381206101879392916020017fff00000000000000000000000000000000000000000000000000000000000000815260609390931b6bffffffffffffffffffffffff191660018401526015830191909152603582015260550190565b60408051601f1981840301815291905280516020909101209695505050505050565b604080513360208201529081018490526000906101ca9086906060016100b8565b90506000816001600160a01b031684846040516101e892919061055e565b6000604051808303816000865af19150503d8060008114610225576040519150601f19603f3d011682016040523d82523d6000602084013e61022a565b606091505b5050905080610265576040517f4f77232300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50949350505050565b60008251600014156102ac576040517f21744a5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818351602085016000f590506001600160a01b0381166102f8576040517f4102e83a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b825160208401206040516001600160a01b0383169184917f27b8e3132afa95254770e1c1d214eafde52bc47d1b6e1f5dfcbb380c3ca3f53290600090a492915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261037b57600080fd5b813567ffffffffffffffff808211156103965761039661033b565b604051601f8301601f19908116603f011681019082821181831017156103be576103be61033b565b816040528381528660208588010111156103d757600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561040a57600080fd5b823567ffffffffffffffff81111561042157600080fd5b61042d8582860161036a565b95602094909401359450505050565b60008083601f84011261044e57600080fd5b50813567ffffffffffffffff81111561046657600080fd5b60208301915083602082850101111561047e57600080fd5b9250929050565b6000806000806060858703121561049b57600080fd5b843567ffffffffffffffff8111156104b257600080fd5b6104be8782880161043c565b90955093505060208501356001600160a01b03811681146104de57600080fd5b9396929550929360400135925050565b6000806000806060858703121561050457600080fd5b843567ffffffffffffffff8082111561051c57600080fd5b6105288883890161036a565b955060208701359450604087013591508082111561054557600080fd5b506105528782880161043c565b95989497509550505050565b818382376000910190815291905056fea26469706673582212206a8d0537e27fe239a39d5ad8e5334db0447d0a1d7d49a7e82479baaa1319b39664736f6c63430008090033
Deployed ByteCode Sourcemap
243:3362:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;930:193;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;1483:55:1;;;1465:74;;1453:2;1438:18;930:193:0;;;;;;;2434:678;;;;;;:::i;:::-;;:::i;1768:418::-;;;;;;:::i;:::-;;:::i;930:193::-;1085:28;;;1096:10;1085:28;;;3456:74:1;3546:18;;;3539:34;;;1001:24:0;;1057:58;;1065:8;;3429:18:1;;1085:28:0;;;;;;;;;;;;;1075:39;;;;;;1057:7;:58::i;:::-;1038:77;930:193;-1:-1:-1;;;930:193:0:o;2434:678::-;2636:24;;;-1:-1:-1;;;;;3474:55:1;;2636:24:0;;;3456:74:1;3546:18;;;3539:34;;;2571:24:0;;;;3429:18:1;;2636:24:0;;;;;;;;;;;;2626:35;;;;;;2608:53;;2898:4;2934:7;2982:8;;2972:19;;;;;;;:::i;:::-;;;;;;;;;2805:231;;;;;;4158:66:1;4146:79;;4262:2;4258:15;;;;-1:-1:-1;;4254:53:1;4250:1;4241:11;;4234:74;4333:2;4324:12;;4317:28;;;;4370:2;4361:12;;4354:28;4407:2;4398:12;;3860:556;2805:231:0;;;;-1:-1:-1;;2805:231:0;;;;;;;;;2769:290;;2805:231;2769:290;;;;;2434:678;-1:-1:-1;;;;;;2434:678:0:o;1768:418::-;1985:28;;;1996:10;1985:28;;;3456:74:1;3546:18;;;3539:34;;;1901:24:0;;1957:58;;1965:8;;3429:18:1;;1985:28:0;3282:297:1;1957:58:0;1938:77;;2089:12;2107:16;-1:-1:-1;;;;;2107:21:0;2129:4;;2107:27;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2088:46;;;2150:7;2145:33;;2166:12;;;;;;;;;;;;;;2145:33;1927:259;1768:418;;;;;;:::o;3120:482::-;3192:24;3233:8;:15;3252:1;3233:20;3229:48;;;3262:15;;;;;;;;;;;;;;3229:48;3438:4;3427:8;3421:15;3416:2;3406:8;3402:17;3399:1;3391:52;3371:72;-1:-1:-1;;;;;;3470:30:0;;3466:57;;3509:14;;;;;;;;;;;;;;3466:57;3550:19;;;;;;3541:53;;-1:-1:-1;;;;;3541:53:0;;;3571:4;;3541:53;;;;;3120:482;;;;:::o;14:184:1:-;66:77;63:1;56:88;163:4;160:1;153:15;187:4;184:1;177:15;203:718;245:5;298:3;291:4;283:6;279:17;275:27;265:55;;316:1;313;306:12;265:55;352:6;339:20;378:18;415:2;411;408:10;405:36;;;421:18;;:::i;:::-;496:2;490:9;464:2;550:13;;-1:-1:-1;;546:22:1;;;570:2;542:31;538:40;526:53;;;594:18;;;614:22;;;591:46;588:72;;;640:18;;:::i;:::-;680:10;676:2;669:22;715:2;707:6;700:18;761:3;754:4;749:2;741:6;737:15;733:26;730:35;727:55;;;778:1;775;768:12;727:55;842:2;835:4;827:6;823:17;816:4;808:6;804:17;791:54;889:1;882:4;877:2;869:6;865:15;861:26;854:37;909:6;900:15;;;;;;203:718;;;;:::o;926:388::-;1003:6;1011;1064:2;1052:9;1043:7;1039:23;1035:32;1032:52;;;1080:1;1077;1070:12;1032:52;1120:9;1107:23;1153:18;1145:6;1142:30;1139:50;;;1185:1;1182;1175:12;1139:50;1208:49;1249:7;1240:6;1229:9;1225:22;1208:49;:::i;:::-;1198:59;1304:2;1289:18;;;;1276:32;;-1:-1:-1;;;;926:388:1:o;1550:347::-;1601:8;1611:6;1665:3;1658:4;1650:6;1646:17;1642:27;1632:55;;1683:1;1680;1673:12;1632:55;-1:-1:-1;1706:20:1;;1749:18;1738:30;;1735:50;;;1781:1;1778;1771:12;1735:50;1818:4;1810:6;1806:17;1794:29;;1870:3;1863:4;1854:6;1846;1842:19;1838:30;1835:39;1832:59;;;1887:1;1884;1877:12;1832:59;1550:347;;;;;:::o;1902:674::-;1990:6;1998;2006;2014;2067:2;2055:9;2046:7;2042:23;2038:32;2035:52;;;2083:1;2080;2073:12;2035:52;2123:9;2110:23;2156:18;2148:6;2145:30;2142:50;;;2188:1;2185;2178:12;2142:50;2227:58;2277:7;2268:6;2257:9;2253:22;2227:58;:::i;:::-;2304:8;;-1:-1:-1;2201:84:1;-1:-1:-1;;2389:2:1;2374:18;;2361:32;-1:-1:-1;;;;;2422:54:1;;2412:65;;2402:93;;2491:1;2488;2481:12;2402:93;1902:674;;;;-1:-1:-1;2514:5:1;;2566:2;2551:18;2538:32;;-1:-1:-1;;1902:674:1:o;2581:696::-;2678:6;2686;2694;2702;2755:2;2743:9;2734:7;2730:23;2726:32;2723:52;;;2771:1;2768;2761:12;2723:52;2811:9;2798:23;2840:18;2881:2;2873:6;2870:14;2867:34;;;2897:1;2894;2887:12;2867:34;2920:49;2961:7;2952:6;2941:9;2937:22;2920:49;:::i;:::-;2910:59;;3016:2;3005:9;3001:18;2988:32;2978:42;;3073:2;3062:9;3058:18;3045:32;3029:48;;3102:2;3092:8;3089:16;3086:36;;;3118:1;3115;3108:12;3086:36;;3157:60;3209:7;3198:8;3187:9;3183:24;3157:60;:::i;:::-;2581:696;;;;-1:-1:-1;3236:8:1;-1:-1:-1;;;;2581:696:1:o;3584:271::-;3767:6;3759;3754:3;3741:33;3723:3;3793:16;;3818:13;;;3793:16;3584:271;-1:-1:-1;3584:271:1:o
Swarm Source
ipfs://6a8d0537e27fe239a39d5ad8e5334db0447d0a1d7d49a7e82479baaa1319b396
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Validator ID :
0 FTM
Amount Staked
0
Amount Delegated
0
Staking Total
0
Staking Start Epoch
0
Staking Start Time
0
Proof of Importance
0
Origination Score
0
Validation Score
0
Active
0
Online
0
Downtime
0 s
Address | Amount | claimed Rewards | Created On Epoch | Created On |
---|