Verified contractPartialUNLICENSED
CustomizedProxyChild
Address0x3751fa99dbe876aeb2f0f59c0d2ec9d17589d20c
- Balance
0 ETH
- Transactions
0
- Compiler
solc 0.8.26
- Same code
31 more contracts
Details
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Language
- solidity
- Optimization
- Yes, 25,666 runs
- EVM version
- cancun
- Via IR
- yes
- License
- UNLICENSED
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,348,534
- Creation transaction
- 0xe15913cd77…851e6a3c6e
lib/pancake-create3-factory/src/CustomizedProxyChild.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
contract CustomizedProxyChild {
error NotFromParent();
error BackrunExecutionFailed();
address public immutable parent;
constructor() {
parent = msg.sender;
}
function deploy(bytes memory creationCode, uint256 creationFund, bytes calldata backRunPayload, uint256 backRunFund)
external
payable
returns (address addr)
{
// make sure only Create3Factory can deploy contract in case of unauthorized deployment
if (msg.sender != parent) {
revert NotFromParent();
}
assembly {
/// @dev create with creation code, deterministic addr since create(thisAddr=fixed, nonce=0)
addr := create(creationFund, add(creationCode, 32), mload(creationCode))
}
if (backRunPayload.length != 0) {
/// @dev This could be helpful when newly deployed contract
/// needs to run some initialization logic for example owner update
(bool success, bytes memory reason) = addr.call{value: backRunFund}(backRunPayload);
if (!success) {
// bubble up the revert reason from backrun if any
if (reason.length > 0) {
assembly {
revert(add(reason, 32), mload(reason))
}
}
revert BackrunExecutionFailed();
}
}
}
}
Compiler settingsShow
{
"viaIR": true,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"optimizer": {
"runs": 25666,
"enabled": true
},
"evmVersion": "cancun",
"remappings": [
"ds-test/=lib/forge-std/lib/ds-test/src/",
"forge-gas-snapshot/=lib/forge-gas-snapshot/src/",
"forge-std/=lib/forge-std/src/",
"@openzeppelin/=lib/openzeppelin-contracts/",
"solmate/=lib/solmate/",
"squadswap-create3-factory/=lib/pancake-create3-factory/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"pancake-create3-factory/=lib/pancake-create3-factory/src/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.