Overview
APE Balance
APE Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x1E004978...d54003c71 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Conduit
Compiler Version
v0.8.14+commit.80d49f37
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity >=0.8.7;import { ConduitInterface } from "../interfaces/ConduitInterface.sol";import { ConduitItemType } from "./lib/ConduitEnums.sol";import { TokenTransferrer } from "../lib/TokenTransferrer.sol";// prettier-ignoreimport {ConduitTransfer,ConduitBatch1155Transfer} from "./lib/ConduitStructs.sol";import "./lib/ConduitConstants.sol";/*** @title Conduit* @author 0age* @notice This contract serves as an originator for "proxied" transfers. Each* conduit is deployed and controlled by a "conduit controller" that can* add and remove "channels" or contracts that can instruct the conduit* to transfer approved ERC20/721/1155 tokens. *IMPORTANT NOTE: each* conduit has an owner that can arbitrarily add or remove channels, and* a malicious or negligent owner can add a channel that allows for any
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity >=0.8.7;// prettier-ignoreimport {ConduitTransfer,ConduitBatch1155Transfer} from "../conduit/lib/ConduitStructs.sol";/*** @title ConduitInterface* @author 0age* @notice ConduitInterface contains all external function interfaces, events,* and errors for conduit contracts.*/interface ConduitInterface {/*** @dev Revert with an error when attempting to execute transfers using a* caller that does not have an open channel.*/error ChannelClosed(address channel);/*** @dev Revert with an error when attempting to update a channel to the* current status of that channel.*/
123456789// SPDX-License-Identifier: MITpragma solidity >=0.8.7;enum ConduitItemType {NATIVE, // unusedERC20,ERC721,ERC1155}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity >=0.8.7;import "./TokenTransferrerConstants.sol";// prettier-ignoreimport {TokenTransferrerErrors} from "../interfaces/TokenTransferrerErrors.sol";import { ConduitBatch1155Transfer } from "../conduit/lib/ConduitStructs.sol";/*** @title TokenTransferrer* @author 0age* @custom:coauthor d1ll0n* @custom:coauthor transmissions11* @notice TokenTransferrer is a library for performing optimized ERC20, ERC721,* ERC1155, and batch ERC1155 transfers, used by both Seaport as well as* by conduits deployed by the ConduitController. Use great caution when* considering these functions for use in other codebases, as there are* significant side effects and edge cases that need to be thoroughly* understood and carefully addressed.*/contract TokenTransferrer is TokenTransferrerErrors {/**
123456789101112131415161718192021// SPDX-License-Identifier: MITpragma solidity >=0.8.7;import { ConduitItemType } from "./ConduitEnums.sol";struct ConduitTransfer {ConduitItemType itemType;address token;address from;address to;uint256 identifier;uint256 amount;}struct ConduitBatch1155Transfer {address token;address from;address to;uint256[] ids;uint256[] amounts;}
123456789101112131415161718// SPDX-License-Identifier: MITpragma solidity >=0.8.7;// error ChannelClosed(address channel)uint256 constant ChannelClosed_error_signature = (0x93daadf200000000000000000000000000000000000000000000000000000000);uint256 constant ChannelClosed_error_ptr = 0x00;uint256 constant ChannelClosed_channel_ptr = 0x4;uint256 constant ChannelClosed_error_length = 0x24;// For the mapping:// mapping(address => bool) channels// The position in storage for a particular account is:// keccak256(abi.encode(account, channels.slot))uint256 constant ChannelKey_channel_ptr = 0x00;uint256 constant ChannelKey_slot_ptr = 0x20;uint256 constant ChannelKey_length = 0x40;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity >=0.8.7;/** -------------------------- Disambiguation & Other Notes ---------------------* - The term "head" is used as it is in the documentation for ABI encoding,* but only in reference to dynamic types, i.e. it always refers to the* offset or pointer to the body of a dynamic type. In calldata, the head* is always an offset (relative to the parent object), while in memory,* the head is always the pointer to the body. More information found here:* https://docs.soliditylang.org/en/v0.8.14/abi-spec.html#argument-encoding* - Note that the length of an array is separate from and precedes the* head of the array.** - The term "body" is used in place of the term "head" used in the ABI* documentation. It refers to the start of the data for a dynamic type,* e.g. the first word of a struct or the first word of the first element* in an array.** - The term "pointer" is used to describe the absolute position of a value* and never an offset relative to another value.* - The suffix "_ptr" refers to a memory pointer.* - The suffix "_cdPtr" refers to a calldata pointer.** - The term "offset" is used to describe the position of a value relative* to some parent value. For example, OrderParameters_conduit_offset is the
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity >=0.8.7;/*** @title TokenTransferrerErrors*/interface TokenTransferrerErrors {/*** @dev Revert with an error when an ERC721 transfer with amount other than* one is attempted.*/error InvalidERC721TransferAmount();/*** @dev Revert with an error when attempting to fulfill an order where an* item has an amount of zero.*/error MissingItemAmount();/*** @dev Revert with an error when attempting to fulfill an order where an* item has unused parameters. This includes both the token and the* identifier parameters for native transfers as well as the identifier* parameter for ERC20 transfers. Note that the conduit does not* perform this check, leaving it up to the calling channel to enforce* when desired.
12345678910111213141516171819{"viaIR": true,"optimizer": {"enabled": true,"runs": 1000000},"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","devdoc","userdoc","metadata","abi"]}}}
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BadReturnValueFromERC20OnTransfer","type":"error"},{"inputs":[{"internalType":"address","name":"channel","type":"address"}],"name":"ChannelClosed","type":"error"},{"inputs":[{"internalType":"address","name":"channel","type":"address"},{"internalType":"bool","name":"isOpen","type":"bool"}],"name":"ChannelStatusAlreadySet","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"identifiers","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"ERC1155BatchTransferGenericFailure","type":"error"},{"inputs":[],"name":"Invalid1155BatchTransferEncoding","type":"error"},{"inputs":[],"name":"InvalidController","type":"error"},{"inputs":[],"name":"InvalidERC721TransferAmount","type":"error"},{"inputs":[],"name":"InvalidItemType","type":"error"},{"inputs":[],"name":"MissingItemAmount","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"NoContract","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"identifier","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenTransferGenericFailure","type":"error"},{"inputs":[],"name":"UnusedItemParameters","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"channel","type":"address"},{"indexed":false,"internalType":"bool","name":"open","type":"bool"}],"name":"ChannelUpdated","type":"event"},{"inputs":[{"components":[{"internalType":"enum ConduitItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"identifier","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ConduitTransfer[]","name":"transfers","type":"tuple[]"}],"name":"execute","outputs":[{"internalType":"bytes4","name":"magicValue","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"internalType":"struct ConduitBatch1155Transfer[]","name":"batchTransfers","type":"tuple[]"}],"name":"executeBatch1155","outputs":[{"internalType":"bytes4","name":"magicValue","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"enum ConduitItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"identifier","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ConduitTransfer[]","name":"standardTransfers","type":"tuple[]"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"internalType":"struct ConduitBatch1155Transfer[]","name":"batchTransfers","type":"tuple[]"}],"name":"executeWithBatch1155","outputs":[{"internalType":"bytes4","name":"magicValue","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"channel","type":"address"},{"internalType":"bool","name":"isOpen","type":"bool"}],"name":"updateChannel","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x60806040526004361015610013575b600080fd5b6000803560e01c9081634ce34aa21461006657508063899e104c1461005d5780638df25d92146100545763c4e8fcb51461004c57600080fd5b61000e610362565b5061000e61027f565b5061000e6101ab565b346101465760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101465760043567ffffffffffffffff8111610142576100b5903690600401610149565b9133815280602052604081205415610116575b8281106100fa576040517f4ce34aa2000000000000000000000000000000000000000000000000000000008152602090f35b8061011061010b6001938686610532565b6105c4565b016100c8565b807f93daadf2000000000000000000000000000000000000000000000000000000006024925233600452fd5b5080fd5b80fd5b9181601f8401121561000e5782359167ffffffffffffffff831161000e5760208085019460c0850201011161000e57565b9181601f8401121561000e5782359167ffffffffffffffff831161000e576020808501948460051b01011161000e57565b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5767ffffffffffffffff60043581811161000e576101fc903690600401610149565b9160243590811161000e5761021590369060040161017a565b919092600033815280602052604081205415610116575b8181106102685761023d8486610acb565b6040517f899e104c000000000000000000000000000000000000000000000000000000008152602090f35b8061027961010b6001938587610532565b0161022c565b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043567ffffffffffffffff811161000e576102cf90369060040161017a565b33600052600060205260406000205415610316576102ec91610acb565b60206040517f8df25d92000000000000000000000000000000000000000000000000000000008152f35b7f93daadf2000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81160361000e57565b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043561039e81610344565b6024359081151580830361000e5773ffffffffffffffffffffffffffffffffffffffff90817f00000000000000000000000000000000f9490004c11cef243f5400493c00ad631633036105085761041f6104188473ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b5460ff1690565b1515146104b657816104a6846104767fae63067d43ac07563b7eb8db6595635fc77f1578a2a5ea06ba91b63e2afa37e29573ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b9060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b60405193151584521691602090a2005b506040517f924e341e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9190911660048201529015156024820152604490fd5b60046040517f6d5769be000000000000000000000000000000000000000000000000000000008152fd5b91908110156105425760c0020190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6004111561057b57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b35600481101561000e5790565b356105c181610344565b90565b60016105cf826105aa565b6105d881610571565b0361061357806105ed602061061193016105b7565b906105fa604082016105b7565b60a0610608606084016105b7565b92013592610712565b565b600261061e826105aa565b61062781610571565b0361069657600160a08201350361066c5780610648602061061193016105b7565b90610655604082016105b7565b6080610663606084016105b7565b92013592610882565b60046040517fefcc00b1000000000000000000000000000000000000000000000000000000008152fd5b60036106a1826105aa565b6106aa81610571565b036106e857806106bf602061061193016105b7565b6106cb604083016105b7565b6106d7606084016105b7565b90608060a085013594013592610990565b60046040517f7932f1fc000000000000000000000000000000000000000000000000000000008152fd5b9092604051926000947f23b872dd00000000000000000000000000000000000000000000000000000000865280600452816024528260445260208660648180885af1803d15601f3d1160018a51141617163d151581161561077c575b505050505050604052606052565b80863b15151661076e579087959691156107bc57602486887f5f15d672000000000000000000000000000000000000000000000000000000008252600452fd5b156107f657506084947f98891923000000000000000000000000000000000000000000000000000000008552600452602452604452606452fd5b3d610835575b5060a4947ff486bc8700000000000000000000000000000000000000000000000000000000855260045260245260445281606452608452fd5b601f3d0160051c9060051c908060030291808211610869575b505060205a91011061086057856107fc565b833d81803e3d90fd5b8080600392028380020360091c9203020101868061084e565b9092813b1561096257604051926000947f23b872dd000000000000000000000000000000000000000000000000000000008652806004528160245282604452858060648180885af1156108db5750505050604052606052565b8593943d61091e575b5060a4947ff486bc870000000000000000000000000000000000000000000000000000000085526004526024526044526064526001608452fd5b601f3d0160051c9060051c908060030291808211610949575b505060205a91011061086057856108e4565b8080600392028380020360091c92030201018680610937565b507f5f15d6720000000000000000000000000000000000000000000000000000000060005260045260246000fd5b929093833b15610a9d57604051936080519160a0519360c051956000987ff242432a000000000000000000000000000000000000000000000000000000008a528060045281602452826044528360645260a06084528960a452898060c48180895af115610a0d57505050505060805260a05260c052604052606052565b89949550883d610a50575b5060a4957ff486bc87000000000000000000000000000000000000000000000000000000008652600452602452604452606452608452fd5b601f3d0160051c9060051c908060030291808211610a84575b505060205a910110610a7b5786610a18565b843d81803e3d90fd5b8080600392028380020360091c92030201018780610a69565b837f5f15d6720000000000000000000000000000000000000000000000000000000060005260045260246000fd5b90816020907f2eb2c2d600000000000000000000000000000000000000000000000000000000825260005b838110610b095750505050506080604052565b8435820194853590813b156109625760a09182880192833560059181831b948b60c08097608094818301868501351490606085013514169201013584141615610c165789019a890160243760061b9360e0850160a452610104850194600086526040019060c437600080858982865af115610b8a5750505050600101610af6565b869394503d610bcb575b507fafc445e20000000000000000000000000000000000000000000000000000000060005260045260645260849081510190526000fd5b84601f3d01821c911c90600381810292808311610bff575b505050835a910110610bf55784610b94565b3d6000803e3d6000fd5b8080028380020360091c9203020101858080610be3565b7feba2084c0000000000000000000000000000000000000000000000000000000060005260046000fdfea2646970667358221220c5c8d054d9d5df7c3530eab1c32506aad1fcb6772c1457f0da5443ad9e91b4a364736f6c634300080e0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ 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.