Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been partially verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- ConduitCreator
- Optimization enabled
- true
- Compiler version
- v0.8.14+commit.80d49f37
- Optimization runs
- 200
- EVM Version
- london
- Verified at
- 2026-05-04T17:21:36.548169Z
Constructor Arguments
000000000000000000000000939c8d89ebc11fa45e576215e2353673ad0ba18a
Arg [0] (address) : 0x939c8d89ebc11fa45e576215e2353673ad0ba18a
ConduitCreator.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.14;
/**
* @title ConduitCreatorInterface
* @author 0age
* @notice ConduitCreatorInterface contains function endpoints and an error
* declaration for the ConduitCreator contract.
*/
interface ConduitCreatorInterface {
// Declare custom error for an invalid conduit creator.
error InvalidConduitCreator();
/**
* @notice Deploy a new conduit on a given conduit controller using a
* supplied conduit key and assigning an initial owner for the
* deployed conduit. Only callable by the conduit creator.
*
* @param conduitController The conduit controller used to deploy the
* conduit.
* @param conduitKey The conduit key used to deploy the
* conduit.
* @param initialOwner The initial owner to set for the new
* conduit.
*
* @return conduit The address of the newly deployed conduit.
*/
function createConduit(
ConduitControllerInterface conduitController,
bytes32 conduitKey,
address initialOwner
) external returns (address conduit);
/**
* @notice Initiate conduit ownership transfer by assigning a new potential
* owner for the given conduit. Only callable by the conduit
* creator.
*
* @param conduitController The conduit controller used to deploy the
* conduit.
* @param conduit The conduit for which to initiate ownership
* transfer.
*/
function transferOwnership(
ConduitControllerInterface conduitController,
address conduit,
address newPotentialOwner
) external;
/**
* @notice Clear the currently set potential owner, if any, from a conduit.
* Only callable by the conduit creator.
*
* @param conduitController The conduit controller used to deploy the
* conduit.
* @param conduit The conduit for which to cancel ownership
* transfer.
*/
function cancelOwnershipTransfer(
ConduitControllerInterface conduitController,
address conduit
) external;
}
/**
* @title ConduitControllerInterface
* @author 0age
* @notice ConduitControllerInterface contains relevant external function
* interfaces for a conduit controller contract.
*/
interface ConduitControllerInterface {
/**
* @notice Deploy a new conduit using a supplied conduit key and assign an
* initial owner for the deployed conduit.
*
* @param conduitKey The conduit key used to deploy the conduit.
* @param initialOwner The initial owner to set for the new conduit.
*
* @return conduit The address of the newly deployed conduit.
*/
function createConduit(bytes32 conduitKey, address initialOwner)
external
returns (address conduit);
/**
* @notice Initiate conduit ownership transfer by assigning a new potential
* owner for the given conduit. Once set, the new potential owner
* may call `acceptOwnership` to claim ownership of the conduit.
* Only the owner of the conduit in question may call this function.
*
* @param conduit The conduit for which to initiate ownership transfer.
*/
function transferOwnership(address conduit, address newPotentialOwner)
external;
/**
* @notice Clear the currently set potential owner, if any, from a conduit.
* Only the owner of the conduit in question may call this function.
*
* @param conduit The conduit for which to cancel ownership transfer.
*/
function cancelOwnershipTransfer(address conduit) external;
}
/**
* @title ConduitCreator
* @author 0age
* @notice ConduitCreator allows a specific account to create new conduits on
arbitrary conduit controllers.
*/
contract ConduitCreator is ConduitCreatorInterface {
// Set the conduit creator as an immutable argument.
address internal immutable _CONDUIT_CREATOR;
/**
* @notice Modifier to ensure that only the conduit creator can call a given
* function.
*/
modifier onlyCreator() {
// Ensure that the caller is the conduit creator.
if (msg.sender != _CONDUIT_CREATOR) {
revert InvalidConduitCreator();
}
// Proceed with function execution.
_;
}
/**
* @dev Initialize contract by setting the conduit creator.
*/
constructor(address conduitCreator) {
// Set the conduit creator as an immutable argument.
_CONDUIT_CREATOR = conduitCreator;
}
/**
* @notice Deploy a new conduit on a given conduit controller using a
* supplied conduit key and assigning an initial owner for the
* deployed conduit. Only callable by the conduit creator.
*
* @param conduitController The conduit controller used to deploy the
* conduit.
* @param conduitKey The conduit key used to deploy the
* conduit.
* @param initialOwner The initial owner to set for the new
* conduit.
*
* @return conduit The address of the newly deployed conduit.
*/
function createConduit(
ConduitControllerInterface conduitController,
bytes32 conduitKey,
address initialOwner
) external override onlyCreator returns (address conduit) {
// Call the conduit controller to create the conduit.
conduit = conduitController.createConduit(conduitKey, initialOwner);
}
/**
* @notice Initiate conduit ownership transfer by assigning a new potential
* owner for the given conduit. Only callable by the conduit
* creator.
*
* @param conduitController The conduit controller used to deploy the
* conduit.
* @param conduit The conduit for which to initiate ownership
* transfer.
*/
function transferOwnership(
ConduitControllerInterface conduitController,
address conduit,
address newPotentialOwner
) external override onlyCreator {
// Call the conduit controller to transfer conduit ownership.
conduitController.transferOwnership(conduit, newPotentialOwner);
}
/**
* @notice Clear the currently set potential owner, if any, from a conduit.
* Only callable by the conduit creator.
*
* @param conduitController The conduit controller used to deploy the
* conduit.
* @param conduit The conduit for which to cancel ownership
* transfer.
*/
function cancelOwnershipTransfer(
ConduitControllerInterface conduitController,
address conduit
) external override onlyCreator {
// Call the conduit controller to cancel ownership transfer.
conduitController.cancelOwnershipTransfer(conduit);
}
}
Compiler Settings
{"remappings":[],"optimizer":{"runs":200,"enabled":true},"metadata":{"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"london","compilationTarget":{"ConduitCreator.sol":"ConduitCreator"}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"conduitCreator","internalType":"address"}]},{"type":"error","name":"InvalidConduitCreator","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"cancelOwnershipTransfer","inputs":[{"type":"address","name":"conduitController","internalType":"contract ConduitControllerInterface"},{"type":"address","name":"conduit","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"address","name":"conduit","internalType":"address"}],"name":"createConduit","inputs":[{"type":"address","name":"conduitController","internalType":"contract ConduitControllerInterface"},{"type":"bytes32","name":"conduitKey","internalType":"bytes32"},{"type":"address","name":"initialOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"conduitController","internalType":"contract ConduitControllerInterface"},{"type":"address","name":"conduit","internalType":"address"},{"type":"address","name":"newPotentialOwner","internalType":"address"}]}]
Contract Creation Code
0x60a060405234801561001057600080fd5b5060405161048138038061048183398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b6080516103e96100986000396000818160a801528181610150015261020301526103e96000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630b9a2c92146100465780636b760a941461005b578063c773d1ee1461006e575b600080fd5b6100596100543660046102d4565b61009d565b005b61005961006936600461030d565b610145565b61008161007c366004610358565b6101f6565b6040516001600160a01b03909116815260200160405180910390f35b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146100e6576040516301aa4cc960e41b815260040160405180910390fd5b604051637b37e56160e01b81526001600160a01b038281166004830152831690637b37e56190602401600060405180830381600087803b15801561012957600080fd5b505af115801561013d573d6000803e3d6000fd5b505050505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461018e576040516301aa4cc960e41b815260040160405180910390fd5b604051636d43542160e01b81526001600160a01b0383811660048301528281166024830152841690636d43542190604401600060405180830381600087803b1580156101d957600080fd5b505af11580156101ed573d6000803e3d6000fd5b50505050505050565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610241576040516301aa4cc960e41b815260040160405180910390fd5b604051631e5164ef60e21b8152600481018490526001600160a01b03838116602483015285169063794593bc906044016020604051808303816000875af1158015610290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b4919061038f565b949350505050565b6001600160a01b03811681146102d157600080fd5b50565b600080604083850312156102e757600080fd5b82356102f2816102bc565b91506020830135610302816102bc565b809150509250929050565b60008060006060848603121561032257600080fd5b833561032d816102bc565b9250602084013561033d816102bc565b9150604084013561034d816102bc565b809150509250925092565b60008060006060848603121561036d57600080fd5b8335610378816102bc565b925060208401359150604084013561034d816102bc565b6000602082840312156103a157600080fd5b81516103ac816102bc565b939250505056fea2646970667358221220cf5c5c029d4895631072969b0034e7ce0588d405885351c9962b96db8173a51164736f6c634300080e0033000000000000000000000000939c8d89ebc11fa45e576215e2353673ad0ba18a
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106100415760003560e01c80630b9a2c92146100465780636b760a941461005b578063c773d1ee1461006e575b600080fd5b6100596100543660046102d4565b61009d565b005b61005961006936600461030d565b610145565b61008161007c366004610358565b6101f6565b6040516001600160a01b03909116815260200160405180910390f35b336001600160a01b037f000000000000000000000000939c8d89ebc11fa45e576215e2353673ad0ba18a16146100e6576040516301aa4cc960e41b815260040160405180910390fd5b604051637b37e56160e01b81526001600160a01b038281166004830152831690637b37e56190602401600060405180830381600087803b15801561012957600080fd5b505af115801561013d573d6000803e3d6000fd5b505050505050565b336001600160a01b037f000000000000000000000000939c8d89ebc11fa45e576215e2353673ad0ba18a161461018e576040516301aa4cc960e41b815260040160405180910390fd5b604051636d43542160e01b81526001600160a01b0383811660048301528281166024830152841690636d43542190604401600060405180830381600087803b1580156101d957600080fd5b505af11580156101ed573d6000803e3d6000fd5b50505050505050565b6000336001600160a01b037f000000000000000000000000939c8d89ebc11fa45e576215e2353673ad0ba18a1614610241576040516301aa4cc960e41b815260040160405180910390fd5b604051631e5164ef60e21b8152600481018490526001600160a01b03838116602483015285169063794593bc906044016020604051808303816000875af1158015610290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b4919061038f565b949350505050565b6001600160a01b03811681146102d157600080fd5b50565b600080604083850312156102e757600080fd5b82356102f2816102bc565b91506020830135610302816102bc565b809150509250929050565b60008060006060848603121561032257600080fd5b833561032d816102bc565b9250602084013561033d816102bc565b9150604084013561034d816102bc565b809150509250925092565b60008060006060848603121561036d57600080fd5b8335610378816102bc565b925060208401359150604084013561034d816102bc565b6000602082840312156103a157600080fd5b81516103ac816102bc565b939250505056fea2646970667358221220cf5c5c029d4895631072969b0034e7ce0588d405885351c9962b96db8173a51164736f6c634300080e0033