_transfer(address,bytes32) :
This function is used to transfer tokens from one address to another. It takes in a ReceivedItem memory item, an address from, a bytes32 conduitKey, and a bytes memory accumulator. Depending on the item type, it will call the appropriate transfer function (either _transferEth, _transferERC20, _transferERC721, or _transferERC1155). If the item type is NATIVE, it will check that the token and identifier are both 0, and then call _transferEth to transfer the amount of ETH specified in the item. If the item type is ERC20, it will check that the identifier is 0, and then call _transferERC20 to transfer the amount of ERC20 tokens specified (autogenerated documentation)
_transferIndividual721Or1155Item(address,address,address,uint256,uint256,bytes32) :
This function is used to transfer an individual ERC721 or ERC1155 item from one address to another. It takes in the item type, token address, from address, to address, identifier, amount, and conduit key as parameters. If the conduit key is not 0, the function calls the Conduit_execute_signature function with the appropriate parameters. Otherwise, if the item type is ERC721, it performs an ERC721 transfer with the given parameters. If the item type is ERC1155, it performs an ERC1155 transfer with the given parameters. (autogenerated documentation)
_transferEth(address,uint256) :
This function is an internal function that is used to transfer Ether from one address to another. It takes two parameters, an address payable to which the Ether should be sent and an amount of Ether to be sent. It first checks that the amount is not zero, then it calls the call() function to transfer the Ether. If the call() function returns false, it reverts the transaction with a generic failure message. (autogenerated documentation)
_transferERC20(address,address,address,uint256,bytes32) :
This function is used to transfer ERC20 tokens from one address to another. It takes in the address of the token, the address of the sender, the address of the recipient, the amount of tokens to be transferred, a conduit key, and an accumulator. It first checks to make sure that the amount is not zero, and then triggers an event if the accumulator is armed and not accumulatable. If the conduit key is zero, it performs the ERC20 transfer directly. Otherwise, it inserts the details of the transfer into the accumulator. (autogenerated documentation)
_transferERC721(address,address,address,uint256,uint256,bytes32) :
This function is used to transfer ERC721 tokens from one address to another. It first checks if the conduitKey is set to 0, and if so, it performs the transfer with the given amount (which must be 1). If the conduitKey is not 0, it inserts the transfer details into the accumulator. (autogenerated documentation)
_transferERC1155(address,address,address,uint256,uint256,bytes32) :
This function is used to transfer ERC1155 tokens from one address to another. It first checks to make sure that the amount being transferred is not zero, and then triggers an event if the accumulator is armed and not accumulatable. If the conduitKey is equal to zero, the function will perform the ERC1155 transfer directly. Otherwise, it will insert the transfer details into the accumulator. (autogenerated documentation)
_triggerIfArmedAndNotAccumulatable(bytes32) :
This function checks if an accumulator is armed and not accumulatable. If the accumulator's conduit key does not match the given conduit key, the function will trigger the accumulator. This function is used to ensure that an accumulator is not accumulatable, meaning that it cannot be used to accumulate more data. (autogenerated documentation)
_triggerIfArmed() :
This function is used to trigger an accumulator if it is armed. It takes in a bytes memory accumulator as an argument and checks if its length is equal to the AccumulatorArmed value. If it is, it calculates the accumulatorConduitKey using the _getAccumulatorConduitKey() function and then calls the _trigger() function with the accumulatorConduitKey and accumulator as arguments. (autogenerated documentation)
_trigger(bytes32) :
This function is used to trigger a conduit with a given key and accumulator. It first calculates the call data offset and size by adding the accumulator to two words and then multiplying the accumulator array length by the Conduit transferItem size. It then calls the conduit using the calculated offsets and size. Finally, it sets the accumulator to the AccumulatorDisarmed state. (autogenerated documentation)
_callConduitUsingOffsets(bytes32,uint256,uint256) :
This function is used to call a Conduit contract using an offset and size for the call data. It first derives the address of the Conduit contract from the given conduitKey. It then calls the Conduit contract using the callDataOffset and callDataSize as parameters. If the call is successful, it checks that the result of the call is the expected selector for the ConduitInterface.execute function. If the call is unsuccessful or the result is not the expected selector, it reverts with an appropriate error. (autogenerated documentation)
_getAccumulatorConduitKey() :
This function retrieves the 32-byte conduit key stored in the accumulator data structure. It does this by using the mload opcode to read the data stored at the memory address given by the accumulator pointer plus the offset of the conduit key pointer. (autogenerated documentation)
_insert(bytes32,address,address,address,uint256,uint256) :
This function is used to insert a new item into an accumulator. It takes in a conduitKey, an accumulator, an itemType, a token, a from address, a to address, an identifier, and an amount. It first checks to see if the accumulator is disarmed, and if so, it arms it and sets the conduitKey, selector, array offset, and array length. If the accumulator is already armed, it increments the array length. Finally, it stores the itemType, token, from address, to address, identifier, and amount in the accumulator. (autogenerated documentation)