createConduit(bytes32,address) :
This function creates a new Conduit contract and assigns it an initial owner. It takes two parameters, a bytes32 conduitKey and an address initialOwner. It first checks that the initialOwner is not address(0) and that the msg.sender is the address associated with the conduitKey. It then creates a new Conduit contract and assigns it the conduitKey. It then stores the initialOwner and conduitKey in the ConduitProperties storage. Finally, it emits two events, NewConduit and OwnershipTransferred. (autogenerated documentation)
updateChannel(address,address,bool) :
This function updates the status of a channel associated with a given conduit. It first checks that the caller is the owner of the conduit, then calls the updateChannel() function of the ConduitInterface associated with the conduit. It then updates the channels array and channelIndexesPlusOne mapping of the conduitProperties storage variable to reflect the new status of the channel. If the channel is being opened, it is added to the channels array and its index is added to the channelIndexesPlusOne mapping. If the channel is being closed, its index is removed from the channelIndexesPlusOne mapping and the last element of the channels array is moved to the index of the closed channel. (autogenerated documentation)
transferOwnership(address,address) :
This function allows the owner of a conduit to transfer ownership of the conduit to a new potential owner. It first checks that the caller is the conduit owner, and then checks that the new potential owner is not the zero address. If the new potential owner is already set, the function will revert. Finally, the function emits an event and sets the new potential owner. (autogenerated documentation)
cancelOwnershipTransfer(address) :
This function cancels an ownership transfer of a conduit. It first checks that the caller is the conduit owner, and then checks that there is a potential owner set. If both of these conditions are met, it emits an event to indicate that the potential owner has been updated to address 0, and then sets the potential owner of the conduit to address 0. (autogenerated documentation)
acceptOwnership(address) :
This function allows a potential owner to accept ownership of a conduit. It first checks that the caller is the potential owner of the conduit, and then emits an event to indicate that the potential owner has been updated. It then emits an event to indicate that the ownership of the conduit has been transferred, and finally sets the owner of the conduit to the caller. (autogenerated documentation)
ownerOf(address) :
This function returns the owner of a given address. It does this by first asserting that the address exists in the _conduits mapping, and then returning the owner associated with that address. (autogenerated documentation)
getKey(address) :
This function retrieves the key associated with a given conduit address. It does this by accessing the _conduits mapping, which stores the key associated with each conduit address. If the key associated with the given address is 0, then the function reverts with an error. (autogenerated documentation)
getConduit(bytes32) :
This function is used to retrieve the address of a Conduit contract given its bytes32 key. It works by hashing the key, address of the contract, and code hashes of the Conduit creation and runtime code, and then converting the result to a uint160 address. The function then checks if the codehash of the address matches the runtime code hash, and returns the address and a boolean indicating whether the Conduit exists. (autogenerated documentation)
getPotentialOwner(address) :
This function gets the potential owner of a given conduit. It first checks to make sure that the conduit exists, and then returns the potential owner stored in the _conduits mapping. (autogenerated documentation)
getChannelStatus(address,address) :
This function checks the status of a given channel on a given conduit. It takes two address parameters, the conduit address and the channel address, and returns a boolean value indicating whether the channel is open or not. The function first checks that the conduit exists, then checks the channelIndexesPlusOne mapping of the conduit to determine if the channel is open. If the channelIndexesPlusOne mapping for the given channel address is not equal to 0, then the channel is open and the function returns true. Otherwise, the channel is closed and the function returns false. (autogenerated documentation)
getTotalChannels(address) :
This function gets the total number of channels associated with a given conduit address. It first checks to make sure that the conduit address exists, and then it returns the length of the channels array associated with the conduit address. (autogenerated documentation)
getChannel(address,uint256) :
This function retrieves the address of a channel from a given conduit. It takes in the address of the conduit and the index of the channel as parameters. It first checks to make sure that the conduit exists, then checks to make sure that the channel index is within the range of the total number of channels in the conduit. If both of these checks pass, it returns the address of the channel at the given index. (autogenerated documentation)
getChannels(address) :
This function retrieves an array of addresses associated with a given conduit. It does this by first asserting that the given conduit exists, and then retrieving the array of addresses from the _conduits mapping. (autogenerated documentation)
getConduitCodeHashes() :
This function returns the code hashes of the Conduit contract. It does this by returning the values of two internal variables, _CONDUIT_CREATION_CODE_HASH and _CONDUIT_RUNTIME_CODE_HASH, which store the code hashes of the Conduit contract. (autogenerated documentation)
_assertCallerIsConduitOwner(address) :
This function checks if the caller of the function is the owner of the specified conduit. It does this by first checking if the conduit exists in the _conduits mapping, and then comparing the msg.sender address to the owner address stored in the _conduits mapping. If the two addresses do not match, the function reverts with an error message. (autogenerated documentation)
_assertConduitExists(address) :
This function is used to check if a given address is a valid conduit. It does this by checking if the key associated with the address in the _conduits mapping is equal to bytes32(0). If it is, then the function will revert with the error "NoConduit". (autogenerated documentation)