This ERC-4337 operator address has been tagged based on 0xKofi compilation.
Overview
POL Balance
0 POL
POL Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
CandideProxyFactory
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.7.0 <0.9.0; import "./CandideWalletProxy.sol"; import "./IProxyCreationCallback.sol"; /// @title Proxy Factory - Allows to create a new proxy contract and execute a message call to the new proxy within one transaction. /// @author Stefan George - <[email protected]> /// @author modified by CandideWallet Team contract CandideProxyFactory { event ProxyCreation(CandideWalletProxy proxy, address singleton); /// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address. function proxyCreationCode() public pure returns (bytes memory) { return type(CandideWalletProxy).creationCode; } /// @dev Allows to create a new proxy contract using CREATE2. Optionally executes an initializer call to a new proxy. /// This method is only meant as an utility to be called from other methods /// @param _singleton Address of singleton contract. Must be deployed at the time of execution. /// @param initializer Payload for a message call to be sent to a new proxy contract. /// @param salt Create2 salt to use for calculating the address of the new proxy contract. function deployProxy(address _singleton, bytes memory initializer, bytes32 salt) internal returns (CandideWalletProxy proxy) { require(isContract(_singleton), "Singleton contract not deployed"); bytes memory deploymentData = abi.encodePacked(type(CandideWalletProxy).creationCode, uint256(uint160(_singleton))); // solhint-disable-next-line no-inline-assembly assembly { proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt) } require(address(proxy) != address(0), "Create2 call failed"); if (initializer.length > 0) { // solhint-disable-next-line no-inline-assembly assembly { if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) { revert(0, 0) } } } } /// @dev Allows to create a new proxy contract and execute a message call to the new proxy within one transaction. /// @param _singleton Address of singleton contract. Must be deployed at the time of execution. /// @param initializer Payload for a message call to be sent to a new proxy contract. /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract. function createProxyWithNonce(address _singleton, bytes memory initializer, uint256 saltNonce) public returns (CandideWalletProxy proxy) { // If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce)); proxy = deployProxy(_singleton, initializer, salt); emit ProxyCreation(proxy, _singleton); } /// @dev Allows to create a new proxy contract that should exist only on 1 network (e.g. specific governance or admin accounts) /// by including the chain id in the create2 salt. Such proxies cannot be created on other networks by replaying the transaction. /// @param _singleton Address of singleton contract. Must be deployed at the time of execution. /// @param initializer Payload for a message call to be sent to a new proxy contract. /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract. function createChainSpecificProxyWithNonce( address _singleton, bytes memory initializer, uint256 saltNonce ) public returns (CandideWalletProxy proxy) { // If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce, getChainId())); proxy = deployProxy(_singleton, initializer, salt); emit ProxyCreation(proxy, _singleton); } /// @dev Allows to create a new proxy contract, execute a message call to the new proxy and call a specified callback within one transaction /// @param _singleton Address of singleton contract. Must be deployed at the time of execution. /// @param initializer Payload for a message call to be sent to a new proxy contract. /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract. /// @param callback Callback that will be invoked after the new proxy contract has been successfully deployed and initialized. function createProxyWithCallback( address _singleton, bytes memory initializer, uint256 saltNonce, IProxyCreationCallback callback ) public returns (CandideWalletProxy proxy) { uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback))); proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback); if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce); } /// @dev Returns true if `account` is a contract. /// @param account The address being queried function isContract(address account) internal view returns (bool) { uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /// @dev Returns the chain id used by this contract. function getChainId() public view returns (uint256) { uint256 id; // solhint-disable-next-line no-inline-assembly assembly { id := chainid() } return id; } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.7.0 <0.9.0; /// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain /// @author Richard Meissner - <[email protected]> interface IProxy { function masterCopy() external view returns (address); } /// @title CandideWalletProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract. /// @author Stefan George - <[email protected]> /// @author Richard Meissner - <[email protected]> /// @author modified by CandideWallet Team contract CandideWalletProxy { // singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated. // To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt` address internal singleton; /// @dev Constructor function sets address of singleton contract. /// @param _singleton Singleton address. constructor(address _singleton) { require(_singleton != address(0), "Invalid singleton address provided"); singleton = _singleton; } /// @dev Fallback function forwards all transactions and returns all received return data. fallback() external payable { // solhint-disable-next-line no-inline-assembly assembly { let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff) // 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) { mstore(0, _singleton) return(0, 0x20) } calldatacopy(0, 0, calldatasize()) let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0) returndatacopy(0, 0, returndatasize()) if eq(success, 0) { revert(0, returndatasize()) } return(0, returndatasize()) } } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity >=0.7.0 <0.9.0; import "./CandideWalletProxy.sol"; interface IProxyCreationCallback { function proxyCreated(CandideWalletProxy proxy, address _singleton, bytes calldata initializer, uint256 saltNonce) external; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract CandideWalletProxy","name":"proxy","type":"address"},{"indexed":false,"internalType":"address","name":"singleton","type":"address"}],"name":"ProxyCreation","type":"event"},{"inputs":[{"internalType":"address","name":"_singleton","type":"address"},{"internalType":"bytes","name":"initializer","type":"bytes"},{"internalType":"uint256","name":"saltNonce","type":"uint256"}],"name":"createChainSpecificProxyWithNonce","outputs":[{"internalType":"contract CandideWalletProxy","name":"proxy","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_singleton","type":"address"},{"internalType":"bytes","name":"initializer","type":"bytes"},{"internalType":"uint256","name":"saltNonce","type":"uint256"},{"internalType":"contract IProxyCreationCallback","name":"callback","type":"address"}],"name":"createProxyWithCallback","outputs":[{"internalType":"contract CandideWalletProxy","name":"proxy","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_singleton","type":"address"},{"internalType":"bytes","name":"initializer","type":"bytes"},{"internalType":"uint256","name":"saltNonce","type":"uint256"}],"name":"createProxyWithNonce","outputs":[{"internalType":"contract CandideWalletProxy","name":"proxy","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxyCreationCode","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506107d0806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80631688f0b91461005c5780633408e4701461008c57806353e5d9351461009a578063d18af54d146100af578063ec9e80bb146100c2575b600080fd5b61006f61006a36600461048d565b6100d5565b6040516001600160a01b0390911681526020015b60405180910390f35b604051468152602001610083565b6100a261016c565b6040516100839190610542565b61006f6100bd36600461055c565b610196565b61006f6100d036600461048d565b61026c565b6000808380519060200120836040516020016100fb929190918252602082015260400190565b60405160208183030381529060405280519060200120905061011e85858361029e565b604080516001600160a01b038084168252881660208201529193507f4f51faf6c4561ff95f067657e43439f0f856d97c04d9ec9070a6199ad418e235910160405180910390a1509392505050565b60606040518060200161017e906103c5565b601f1982820381018352601f90910116604052919050565b60008083836040516020016101c792919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b6040516020818303038152906040528051906020012060001c90506101ed8686836100d5565b91506001600160a01b03831615610263576040516303ca56a360e31b81526001600160a01b03841690631e52b518906102309085908a908a908a906004016105c8565b600060405180830381600087803b15801561024a57600080fd5b505af115801561025e573d6000803e3d6000fd5b505050505b50949350505050565b60008083805190602001208361027f4690565b60408051602081019490945283019190915260608201526080016100fb565b6000833b6102f35760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65746f6e20636f6e7472616374206e6f74206465706c6f7965640060448201526064015b60405180910390fd5b600060405180602001610305906103c5565b601f1982820381018352601f90910116604081905261033291906001600160a01b03881690602001610605565b6040516020818303038152906040529050828151826020016000f591506001600160a01b03821661039b5760405162461bcd60e51b815260206004820152601360248201527210dc99585d194c8818d85b1b0819985a5b1959606a1b60448201526064016102ea565b8351156103bd5760008060008651602088016000875af114156103bd57600080fd5b509392505050565b6101738061062883390190565b6001600160a01b03811681146103e757600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261041157600080fd5b813567ffffffffffffffff8082111561042c5761042c6103ea565b604051601f8301601f19908116603f01168101908282118183101715610454576104546103ea565b8160405283815286602085880101111561046d57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000606084860312156104a257600080fd5b83356104ad816103d2565b9250602084013567ffffffffffffffff8111156104c957600080fd5b6104d586828701610400565b925050604084013590509250925092565b60005b838110156105015781810151838201526020016104e9565b83811115610510576000848401525b50505050565b6000815180845261052e8160208601602086016104e6565b601f01601f19169290920160200192915050565b6020815260006105556020830184610516565b9392505050565b6000806000806080858703121561057257600080fd5b843561057d816103d2565b9350602085013567ffffffffffffffff81111561059957600080fd5b6105a587828801610400565b9350506040850135915060608501356105bd816103d2565b939692955090935050565b6001600160a01b038581168252841660208201526080604082018190526000906105f490830185610516565b905082606083015295945050505050565b600083516106178184602088016104e6565b919091019182525060200191905056fe608060405234801561001057600080fd5b5060405161017338038061017383398101604081905261002f916100b9565b6001600160a01b0381166100945760405162461bcd60e51b815260206004820152602260248201527f496e76616c69642073696e676c65746f6e20616464726573732070726f766964604482015261195960f21b606482015260840160405180910390fd5b600080546001600160a01b0319166001600160a01b03929092169190911790556100e9565b6000602082840312156100cb57600080fd5b81516001600160a01b03811681146100e257600080fd5b9392505050565b607c806100f76000396000f3fe6080604052600080546001600160a01b0316813563530ca43760e11b1415602857808252602082f35b3682833781823684845af490503d82833e806041573d82fd5b503d81f3fea2646970667358221220022b6bb97dd1e16cb867add83d4159f7550336cbb5b40514145e43f493c1377664736f6c634300080c0033a2646970667358221220c234353d1cd3fb339516380070344e4daaced01752ac891f8879c607d77b9dc464736f6c634300080c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100575760003560e01c80631688f0b91461005c5780633408e4701461008c57806353e5d9351461009a578063d18af54d146100af578063ec9e80bb146100c2575b600080fd5b61006f61006a36600461048d565b6100d5565b6040516001600160a01b0390911681526020015b60405180910390f35b604051468152602001610083565b6100a261016c565b6040516100839190610542565b61006f6100bd36600461055c565b610196565b61006f6100d036600461048d565b61026c565b6000808380519060200120836040516020016100fb929190918252602082015260400190565b60405160208183030381529060405280519060200120905061011e85858361029e565b604080516001600160a01b038084168252881660208201529193507f4f51faf6c4561ff95f067657e43439f0f856d97c04d9ec9070a6199ad418e235910160405180910390a1509392505050565b60606040518060200161017e906103c5565b601f1982820381018352601f90910116604052919050565b60008083836040516020016101c792919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b6040516020818303038152906040528051906020012060001c90506101ed8686836100d5565b91506001600160a01b03831615610263576040516303ca56a360e31b81526001600160a01b03841690631e52b518906102309085908a908a908a906004016105c8565b600060405180830381600087803b15801561024a57600080fd5b505af115801561025e573d6000803e3d6000fd5b505050505b50949350505050565b60008083805190602001208361027f4690565b60408051602081019490945283019190915260608201526080016100fb565b6000833b6102f35760405162461bcd60e51b815260206004820152601f60248201527f53696e676c65746f6e20636f6e7472616374206e6f74206465706c6f7965640060448201526064015b60405180910390fd5b600060405180602001610305906103c5565b601f1982820381018352601f90910116604081905261033291906001600160a01b03881690602001610605565b6040516020818303038152906040529050828151826020016000f591506001600160a01b03821661039b5760405162461bcd60e51b815260206004820152601360248201527210dc99585d194c8818d85b1b0819985a5b1959606a1b60448201526064016102ea565b8351156103bd5760008060008651602088016000875af114156103bd57600080fd5b509392505050565b6101738061062883390190565b6001600160a01b03811681146103e757600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261041157600080fd5b813567ffffffffffffffff8082111561042c5761042c6103ea565b604051601f8301601f19908116603f01168101908282118183101715610454576104546103ea565b8160405283815286602085880101111561046d57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000606084860312156104a257600080fd5b83356104ad816103d2565b9250602084013567ffffffffffffffff8111156104c957600080fd5b6104d586828701610400565b925050604084013590509250925092565b60005b838110156105015781810151838201526020016104e9565b83811115610510576000848401525b50505050565b6000815180845261052e8160208601602086016104e6565b601f01601f19169290920160200192915050565b6020815260006105556020830184610516565b9392505050565b6000806000806080858703121561057257600080fd5b843561057d816103d2565b9350602085013567ffffffffffffffff81111561059957600080fd5b6105a587828801610400565b9350506040850135915060608501356105bd816103d2565b939692955090935050565b6001600160a01b038581168252841660208201526080604082018190526000906105f490830185610516565b905082606083015295945050505050565b600083516106178184602088016104e6565b919091019182525060200191905056fe608060405234801561001057600080fd5b5060405161017338038061017383398101604081905261002f916100b9565b6001600160a01b0381166100945760405162461bcd60e51b815260206004820152602260248201527f496e76616c69642073696e676c65746f6e20616464726573732070726f766964604482015261195960f21b606482015260840160405180910390fd5b600080546001600160a01b0319166001600160a01b03929092169190911790556100e9565b6000602082840312156100cb57600080fd5b81516001600160a01b03811681146100e257600080fd5b9392505050565b607c806100f76000396000f3fe6080604052600080546001600160a01b0316813563530ca43760e11b1415602857808252602082f35b3682833781823684845af490503d82833e806041573d82fd5b503d81f3fea2646970667358221220022b6bb97dd1e16cb867add83d4159f7550336cbb5b40514145e43f493c1377664736f6c634300080c0033a2646970667358221220c234353d1cd3fb339516380070344e4daaced01752ac891f8879c607d77b9dc464736f6c634300080c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
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.