Created
May 22, 2024 23:25
-
-
Save AE-0h/b4167a1827dee3a8312813a0e9fde1a2 to your computer and use it in GitHub Desktop.
DeployThunderLoan by 6-thunder-loan-audit. Find it at https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) | |
pragma solidity ^0.8.20; | |
/** | |
* @dev Collection of functions related to the address type | |
*/ | |
library Address { | |
/** | |
* @dev The ETH balance of the account is not enough to perform the operation. | |
*/ | |
error AddressInsufficientBalance(address account); | |
/** | |
* @dev There's no code at `target` (it is not a contract). | |
*/ | |
error AddressEmptyCode(address target); | |
/** | |
* @dev A call to an address target failed. The target may have reverted. | |
*/ | |
error FailedInnerCall(); | |
/** | |
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to | |
* `recipient`, forwarding all available gas and reverting on errors. | |
* | |
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost | |
* of certain opcodes, possibly making contracts go over the 2300 gas limit | |
* imposed by `transfer`, making them unable to receive funds via | |
* `transfer`. {sendValue} removes this limitation. | |
* | |
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. | |
* | |
* IMPORTANT: because control is transferred to `recipient`, care must be | |
* taken to not create reentrancy vulnerabilities. Consider using | |
* {ReentrancyGuard} or the | |
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. | |
*/ | |
function sendValue(address payable recipient, uint256 amount) internal { | |
if (address(this).balance < amount) { | |
revert AddressInsufficientBalance(address(this)); | |
} | |
(bool success, ) = recipient.call{value: amount}(""); | |
if (!success) { | |
revert FailedInnerCall(); | |
} | |
} | |
/** | |
* @dev Performs a Solidity function call using a low level `call`. A | |
* plain `call` is an unsafe replacement for a function call: use this | |
* function instead. | |
* | |
* If `target` reverts with a revert reason or custom error, it is bubbled | |
* up by this function (like regular Solidity function calls). However, if | |
* the call reverted with no returned reason, this function reverts with a | |
* {FailedInnerCall} error. | |
* | |
* Returns the raw returned data. To convert to the expected return value, | |
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. | |
* | |
* Requirements: | |
* | |
* - `target` must be a contract. | |
* - calling `target` with `data` must not revert. | |
*/ | |
function functionCall(address target, bytes memory data) internal returns (bytes memory) { | |
return functionCallWithValue(target, data, 0); | |
} | |
/** | |
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], | |
* but also transferring `value` wei to `target`. | |
* | |
* Requirements: | |
* | |
* - the calling contract must have an ETH balance of at least `value`. | |
* - the called Solidity function must be `payable`. | |
*/ | |
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { | |
if (address(this).balance < value) { | |
revert AddressInsufficientBalance(address(this)); | |
} | |
(bool success, bytes memory returndata) = target.call{value: value}(data); | |
return verifyCallResultFromTarget(target, success, returndata); | |
} | |
/** | |
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], | |
* but performing a static call. | |
*/ | |
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { | |
(bool success, bytes memory returndata) = target.staticcall(data); | |
return verifyCallResultFromTarget(target, success, returndata); | |
} | |
/** | |
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], | |
* but performing a delegate call. | |
*/ | |
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { | |
(bool success, bytes memory returndata) = target.delegatecall(data); | |
return verifyCallResultFromTarget(target, success, returndata); | |
} | |
/** | |
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target | |
* was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an | |
* unsuccessful call. | |
*/ | |
function verifyCallResultFromTarget( | |
address target, | |
bool success, | |
bytes memory returndata | |
) internal view returns (bytes memory) { | |
if (!success) { | |
_revert(returndata); | |
} else { | |
// only check if target is a contract if the call was successful and the return data is empty | |
// otherwise we already know that it was a contract | |
if (returndata.length == 0 && target.code.length == 0) { | |
revert AddressEmptyCode(target); | |
} | |
return returndata; | |
} | |
} | |
/** | |
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the | |
* revert reason or with a default {FailedInnerCall} error. | |
*/ | |
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { | |
if (!success) { | |
_revert(returndata); | |
} else { | |
return returndata; | |
} | |
} | |
/** | |
* @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. | |
*/ | |
function _revert(bytes memory returndata) private pure { | |
// Look for revert reason and bubble it up if present | |
if (returndata.length > 0) { | |
// The easiest way to bubble the revert reason is using memory via assembly | |
/// @solidity memory-safe-assembly | |
assembly { | |
let returndata_size := mload(returndata) | |
revert(add(32, returndata), returndata_size) | |
} | |
} else { | |
revert FailedInnerCall(); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: AGPL-3.0-only | |
pragma solidity 0.8.20; | |
import { ERC20 } from "./ERC20.sol"; | |
import { IERC20 } from "./IERC20.sol"; | |
import { SafeERC20 } from "./SafeERC20.sol"; | |
contract AssetToken is ERC20 { | |
error AssetToken__onlyThunderLoan(); | |
error AssetToken__ExhangeRateCanOnlyIncrease(uint256 oldExchangeRate, uint256 newExchangeRate); | |
error AssetToken__ZeroAddress(); | |
using SafeERC20 for IERC20; | |
/*////////////////////////////////////////////////////////////// | |
STATE VARIABLES | |
//////////////////////////////////////////////////////////////*/ | |
IERC20 private immutable i_underlying; | |
address private immutable i_thunderLoan; | |
// The underlying per asset exchange rate | |
// ie: s_exchangeRate = 2 | |
// means 1 asset token is worth 2 underlying tokens | |
uint256 private s_exchangeRate; | |
uint256 public constant EXCHANGE_RATE_PRECISION = 1e18; | |
uint256 private constant STARTING_EXCHANGE_RATE = 1e18; | |
/*////////////////////////////////////////////////////////////// | |
EVENTS | |
//////////////////////////////////////////////////////////////*/ | |
event ExchangeRateUpdated(uint256 newExchangeRate); | |
/*////////////////////////////////////////////////////////////// | |
MODIFIERS | |
//////////////////////////////////////////////////////////////*/ | |
modifier onlyThunderLoan() { | |
if (msg.sender != i_thunderLoan) { | |
revert AssetToken__onlyThunderLoan(); | |
} | |
_; | |
} | |
modifier revertIfZeroAddress(address someAddress) { | |
if (someAddress == address(0)) { | |
revert AssetToken__ZeroAddress(); | |
} | |
_; | |
} | |
/*////////////////////////////////////////////////////////////// | |
FUNCTIONS | |
//////////////////////////////////////////////////////////////*/ | |
constructor( | |
address thunderLoan, | |
IERC20 underlying, | |
string memory assetName, | |
string memory assetSymbol | |
) | |
ERC20(assetName, assetSymbol) | |
revertIfZeroAddress(thunderLoan) | |
revertIfZeroAddress(address(underlying)) | |
{ | |
i_thunderLoan = thunderLoan; | |
i_underlying = underlying; | |
s_exchangeRate = STARTING_EXCHANGE_RATE; | |
} | |
function mint(address to, uint256 amount) external onlyThunderLoan { | |
_mint(to, amount); | |
} | |
function burn(address account, uint256 amount) external onlyThunderLoan { | |
_burn(account, amount); | |
} | |
function transferUnderlyingTo(address to, uint256 amount) external onlyThunderLoan { | |
i_underlying.safeTransfer(to, amount); | |
} | |
function updateExchangeRate(uint256 fee) external onlyThunderLoan { | |
// 1. Get the current exchange rate | |
// 2. How big the fee is should be divided by the total supply | |
// 3. So if the fee is 1e18, and the total supply is 2e18, the exchange rate be multiplied by 1.5 | |
// if the fee is 0.5 ETH, and the total supply is 4, the exchange rate should be multiplied by 1.125 | |
// it should always go up, never down | |
// newExchangeRate = oldExchangeRate * (totalSupply + fee) / totalSupply | |
// newExchangeRate = 1 (4 + 0.5) / 4 | |
// newExchangeRate = 1.125 | |
uint256 newExchangeRate = s_exchangeRate * (totalSupply() + fee) / totalSupply(); | |
if (newExchangeRate <= s_exchangeRate) { | |
revert AssetToken__ExhangeRateCanOnlyIncrease(s_exchangeRate, newExchangeRate); | |
} | |
s_exchangeRate = newExchangeRate; | |
emit ExchangeRateUpdated(s_exchangeRate); | |
} | |
function getExchangeRate() external view returns (uint256) { | |
return s_exchangeRate; | |
} | |
function getUnderlying() external view returns (IERC20) { | |
return i_underlying; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.6.2 <0.9.0; | |
import {StdStorage} from "./StdStorage.sol"; | |
import {Vm, VmSafe} from "./Vm.sol"; | |
abstract contract CommonBase { | |
// Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D. | |
address internal constant VM_ADDRESS = address(uint160(uint256(keccak256("hevm cheat code")))); | |
// console.sol and console2.sol work by executing a staticcall to this address. | |
address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67; | |
// Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy. | |
address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C; | |
// Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38. | |
address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256("foundry default caller")))); | |
// Address of the test contract, deployed by the DEFAULT_SENDER. | |
address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f; | |
// Deterministic deployment address of the Multicall3 contract. | |
address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11; | |
// The order of the secp256k1 curve. | |
uint256 internal constant SECP256K1_ORDER = | |
115792089237316195423570985008687907852837564279074904382605163141518161494337; | |
uint256 internal constant UINT256_MAX = | |
115792089237316195423570985008687907853269984665640564039457584007913129639935; | |
Vm internal constant vm = Vm(VM_ADDRESS); | |
StdStorage internal stdstore; | |
} | |
abstract contract TestBase is CommonBase {} | |
abstract contract ScriptBase is CommonBase { | |
VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.4.22 <0.9.0; | |
library console { | |
address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67); | |
function _sendLogPayload(bytes memory payload) private view { | |
uint256 payloadLength = payload.length; | |
address consoleAddress = CONSOLE_ADDRESS; | |
/// @solidity memory-safe-assembly | |
assembly { | |
let payloadStart := add(payload, 32) | |
let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) | |
} | |
} | |
function log() internal view { | |
_sendLogPayload(abi.encodeWithSignature("log()")); | |
} | |
function logInt(int p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(int)", p0)); | |
} | |
function logUint(uint p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); | |
} | |
function logString(string memory p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string)", p0)); | |
} | |
function logBool(bool p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); | |
} | |
function logAddress(address p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address)", p0)); | |
} | |
function logBytes(bytes memory p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); | |
} | |
function logBytes1(bytes1 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); | |
} | |
function logBytes2(bytes2 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); | |
} | |
function logBytes3(bytes3 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); | |
} | |
function logBytes4(bytes4 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); | |
} | |
function logBytes5(bytes5 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); | |
} | |
function logBytes6(bytes6 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); | |
} | |
function logBytes7(bytes7 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); | |
} | |
function logBytes8(bytes8 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); | |
} | |
function logBytes9(bytes9 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); | |
} | |
function logBytes10(bytes10 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); | |
} | |
function logBytes11(bytes11 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); | |
} | |
function logBytes12(bytes12 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); | |
} | |
function logBytes13(bytes13 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); | |
} | |
function logBytes14(bytes14 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); | |
} | |
function logBytes15(bytes15 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); | |
} | |
function logBytes16(bytes16 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); | |
} | |
function logBytes17(bytes17 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); | |
} | |
function logBytes18(bytes18 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); | |
} | |
function logBytes19(bytes19 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); | |
} | |
function logBytes20(bytes20 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); | |
} | |
function logBytes21(bytes21 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); | |
} | |
function logBytes22(bytes22 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); | |
} | |
function logBytes23(bytes23 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); | |
} | |
function logBytes24(bytes24 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); | |
} | |
function logBytes25(bytes25 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); | |
} | |
function logBytes26(bytes26 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); | |
} | |
function logBytes27(bytes27 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); | |
} | |
function logBytes28(bytes28 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); | |
} | |
function logBytes29(bytes29 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); | |
} | |
function logBytes30(bytes30 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); | |
} | |
function logBytes31(bytes31 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); | |
} | |
function logBytes32(bytes32 p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); | |
} | |
function log(uint p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); | |
} | |
function log(string memory p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string)", p0)); | |
} | |
function log(bool p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); | |
} | |
function log(address p0) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address)", p0)); | |
} | |
function log(uint p0, uint p1) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint)", p0, p1)); | |
} | |
function log(uint p0, string memory p1) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string)", p0, p1)); | |
} | |
function log(uint p0, bool p1) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool)", p0, p1)); | |
} | |
function log(uint p0, address p1) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address)", p0, p1)); | |
} | |
function log(string memory p0, uint p1) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint)", p0, p1)); | |
} | |
function log(string memory p0, string memory p1) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); | |
} | |
function log(string memory p0, bool p1) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); | |
} | |
function log(string memory p0, address p1) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); | |
} | |
function log(bool p0, uint p1) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint)", p0, p1)); | |
} | |
function log(bool p0, string memory p1) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); | |
} | |
function log(bool p0, bool p1) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); | |
} | |
function log(bool p0, address p1) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); | |
} | |
function log(address p0, uint p1) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint)", p0, p1)); | |
} | |
function log(address p0, string memory p1) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); | |
} | |
function log(address p0, bool p1) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); | |
} | |
function log(address p0, address p1) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); | |
} | |
function log(uint p0, uint p1, uint p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint)", p0, p1, p2)); | |
} | |
function log(uint p0, uint p1, string memory p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string)", p0, p1, p2)); | |
} | |
function log(uint p0, uint p1, bool p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool)", p0, p1, p2)); | |
} | |
function log(uint p0, uint p1, address p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address)", p0, p1, p2)); | |
} | |
function log(uint p0, string memory p1, uint p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint)", p0, p1, p2)); | |
} | |
function log(uint p0, string memory p1, string memory p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string)", p0, p1, p2)); | |
} | |
function log(uint p0, string memory p1, bool p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool)", p0, p1, p2)); | |
} | |
function log(uint p0, string memory p1, address p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address)", p0, p1, p2)); | |
} | |
function log(uint p0, bool p1, uint p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint)", p0, p1, p2)); | |
} | |
function log(uint p0, bool p1, string memory p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string)", p0, p1, p2)); | |
} | |
function log(uint p0, bool p1, bool p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool)", p0, p1, p2)); | |
} | |
function log(uint p0, bool p1, address p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address)", p0, p1, p2)); | |
} | |
function log(uint p0, address p1, uint p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint)", p0, p1, p2)); | |
} | |
function log(uint p0, address p1, string memory p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string)", p0, p1, p2)); | |
} | |
function log(uint p0, address p1, bool p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool)", p0, p1, p2)); | |
} | |
function log(uint p0, address p1, address p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address)", p0, p1, p2)); | |
} | |
function log(string memory p0, uint p1, uint p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint)", p0, p1, p2)); | |
} | |
function log(string memory p0, uint p1, string memory p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string)", p0, p1, p2)); | |
} | |
function log(string memory p0, uint p1, bool p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool)", p0, p1, p2)); | |
} | |
function log(string memory p0, uint p1, address p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address)", p0, p1, p2)); | |
} | |
function log(string memory p0, string memory p1, uint p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint)", p0, p1, p2)); | |
} | |
function log(string memory p0, string memory p1, string memory p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); | |
} | |
function log(string memory p0, string memory p1, bool p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); | |
} | |
function log(string memory p0, string memory p1, address p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); | |
} | |
function log(string memory p0, bool p1, uint p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint)", p0, p1, p2)); | |
} | |
function log(string memory p0, bool p1, string memory p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); | |
} | |
function log(string memory p0, bool p1, bool p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); | |
} | |
function log(string memory p0, bool p1, address p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); | |
} | |
function log(string memory p0, address p1, uint p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint)", p0, p1, p2)); | |
} | |
function log(string memory p0, address p1, string memory p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); | |
} | |
function log(string memory p0, address p1, bool p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); | |
} | |
function log(string memory p0, address p1, address p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); | |
} | |
function log(bool p0, uint p1, uint p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint)", p0, p1, p2)); | |
} | |
function log(bool p0, uint p1, string memory p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string)", p0, p1, p2)); | |
} | |
function log(bool p0, uint p1, bool p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool)", p0, p1, p2)); | |
} | |
function log(bool p0, uint p1, address p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address)", p0, p1, p2)); | |
} | |
function log(bool p0, string memory p1, uint p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint)", p0, p1, p2)); | |
} | |
function log(bool p0, string memory p1, string memory p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); | |
} | |
function log(bool p0, string memory p1, bool p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); | |
} | |
function log(bool p0, string memory p1, address p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); | |
} | |
function log(bool p0, bool p1, uint p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint)", p0, p1, p2)); | |
} | |
function log(bool p0, bool p1, string memory p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); | |
} | |
function log(bool p0, bool p1, bool p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); | |
} | |
function log(bool p0, bool p1, address p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); | |
} | |
function log(bool p0, address p1, uint p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint)", p0, p1, p2)); | |
} | |
function log(bool p0, address p1, string memory p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); | |
} | |
function log(bool p0, address p1, bool p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); | |
} | |
function log(bool p0, address p1, address p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); | |
} | |
function log(address p0, uint p1, uint p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint)", p0, p1, p2)); | |
} | |
function log(address p0, uint p1, string memory p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string)", p0, p1, p2)); | |
} | |
function log(address p0, uint p1, bool p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool)", p0, p1, p2)); | |
} | |
function log(address p0, uint p1, address p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address)", p0, p1, p2)); | |
} | |
function log(address p0, string memory p1, uint p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint)", p0, p1, p2)); | |
} | |
function log(address p0, string memory p1, string memory p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); | |
} | |
function log(address p0, string memory p1, bool p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); | |
} | |
function log(address p0, string memory p1, address p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); | |
} | |
function log(address p0, bool p1, uint p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint)", p0, p1, p2)); | |
} | |
function log(address p0, bool p1, string memory p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); | |
} | |
function log(address p0, bool p1, bool p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); | |
} | |
function log(address p0, bool p1, address p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); | |
} | |
function log(address p0, address p1, uint p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint)", p0, p1, p2)); | |
} | |
function log(address p0, address p1, string memory p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); | |
} | |
function log(address p0, address p1, bool p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); | |
} | |
function log(address p0, address p1, address p2) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); | |
} | |
function log(uint p0, uint p1, uint p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,uint)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, uint p1, uint p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,string)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, uint p1, uint p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, uint p1, uint p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,address)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, uint p1, string memory p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,uint)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, uint p1, string memory p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,string)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, uint p1, string memory p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, uint p1, string memory p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,address)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, uint p1, bool p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,uint)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, uint p1, bool p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, uint p1, bool p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, uint p1, bool p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, uint p1, address p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,uint)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, uint p1, address p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,string)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, uint p1, address p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, uint p1, address p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,address)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, string memory p1, uint p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,uint)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, string memory p1, uint p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,string)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, string memory p1, uint p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, string memory p1, uint p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,address)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, string memory p1, string memory p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,uint)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, string memory p1, string memory p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,string)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, string memory p1, string memory p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, string memory p1, string memory p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,address)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, string memory p1, bool p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,uint)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, string memory p1, bool p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, string memory p1, bool p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, string memory p1, bool p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, string memory p1, address p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,uint)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, string memory p1, address p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,string)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, string memory p1, address p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, string memory p1, address p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,address)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, bool p1, uint p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,uint)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, bool p1, uint p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,string)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, bool p1, uint p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, bool p1, uint p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,address)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, bool p1, string memory p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,uint)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, bool p1, string memory p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,string)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, bool p1, string memory p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, bool p1, string memory p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,address)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, bool p1, bool p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,uint)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, bool p1, bool p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, bool p1, bool p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, bool p1, bool p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, bool p1, address p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,uint)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, bool p1, address p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,string)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, bool p1, address p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, bool p1, address p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,address)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, address p1, uint p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,uint)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, address p1, uint p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,string)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, address p1, uint p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, address p1, uint p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,address)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, address p1, string memory p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,uint)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, address p1, string memory p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,string)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, address p1, string memory p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, address p1, string memory p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,address)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, address p1, bool p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,uint)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, address p1, bool p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, address p1, bool p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, address p1, bool p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, address p1, address p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,uint)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, address p1, address p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,string)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, address p1, address p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint p0, address p1, address p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint p1, uint p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,uint)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint p1, uint p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint p1, uint p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint p1, uint p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint p1, string memory p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,uint)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint p1, string memory p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint p1, string memory p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint p1, string memory p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint p1, bool p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,uint)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint p1, bool p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint p1, bool p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint p1, bool p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint p1, address p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,uint)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint p1, address p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint p1, address p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint p1, address p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, uint p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,uint)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, uint p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, uint p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, uint p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, string memory p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, string memory p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, string memory p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, bool p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, bool p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, bool p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, bool p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, address p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, address p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, address p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, address p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, uint p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,uint)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, uint p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, uint p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, uint p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, string memory p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, string memory p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, string memory p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, string memory p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, bool p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, bool p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, bool p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, bool p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, address p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, address p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, address p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, address p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, uint p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,uint)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, uint p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, uint p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, uint p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, string memory p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, string memory p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, string memory p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, string memory p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, bool p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, bool p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, bool p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, bool p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, address p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, address p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, address p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, address p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint p1, uint p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,uint)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint p1, uint p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint p1, uint p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint p1, uint p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint p1, string memory p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,uint)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint p1, string memory p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint p1, string memory p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint p1, string memory p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint p1, bool p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,uint)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint p1, bool p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint p1, bool p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint p1, bool p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint p1, address p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,uint)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint p1, address p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint p1, address p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint p1, address p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, uint p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,uint)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, uint p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, uint p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, uint p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, string memory p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, string memory p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, string memory p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, string memory p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, bool p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, bool p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, bool p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, bool p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, address p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, address p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, address p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, address p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, uint p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,uint)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, uint p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, uint p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, uint p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, string memory p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, string memory p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, string memory p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, string memory p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, bool p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, bool p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, bool p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, bool p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, address p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, address p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, address p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, address p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, uint p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,uint)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, uint p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, uint p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, uint p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, string memory p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, string memory p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, string memory p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, string memory p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, bool p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, bool p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, bool p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, bool p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, address p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, address p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, address p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, address p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint p1, uint p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,uint)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint p1, uint p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint p1, uint p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint p1, uint p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint p1, string memory p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,uint)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint p1, string memory p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint p1, string memory p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint p1, string memory p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint p1, bool p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,uint)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint p1, bool p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint p1, bool p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint p1, bool p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint p1, address p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,uint)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint p1, address p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint p1, address p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint p1, address p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, uint p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,uint)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, uint p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, uint p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, uint p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, string memory p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, string memory p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, string memory p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, string memory p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, bool p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, bool p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, bool p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, bool p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, address p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, address p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, address p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, address p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, uint p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,uint)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, uint p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, uint p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, uint p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, string memory p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, string memory p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, string memory p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, string memory p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, bool p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, bool p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, bool p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, bool p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, address p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, address p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, address p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, address p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, uint p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,uint)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, uint p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, uint p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, uint p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, string memory p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, string memory p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, string memory p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, string memory p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, bool p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, bool p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, bool p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, bool p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, address p2, uint p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, address p2, string memory p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, address p2, bool p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, address p2, address p3) internal view { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.4.22 <0.9.0; | |
/// @dev The original console.sol uses `int` and `uint` for computing function selectors, but it should | |
/// use `int256` and `uint256`. This modified version fixes that. This version is recommended | |
/// over `console.sol` if you don't need compatibility with Hardhat as the logs will show up in | |
/// forge stack traces. If you do need compatibility with Hardhat, you must use `console.sol`. | |
/// Reference: https://github.com/NomicFoundation/hardhat/issues/2178 | |
library console2 { | |
address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67); | |
function _castLogPayloadViewToPure( | |
function(bytes memory) internal view fnIn | |
) internal pure returns (function(bytes memory) internal pure fnOut) { | |
assembly { | |
fnOut := fnIn | |
} | |
} | |
function _sendLogPayload(bytes memory payload) internal pure { | |
_castLogPayloadViewToPure(_sendLogPayloadView)(payload); | |
} | |
function _sendLogPayloadView(bytes memory payload) private view { | |
uint256 payloadLength = payload.length; | |
address consoleAddress = CONSOLE_ADDRESS; | |
/// @solidity memory-safe-assembly | |
assembly { | |
let payloadStart := add(payload, 32) | |
let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) | |
} | |
} | |
function log() internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log()")); | |
} | |
function logInt(int256 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(int256)", p0)); | |
} | |
function logUint(uint256 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); | |
} | |
function logString(string memory p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string)", p0)); | |
} | |
function logBool(bool p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); | |
} | |
function logAddress(address p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address)", p0)); | |
} | |
function logBytes(bytes memory p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); | |
} | |
function logBytes1(bytes1 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); | |
} | |
function logBytes2(bytes2 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); | |
} | |
function logBytes3(bytes3 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); | |
} | |
function logBytes4(bytes4 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); | |
} | |
function logBytes5(bytes5 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); | |
} | |
function logBytes6(bytes6 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); | |
} | |
function logBytes7(bytes7 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); | |
} | |
function logBytes8(bytes8 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); | |
} | |
function logBytes9(bytes9 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); | |
} | |
function logBytes10(bytes10 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); | |
} | |
function logBytes11(bytes11 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); | |
} | |
function logBytes12(bytes12 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); | |
} | |
function logBytes13(bytes13 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); | |
} | |
function logBytes14(bytes14 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); | |
} | |
function logBytes15(bytes15 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); | |
} | |
function logBytes16(bytes16 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); | |
} | |
function logBytes17(bytes17 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); | |
} | |
function logBytes18(bytes18 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); | |
} | |
function logBytes19(bytes19 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); | |
} | |
function logBytes20(bytes20 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); | |
} | |
function logBytes21(bytes21 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); | |
} | |
function logBytes22(bytes22 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); | |
} | |
function logBytes23(bytes23 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); | |
} | |
function logBytes24(bytes24 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); | |
} | |
function logBytes25(bytes25 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); | |
} | |
function logBytes26(bytes26 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); | |
} | |
function logBytes27(bytes27 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); | |
} | |
function logBytes28(bytes28 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); | |
} | |
function logBytes29(bytes29 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); | |
} | |
function logBytes30(bytes30 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); | |
} | |
function logBytes31(bytes31 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); | |
} | |
function logBytes32(bytes32 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); | |
} | |
function log(uint256 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); | |
} | |
function log(int256 p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(int256)", p0)); | |
} | |
function log(string memory p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string)", p0)); | |
} | |
function log(bool p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); | |
} | |
function log(address p0) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address)", p0)); | |
} | |
function log(uint256 p0, uint256 p1) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256)", p0, p1)); | |
} | |
function log(uint256 p0, string memory p1) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string)", p0, p1)); | |
} | |
function log(uint256 p0, bool p1) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool)", p0, p1)); | |
} | |
function log(uint256 p0, address p1) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address)", p0, p1)); | |
} | |
function log(string memory p0, uint256 p1) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1)); | |
} | |
function log(string memory p0, int256 p1) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,int256)", p0, p1)); | |
} | |
function log(string memory p0, string memory p1) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); | |
} | |
function log(string memory p0, bool p1) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); | |
} | |
function log(string memory p0, address p1) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); | |
} | |
function log(bool p0, uint256 p1) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256)", p0, p1)); | |
} | |
function log(bool p0, string memory p1) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); | |
} | |
function log(bool p0, bool p1) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); | |
} | |
function log(bool p0, address p1) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); | |
} | |
function log(address p0, uint256 p1) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256)", p0, p1)); | |
} | |
function log(address p0, string memory p1) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); | |
} | |
function log(address p0, bool p1) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); | |
} | |
function log(address p0, address p1) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); | |
} | |
function log(uint256 p0, uint256 p1, uint256 p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256)", p0, p1, p2)); | |
} | |
function log(uint256 p0, uint256 p1, string memory p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string)", p0, p1, p2)); | |
} | |
function log(uint256 p0, uint256 p1, bool p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool)", p0, p1, p2)); | |
} | |
function log(uint256 p0, uint256 p1, address p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address)", p0, p1, p2)); | |
} | |
function log(uint256 p0, string memory p1, uint256 p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256)", p0, p1, p2)); | |
} | |
function log(uint256 p0, string memory p1, string memory p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string)", p0, p1, p2)); | |
} | |
function log(uint256 p0, string memory p1, bool p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool)", p0, p1, p2)); | |
} | |
function log(uint256 p0, string memory p1, address p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address)", p0, p1, p2)); | |
} | |
function log(uint256 p0, bool p1, uint256 p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256)", p0, p1, p2)); | |
} | |
function log(uint256 p0, bool p1, string memory p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string)", p0, p1, p2)); | |
} | |
function log(uint256 p0, bool p1, bool p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool)", p0, p1, p2)); | |
} | |
function log(uint256 p0, bool p1, address p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address)", p0, p1, p2)); | |
} | |
function log(uint256 p0, address p1, uint256 p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256)", p0, p1, p2)); | |
} | |
function log(uint256 p0, address p1, string memory p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string)", p0, p1, p2)); | |
} | |
function log(uint256 p0, address p1, bool p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool)", p0, p1, p2)); | |
} | |
function log(uint256 p0, address p1, address p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address)", p0, p1, p2)); | |
} | |
function log(string memory p0, uint256 p1, uint256 p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256)", p0, p1, p2)); | |
} | |
function log(string memory p0, uint256 p1, string memory p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string)", p0, p1, p2)); | |
} | |
function log(string memory p0, uint256 p1, bool p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool)", p0, p1, p2)); | |
} | |
function log(string memory p0, uint256 p1, address p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address)", p0, p1, p2)); | |
} | |
function log(string memory p0, string memory p1, uint256 p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256)", p0, p1, p2)); | |
} | |
function log(string memory p0, string memory p1, string memory p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); | |
} | |
function log(string memory p0, string memory p1, bool p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); | |
} | |
function log(string memory p0, string memory p1, address p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); | |
} | |
function log(string memory p0, bool p1, uint256 p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256)", p0, p1, p2)); | |
} | |
function log(string memory p0, bool p1, string memory p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); | |
} | |
function log(string memory p0, bool p1, bool p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); | |
} | |
function log(string memory p0, bool p1, address p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); | |
} | |
function log(string memory p0, address p1, uint256 p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256)", p0, p1, p2)); | |
} | |
function log(string memory p0, address p1, string memory p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); | |
} | |
function log(string memory p0, address p1, bool p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); | |
} | |
function log(string memory p0, address p1, address p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); | |
} | |
function log(bool p0, uint256 p1, uint256 p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256)", p0, p1, p2)); | |
} | |
function log(bool p0, uint256 p1, string memory p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string)", p0, p1, p2)); | |
} | |
function log(bool p0, uint256 p1, bool p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool)", p0, p1, p2)); | |
} | |
function log(bool p0, uint256 p1, address p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address)", p0, p1, p2)); | |
} | |
function log(bool p0, string memory p1, uint256 p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256)", p0, p1, p2)); | |
} | |
function log(bool p0, string memory p1, string memory p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); | |
} | |
function log(bool p0, string memory p1, bool p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); | |
} | |
function log(bool p0, string memory p1, address p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); | |
} | |
function log(bool p0, bool p1, uint256 p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256)", p0, p1, p2)); | |
} | |
function log(bool p0, bool p1, string memory p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); | |
} | |
function log(bool p0, bool p1, bool p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); | |
} | |
function log(bool p0, bool p1, address p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); | |
} | |
function log(bool p0, address p1, uint256 p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256)", p0, p1, p2)); | |
} | |
function log(bool p0, address p1, string memory p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); | |
} | |
function log(bool p0, address p1, bool p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); | |
} | |
function log(bool p0, address p1, address p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); | |
} | |
function log(address p0, uint256 p1, uint256 p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256)", p0, p1, p2)); | |
} | |
function log(address p0, uint256 p1, string memory p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string)", p0, p1, p2)); | |
} | |
function log(address p0, uint256 p1, bool p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool)", p0, p1, p2)); | |
} | |
function log(address p0, uint256 p1, address p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address)", p0, p1, p2)); | |
} | |
function log(address p0, string memory p1, uint256 p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256)", p0, p1, p2)); | |
} | |
function log(address p0, string memory p1, string memory p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); | |
} | |
function log(address p0, string memory p1, bool p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); | |
} | |
function log(address p0, string memory p1, address p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); | |
} | |
function log(address p0, bool p1, uint256 p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256)", p0, p1, p2)); | |
} | |
function log(address p0, bool p1, string memory p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); | |
} | |
function log(address p0, bool p1, bool p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); | |
} | |
function log(address p0, bool p1, address p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); | |
} | |
function log(address p0, address p1, uint256 p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256)", p0, p1, p2)); | |
} | |
function log(address p0, address p1, string memory p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); | |
} | |
function log(address p0, address p1, bool p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); | |
} | |
function log(address p0, address p1, address p2) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); | |
} | |
function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,uint256)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,string)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,address)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,uint256)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,string)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,address)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,uint256)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,uint256)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,string)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, uint256 p1, address p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,address)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,uint256)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,string)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,address)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,uint256)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,string)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,address)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,uint256)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, string memory p1, bool p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,uint256)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,string)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, string memory p1, address p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, string memory p1, address p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,address)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,uint256)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,string)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,address)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,uint256)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,string)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, bool p1, string memory p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,address)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,uint256)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, bool p1, bool p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, bool p1, bool p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,uint256)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, bool p1, address p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,string)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, bool p1, address p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, bool p1, address p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,address)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,uint256)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,string)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, address p1, uint256 p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,address)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,uint256)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,string)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, address p1, string memory p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, address p1, string memory p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,address)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,uint256)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, address p1, bool p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, address p1, bool p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, address p1, bool p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, address p1, address p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,uint256)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, address p1, address p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,string)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, address p1, address p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(uint256 p0, address p1, address p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,uint256)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,uint256)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,uint256)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint256 p1, bool p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,uint256)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint256 p1, address p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, uint256 p1, address p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,uint256)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint256)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, string memory p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint256)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, bool p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, bool p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint256)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, address p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, address p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, string memory p1, address p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,uint256)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, uint256 p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint256)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, string memory p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, string memory p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint256)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, bool p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, bool p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, bool p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, address p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint256)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, address p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, address p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, bool p1, address p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,uint256)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, uint256 p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, uint256 p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint256)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, string memory p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, string memory p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, string memory p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, bool p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint256)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, bool p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, bool p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, bool p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, address p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint256)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, address p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, address p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(string memory p0, address p1, address p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,uint256)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,uint256)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint256 p1, string memory p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,uint256)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint256 p1, bool p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint256 p1, bool p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,uint256)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint256 p1, address p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint256 p1, address p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, uint256 p1, address p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,uint256)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, uint256 p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint256)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, string memory p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, string memory p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint256)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, bool p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, bool p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, bool p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, address p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint256)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, address p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, address p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, string memory p1, address p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,uint256)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, uint256 p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, uint256 p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint256)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, string memory p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, string memory p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, string memory p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, bool p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint256)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, bool p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, bool p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, bool p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, address p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint256)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, address p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, address p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, bool p1, address p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,uint256)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, uint256 p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, uint256 p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, uint256 p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, string memory p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint256)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, string memory p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, string memory p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, string memory p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, bool p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint256)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, bool p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, bool p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, bool p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, address p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint256)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, address p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, address p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(bool p0, address p1, address p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,uint256)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint256 p1, uint256 p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,uint256)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint256 p1, string memory p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint256 p1, string memory p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,uint256)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint256 p1, bool p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint256 p1, bool p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint256 p1, bool p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint256 p1, address p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,uint256)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint256 p1, address p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint256 p1, address p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, uint256 p1, address p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,uint256)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, uint256 p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, uint256 p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint256)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, string memory p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, string memory p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, string memory p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, bool p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint256)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, bool p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, bool p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, bool p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, address p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint256)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, address p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, address p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, string memory p1, address p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,uint256)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, uint256 p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, uint256 p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, uint256 p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, string memory p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint256)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, string memory p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, string memory p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, string memory p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, bool p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint256)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, bool p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, bool p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, bool p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, address p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint256)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, address p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, address p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, bool p1, address p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, uint256 p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,uint256)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, uint256 p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, uint256 p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, uint256 p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, string memory p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint256)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, string memory p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, string memory p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, string memory p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, bool p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint256)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, bool p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, bool p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, bool p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, address p2, uint256 p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint256)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, address p2, string memory p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, address p2, bool p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); | |
} | |
function log(address p0, address p1, address p2, address p3) internal pure { | |
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) | |
pragma solidity ^0.8.20; | |
/** | |
* @dev Provides information about the current execution context, including the | |
* sender of the transaction and its data. While these are generally available | |
* via msg.sender and msg.data, they should not be accessed in such a direct | |
* manner, since when dealing with meta-transactions the account sending and | |
* paying for execution may not be the actual sender (as far as an application | |
* is concerned). | |
* | |
* This contract is only required for intermediate, library-like contracts. | |
*/ | |
abstract contract Context { | |
function _msgSender() internal view virtual returns (address) { | |
return msg.sender; | |
} | |
function _msgData() internal view virtual returns (bytes calldata) { | |
return msg.data; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) | |
pragma solidity ^0.8.20; | |
import {Initializable} from "./Initializable.sol"; | |
/** | |
* @dev Provides information about the current execution context, including the | |
* sender of the transaction and its data. While these are generally available | |
* via msg.sender and msg.data, they should not be accessed in such a direct | |
* manner, since when dealing with meta-transactions the account sending and | |
* paying for execution may not be the actual sender (as far as an application | |
* is concerned). | |
* | |
* This contract is only required for intermediate, library-like contracts. | |
*/ | |
abstract contract ContextUpgradeable is Initializable { | |
function __Context_init() internal onlyInitializing { | |
} | |
function __Context_init_unchained() internal onlyInitializing { | |
} | |
function _msgSender() internal view virtual returns (address) { | |
return msg.sender; | |
} | |
function _msgData() internal view virtual returns (bytes calldata) { | |
return msg.data; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.20; | |
import { Script } from "./Script.sol"; | |
import { ThunderLoan } from "./ThunderLoan.sol"; | |
import { ERC1967Proxy } from "./ERC1967Proxy.sol"; | |
contract DeployThunderLoan is Script { | |
function run() public { | |
vm.startBroadcast(); | |
ThunderLoan thunderLoan = new ThunderLoan(); | |
new ERC1967Proxy(address(thunderLoan), ""); | |
vm.stopBroadcast(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC1822.sol) | |
pragma solidity ^0.8.20; | |
/** | |
* @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified | |
* proxy whose upgrades are fully controlled by the current implementation. | |
*/ | |
interface IERC1822Proxiable { | |
/** | |
* @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation | |
* address. | |
* | |
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks | |
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this | |
* function revert if invoked through a proxy. | |
*/ | |
function proxiableUUID() external view returns (bytes32); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) | |
pragma solidity ^0.8.20; | |
/** | |
* @dev Standard ERC20 Errors | |
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. | |
*/ | |
interface IERC20Errors { | |
/** | |
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. | |
* @param sender Address whose tokens are being transferred. | |
* @param balance Current balance for the interacting account. | |
* @param needed Minimum amount required to perform a transfer. | |
*/ | |
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); | |
/** | |
* @dev Indicates a failure with the token `sender`. Used in transfers. | |
* @param sender Address whose tokens are being transferred. | |
*/ | |
error ERC20InvalidSender(address sender); | |
/** | |
* @dev Indicates a failure with the token `receiver`. Used in transfers. | |
* @param receiver Address to which tokens are being transferred. | |
*/ | |
error ERC20InvalidReceiver(address receiver); | |
/** | |
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. | |
* @param spender Address that may be allowed to operate on tokens without being their owner. | |
* @param allowance Amount of tokens a `spender` is allowed to operate with. | |
* @param needed Minimum amount required to perform a transfer. | |
*/ | |
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); | |
/** | |
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. | |
* @param approver Address initiating an approval operation. | |
*/ | |
error ERC20InvalidApprover(address approver); | |
/** | |
* @dev Indicates a failure with the `spender` to be approved. Used in approvals. | |
* @param spender Address that may be allowed to operate on tokens without being their owner. | |
*/ | |
error ERC20InvalidSpender(address spender); | |
} | |
/** | |
* @dev Standard ERC721 Errors | |
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. | |
*/ | |
interface IERC721Errors { | |
/** | |
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. | |
* Used in balance queries. | |
* @param owner Address of the current owner of a token. | |
*/ | |
error ERC721InvalidOwner(address owner); | |
/** | |
* @dev Indicates a `tokenId` whose `owner` is the zero address. | |
* @param tokenId Identifier number of a token. | |
*/ | |
error ERC721NonexistentToken(uint256 tokenId); | |
/** | |
* @dev Indicates an error related to the ownership over a particular token. Used in transfers. | |
* @param sender Address whose tokens are being transferred. | |
* @param tokenId Identifier number of a token. | |
* @param owner Address of the current owner of a token. | |
*/ | |
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); | |
/** | |
* @dev Indicates a failure with the token `sender`. Used in transfers. | |
* @param sender Address whose tokens are being transferred. | |
*/ | |
error ERC721InvalidSender(address sender); | |
/** | |
* @dev Indicates a failure with the token `receiver`. Used in transfers. | |
* @param receiver Address to which tokens are being transferred. | |
*/ | |
error ERC721InvalidReceiver(address receiver); | |
/** | |
* @dev Indicates a failure with the `operator`’s approval. Used in transfers. | |
* @param operator Address that may be allowed to operate on tokens without being their owner. | |
* @param tokenId Identifier number of a token. | |
*/ | |
error ERC721InsufficientApproval(address operator, uint256 tokenId); | |
/** | |
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. | |
* @param approver Address initiating an approval operation. | |
*/ | |
error ERC721InvalidApprover(address approver); | |
/** | |
* @dev Indicates a failure with the `operator` to be approved. Used in approvals. | |
* @param operator Address that may be allowed to operate on tokens without being their owner. | |
*/ | |
error ERC721InvalidOperator(address operator); | |
} | |
/** | |
* @dev Standard ERC1155 Errors | |
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. | |
*/ | |
interface IERC1155Errors { | |
/** | |
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. | |
* @param sender Address whose tokens are being transferred. | |
* @param balance Current balance for the interacting account. | |
* @param needed Minimum amount required to perform a transfer. | |
* @param tokenId Identifier number of a token. | |
*/ | |
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); | |
/** | |
* @dev Indicates a failure with the token `sender`. Used in transfers. | |
* @param sender Address whose tokens are being transferred. | |
*/ | |
error ERC1155InvalidSender(address sender); | |
/** | |
* @dev Indicates a failure with the token `receiver`. Used in transfers. | |
* @param receiver Address to which tokens are being transferred. | |
*/ | |
error ERC1155InvalidReceiver(address receiver); | |
/** | |
* @dev Indicates a failure with the `operator`’s approval. Used in transfers. | |
* @param operator Address that may be allowed to operate on tokens without being their owner. | |
* @param owner Address of the current owner of a token. | |
*/ | |
error ERC1155MissingApprovalForAll(address operator, address owner); | |
/** | |
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. | |
* @param approver Address initiating an approval operation. | |
*/ | |
error ERC1155InvalidApprover(address approver); | |
/** | |
* @dev Indicates a failure with the `operator` to be approved. Used in approvals. | |
* @param operator Address that may be allowed to operate on tokens without being their owner. | |
*/ | |
error ERC1155InvalidOperator(address operator); | |
/** | |
* @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. | |
* Used in batch transfers. | |
* @param idsLength Length of the array of token identifiers | |
* @param valuesLength Length of the array of token amounts | |
*/ | |
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Proxy.sol) | |
pragma solidity ^0.8.20; | |
import {Proxy} from "./Proxy.sol"; | |
import {ERC1967Utils} from "./ERC1967Utils.sol"; | |
/** | |
* @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an | |
* implementation address that can be changed. This address is stored in storage in the location specified by | |
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the | |
* implementation behind the proxy. | |
*/ | |
contract ERC1967Proxy is Proxy { | |
/** | |
* @dev Initializes the upgradeable proxy with an initial implementation specified by `implementation`. | |
* | |
* If `_data` is nonempty, it's used as data in a delegate call to `implementation`. This will typically be an | |
* encoded function call, and allows initializing the storage of the proxy like a Solidity constructor. | |
* | |
* Requirements: | |
* | |
* - If `data` is empty, `msg.value` must be zero. | |
*/ | |
constructor(address implementation, bytes memory _data) payable { | |
ERC1967Utils.upgradeToAndCall(implementation, _data); | |
} | |
/** | |
* @dev Returns the current implementation address. | |
* | |
* TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using | |
* the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. | |
* `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc` | |
*/ | |
function _implementation() internal view virtual override returns (address) { | |
return ERC1967Utils.getImplementation(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Utils.sol) | |
pragma solidity ^0.8.20; | |
import {IBeacon} from "./IBeacon.sol"; | |
import {Address} from "./Address.sol"; | |
import {StorageSlot} from "./StorageSlot.sol"; | |
/** | |
* @dev This abstract contract provides getters and event emitting update functions for | |
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. | |
*/ | |
library ERC1967Utils { | |
// We re-declare ERC-1967 events here because they can't be used directly from IERC1967. | |
// This will be fixed in Solidity 0.8.21. At that point we should remove these events. | |
/** | |
* @dev Emitted when the implementation is upgraded. | |
*/ | |
event Upgraded(address indexed implementation); | |
/** | |
* @dev Emitted when the admin account has changed. | |
*/ | |
event AdminChanged(address previousAdmin, address newAdmin); | |
/** | |
* @dev Emitted when the beacon is changed. | |
*/ | |
event BeaconUpgraded(address indexed beacon); | |
/** | |
* @dev Storage slot with the address of the current implementation. | |
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1. | |
*/ | |
// solhint-disable-next-line private-vars-leading-underscore | |
bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; | |
/** | |
* @dev The `implementation` of the proxy is invalid. | |
*/ | |
error ERC1967InvalidImplementation(address implementation); | |
/** | |
* @dev The `admin` of the proxy is invalid. | |
*/ | |
error ERC1967InvalidAdmin(address admin); | |
/** | |
* @dev The `beacon` of the proxy is invalid. | |
*/ | |
error ERC1967InvalidBeacon(address beacon); | |
/** | |
* @dev An upgrade function sees `msg.value > 0` that may be lost. | |
*/ | |
error ERC1967NonPayable(); | |
/** | |
* @dev Returns the current implementation address. | |
*/ | |
function getImplementation() internal view returns (address) { | |
return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value; | |
} | |
/** | |
* @dev Stores a new address in the EIP1967 implementation slot. | |
*/ | |
function _setImplementation(address newImplementation) private { | |
if (newImplementation.code.length == 0) { | |
revert ERC1967InvalidImplementation(newImplementation); | |
} | |
StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation; | |
} | |
/** | |
* @dev Performs implementation upgrade with additional setup call if data is nonempty. | |
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected | |
* to avoid stuck value in the contract. | |
* | |
* Emits an {IERC1967-Upgraded} event. | |
*/ | |
function upgradeToAndCall(address newImplementation, bytes memory data) internal { | |
_setImplementation(newImplementation); | |
emit Upgraded(newImplementation); | |
if (data.length > 0) { | |
Address.functionDelegateCall(newImplementation, data); | |
} else { | |
_checkNonPayable(); | |
} | |
} | |
/** | |
* @dev Storage slot with the admin of the contract. | |
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1. | |
*/ | |
// solhint-disable-next-line private-vars-leading-underscore | |
bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; | |
/** | |
* @dev Returns the current admin. | |
* | |
* TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using | |
* the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. | |
* `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` | |
*/ | |
function getAdmin() internal view returns (address) { | |
return StorageSlot.getAddressSlot(ADMIN_SLOT).value; | |
} | |
/** | |
* @dev Stores a new address in the EIP1967 admin slot. | |
*/ | |
function _setAdmin(address newAdmin) private { | |
if (newAdmin == address(0)) { | |
revert ERC1967InvalidAdmin(address(0)); | |
} | |
StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin; | |
} | |
/** | |
* @dev Changes the admin of the proxy. | |
* | |
* Emits an {IERC1967-AdminChanged} event. | |
*/ | |
function changeAdmin(address newAdmin) internal { | |
emit AdminChanged(getAdmin(), newAdmin); | |
_setAdmin(newAdmin); | |
} | |
/** | |
* @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. | |
* This is the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1. | |
*/ | |
// solhint-disable-next-line private-vars-leading-underscore | |
bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; | |
/** | |
* @dev Returns the current beacon. | |
*/ | |
function getBeacon() internal view returns (address) { | |
return StorageSlot.getAddressSlot(BEACON_SLOT).value; | |
} | |
/** | |
* @dev Stores a new beacon in the EIP1967 beacon slot. | |
*/ | |
function _setBeacon(address newBeacon) private { | |
if (newBeacon.code.length == 0) { | |
revert ERC1967InvalidBeacon(newBeacon); | |
} | |
StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon; | |
address beaconImplementation = IBeacon(newBeacon).implementation(); | |
if (beaconImplementation.code.length == 0) { | |
revert ERC1967InvalidImplementation(beaconImplementation); | |
} | |
} | |
/** | |
* @dev Change the beacon and trigger a setup call if data is nonempty. | |
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected | |
* to avoid stuck value in the contract. | |
* | |
* Emits an {IERC1967-BeaconUpgraded} event. | |
* | |
* CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since | |
* it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for | |
* efficiency. | |
*/ | |
function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal { | |
_setBeacon(newBeacon); | |
emit BeaconUpgraded(newBeacon); | |
if (data.length > 0) { | |
Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); | |
} else { | |
_checkNonPayable(); | |
} | |
} | |
/** | |
* @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract | |
* if an upgrade doesn't perform an initialization call. | |
*/ | |
function _checkNonPayable() private { | |
if (msg.value > 0) { | |
revert ERC1967NonPayable(); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) | |
pragma solidity ^0.8.20; | |
import {IERC20} from "./IERC20.sol"; | |
import {IERC20Metadata} from "./IERC20Metadata.sol"; | |
import {Context} from "./Context.sol"; | |
import {IERC20Errors} from "./draft-IERC6093.sol"; | |
/** | |
* @dev Implementation of the {IERC20} interface. | |
* | |
* This implementation is agnostic to the way tokens are created. This means | |
* that a supply mechanism has to be added in a derived contract using {_mint}. | |
* | |
* TIP: For a detailed writeup see our guide | |
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How | |
* to implement supply mechanisms]. | |
* | |
* The default value of {decimals} is 18. To change this, you should override | |
* this function so it returns a different value. | |
* | |
* We have followed general OpenZeppelin Contracts guidelines: functions revert | |
* instead returning `false` on failure. This behavior is nonetheless | |
* conventional and does not conflict with the expectations of ERC20 | |
* applications. | |
* | |
* Additionally, an {Approval} event is emitted on calls to {transferFrom}. | |
* This allows applications to reconstruct the allowance for all accounts just | |
* by listening to said events. Other implementations of the EIP may not emit | |
* these events, as it isn't required by the specification. | |
*/ | |
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { | |
mapping(address account => uint256) private _balances; | |
mapping(address account => mapping(address spender => uint256)) private _allowances; | |
uint256 private _totalSupply; | |
string private _name; | |
string private _symbol; | |
/** | |
* @dev Sets the values for {name} and {symbol}. | |
* | |
* All two of these values are immutable: they can only be set once during | |
* construction. | |
*/ | |
constructor(string memory name_, string memory symbol_) { | |
_name = name_; | |
_symbol = symbol_; | |
} | |
/** | |
* @dev Returns the name of the token. | |
*/ | |
function name() public view virtual returns (string memory) { | |
return _name; | |
} | |
/** | |
* @dev Returns the symbol of the token, usually a shorter version of the | |
* name. | |
*/ | |
function symbol() public view virtual returns (string memory) { | |
return _symbol; | |
} | |
/** | |
* @dev Returns the number of decimals used to get its user representation. | |
* For example, if `decimals` equals `2`, a balance of `505` tokens should | |
* be displayed to a user as `5.05` (`505 / 10 ** 2`). | |
* | |
* Tokens usually opt for a value of 18, imitating the relationship between | |
* Ether and Wei. This is the default value returned by this function, unless | |
* it's overridden. | |
* | |
* NOTE: This information is only used for _display_ purposes: it in | |
* no way affects any of the arithmetic of the contract, including | |
* {IERC20-balanceOf} and {IERC20-transfer}. | |
*/ | |
function decimals() public view virtual returns (uint8) { | |
return 18; | |
} | |
/** | |
* @dev See {IERC20-totalSupply}. | |
*/ | |
function totalSupply() public view virtual returns (uint256) { | |
return _totalSupply; | |
} | |
/** | |
* @dev See {IERC20-balanceOf}. | |
*/ | |
function balanceOf(address account) public view virtual returns (uint256) { | |
return _balances[account]; | |
} | |
/** | |
* @dev See {IERC20-transfer}. | |
* | |
* Requirements: | |
* | |
* - `to` cannot be the zero address. | |
* - the caller must have a balance of at least `value`. | |
*/ | |
function transfer(address to, uint256 value) public virtual returns (bool) { | |
address owner = _msgSender(); | |
_transfer(owner, to, value); | |
return true; | |
} | |
/** | |
* @dev See {IERC20-allowance}. | |
*/ | |
function allowance(address owner, address spender) public view virtual returns (uint256) { | |
return _allowances[owner][spender]; | |
} | |
/** | |
* @dev See {IERC20-approve}. | |
* | |
* NOTE: If `value` is the maximum `uint256`, the allowance is not updated on | |
* `transferFrom`. This is semantically equivalent to an infinite approval. | |
* | |
* Requirements: | |
* | |
* - `spender` cannot be the zero address. | |
*/ | |
function approve(address spender, uint256 value) public virtual returns (bool) { | |
address owner = _msgSender(); | |
_approve(owner, spender, value); | |
return true; | |
} | |
/** | |
* @dev See {IERC20-transferFrom}. | |
* | |
* Emits an {Approval} event indicating the updated allowance. This is not | |
* required by the EIP. See the note at the beginning of {ERC20}. | |
* | |
* NOTE: Does not update the allowance if the current allowance | |
* is the maximum `uint256`. | |
* | |
* Requirements: | |
* | |
* - `from` and `to` cannot be the zero address. | |
* - `from` must have a balance of at least `value`. | |
* - the caller must have allowance for ``from``'s tokens of at least | |
* `value`. | |
*/ | |
function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { | |
address spender = _msgSender(); | |
_spendAllowance(from, spender, value); | |
_transfer(from, to, value); | |
return true; | |
} | |
/** | |
* @dev Moves a `value` amount of tokens from `from` to `to`. | |
* | |
* This internal function is equivalent to {transfer}, and can be used to | |
* e.g. implement automatic token fees, slashing mechanisms, etc. | |
* | |
* Emits a {Transfer} event. | |
* | |
* NOTE: This function is not virtual, {_update} should be overridden instead. | |
*/ | |
function _transfer(address from, address to, uint256 value) internal { | |
if (from == address(0)) { | |
revert ERC20InvalidSender(address(0)); | |
} | |
if (to == address(0)) { | |
revert ERC20InvalidReceiver(address(0)); | |
} | |
_update(from, to, value); | |
} | |
/** | |
* @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` | |
* (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding | |
* this function. | |
* | |
* Emits a {Transfer} event. | |
*/ | |
function _update(address from, address to, uint256 value) internal virtual { | |
if (from == address(0)) { | |
// Overflow check required: The rest of the code assumes that totalSupply never overflows | |
_totalSupply += value; | |
} else { | |
uint256 fromBalance = _balances[from]; | |
if (fromBalance < value) { | |
revert ERC20InsufficientBalance(from, fromBalance, value); | |
} | |
unchecked { | |
// Overflow not possible: value <= fromBalance <= totalSupply. | |
_balances[from] = fromBalance - value; | |
} | |
} | |
if (to == address(0)) { | |
unchecked { | |
// Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. | |
_totalSupply -= value; | |
} | |
} else { | |
unchecked { | |
// Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. | |
_balances[to] += value; | |
} | |
} | |
emit Transfer(from, to, value); | |
} | |
/** | |
* @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). | |
* Relies on the `_update` mechanism | |
* | |
* Emits a {Transfer} event with `from` set to the zero address. | |
* | |
* NOTE: This function is not virtual, {_update} should be overridden instead. | |
*/ | |
function _mint(address account, uint256 value) internal { | |
if (account == address(0)) { | |
revert ERC20InvalidReceiver(address(0)); | |
} | |
_update(address(0), account, value); | |
} | |
/** | |
* @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. | |
* Relies on the `_update` mechanism. | |
* | |
* Emits a {Transfer} event with `to` set to the zero address. | |
* | |
* NOTE: This function is not virtual, {_update} should be overridden instead | |
*/ | |
function _burn(address account, uint256 value) internal { | |
if (account == address(0)) { | |
revert ERC20InvalidSender(address(0)); | |
} | |
_update(account, address(0), value); | |
} | |
/** | |
* @dev Sets `value` as the allowance of `spender` over the `owner` s tokens. | |
* | |
* This internal function is equivalent to `approve`, and can be used to | |
* e.g. set automatic allowances for certain subsystems, etc. | |
* | |
* Emits an {Approval} event. | |
* | |
* Requirements: | |
* | |
* - `owner` cannot be the zero address. | |
* - `spender` cannot be the zero address. | |
* | |
* Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. | |
*/ | |
function _approve(address owner, address spender, uint256 value) internal { | |
_approve(owner, spender, value, true); | |
} | |
/** | |
* @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. | |
* | |
* By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by | |
* `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any | |
* `Approval` event during `transferFrom` operations. | |
* | |
* Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to | |
* true using the following override: | |
* ``` | |
* function _approve(address owner, address spender, uint256 value, bool) internal virtual override { | |
* super._approve(owner, spender, value, true); | |
* } | |
* ``` | |
* | |
* Requirements are the same as {_approve}. | |
*/ | |
function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { | |
if (owner == address(0)) { | |
revert ERC20InvalidApprover(address(0)); | |
} | |
if (spender == address(0)) { | |
revert ERC20InvalidSpender(address(0)); | |
} | |
_allowances[owner][spender] = value; | |
if (emitEvent) { | |
emit Approval(owner, spender, value); | |
} | |
} | |
/** | |
* @dev Updates `owner` s allowance for `spender` based on spent `value`. | |
* | |
* Does not update the allowance value in case of infinite allowance. | |
* Revert if not enough allowance is available. | |
* | |
* Does not emit an {Approval} event. | |
*/ | |
function _spendAllowance(address owner, address spender, uint256 value) internal virtual { | |
uint256 currentAllowance = allowance(owner, spender); | |
if (currentAllowance != type(uint256).max) { | |
if (currentAllowance < value) { | |
revert ERC20InsufficientAllowance(spender, currentAllowance, value); | |
} | |
unchecked { | |
_approve(owner, spender, currentAllowance - value, false); | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol) | |
pragma solidity ^0.8.20; | |
/** | |
* @dev This is the interface that {BeaconProxy} expects of its beacon. | |
*/ | |
interface IBeacon { | |
/** | |
* @dev Must return an address that can be used as a delegate call target. | |
* | |
* {UpgradeableBeacon} will check that this address is a contract. | |
*/ | |
function implementation() external view returns (address); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) | |
pragma solidity ^0.8.20; | |
/** | |
* @dev Interface of the ERC20 standard as defined in the EIP. | |
*/ | |
interface IERC20 { | |
/** | |
* @dev Emitted when `value` tokens are moved from one account (`from`) to | |
* another (`to`). | |
* | |
* Note that `value` may be zero. | |
*/ | |
event Transfer(address indexed from, address indexed to, uint256 value); | |
/** | |
* @dev Emitted when the allowance of a `spender` for an `owner` is set by | |
* a call to {approve}. `value` is the new allowance. | |
*/ | |
event Approval(address indexed owner, address indexed spender, uint256 value); | |
/** | |
* @dev Returns the value of tokens in existence. | |
*/ | |
function totalSupply() external view returns (uint256); | |
/** | |
* @dev Returns the value of tokens owned by `account`. | |
*/ | |
function balanceOf(address account) external view returns (uint256); | |
/** | |
* @dev Moves a `value` amount of tokens from the caller's account to `to`. | |
* | |
* Returns a boolean value indicating whether the operation succeeded. | |
* | |
* Emits a {Transfer} event. | |
*/ | |
function transfer(address to, uint256 value) external returns (bool); | |
/** | |
* @dev Returns the remaining number of tokens that `spender` will be | |
* allowed to spend on behalf of `owner` through {transferFrom}. This is | |
* zero by default. | |
* | |
* This value changes when {approve} or {transferFrom} are called. | |
*/ | |
function allowance(address owner, address spender) external view returns (uint256); | |
/** | |
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the | |
* caller's tokens. | |
* | |
* Returns a boolean value indicating whether the operation succeeded. | |
* | |
* IMPORTANT: Beware that changing an allowance with this method brings the risk | |
* that someone may use both the old and the new allowance by unfortunate | |
* transaction ordering. One possible solution to mitigate this race | |
* condition is to first reduce the spender's allowance to 0 and set the | |
* desired value afterwards: | |
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 | |
* | |
* Emits an {Approval} event. | |
*/ | |
function approve(address spender, uint256 value) external returns (bool); | |
/** | |
* @dev Moves a `value` amount of tokens from `from` to `to` using the | |
* allowance mechanism. `value` is then deducted from the caller's | |
* allowance. | |
* | |
* Returns a boolean value indicating whether the operation succeeded. | |
* | |
* Emits a {Transfer} event. | |
*/ | |
function transferFrom(address from, address to, uint256 value) external returns (bool); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) | |
pragma solidity ^0.8.20; | |
import {IERC20} from "./IERC20.sol"; | |
/** | |
* @dev Interface for the optional metadata functions from the ERC20 standard. | |
*/ | |
interface IERC20Metadata is IERC20 { | |
/** | |
* @dev Returns the name of the token. | |
*/ | |
function name() external view returns (string memory); | |
/** | |
* @dev Returns the symbol of the token. | |
*/ | |
function symbol() external view returns (string memory); | |
/** | |
* @dev Returns the decimals places of the token. | |
*/ | |
function decimals() external view returns (uint8); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) | |
pragma solidity ^0.8.20; | |
/** | |
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in | |
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. | |
* | |
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by | |
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't | |
* need to send a transaction, and thus is not required to hold Ether at all. | |
* | |
* ==== Security Considerations | |
* | |
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature | |
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be | |
* considered as an intention to spend the allowance in any specific way. The second is that because permits have | |
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should | |
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be | |
* generally recommended is: | |
* | |
* ```solidity | |
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { | |
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} | |
* doThing(..., value); | |
* } | |
* | |
* function doThing(..., uint256 value) public { | |
* token.safeTransferFrom(msg.sender, address(this), value); | |
* ... | |
* } | |
* ``` | |
* | |
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of | |
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also | |
* {SafeERC20-safeTransferFrom}). | |
* | |
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so | |
* contracts should have entry points that don't rely on permit. | |
*/ | |
interface IERC20Permit { | |
/** | |
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, | |
* given ``owner``'s signed approval. | |
* | |
* IMPORTANT: The same issues {IERC20-approve} has related to transaction | |
* ordering also apply here. | |
* | |
* Emits an {Approval} event. | |
* | |
* Requirements: | |
* | |
* - `spender` cannot be the zero address. | |
* - `deadline` must be a timestamp in the future. | |
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` | |
* over the EIP712-formatted function arguments. | |
* - the signature must use ``owner``'s current nonce (see {nonces}). | |
* | |
* For more information on the signature format, see the | |
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP | |
* section]. | |
* | |
* CAUTION: See Security Considerations above. | |
*/ | |
function permit( | |
address owner, | |
address spender, | |
uint256 value, | |
uint256 deadline, | |
uint8 v, | |
bytes32 r, | |
bytes32 s | |
) external; | |
/** | |
* @dev Returns the current nonce for `owner`. This value must be | |
* included whenever a signature is generated for {permit}. | |
* | |
* Every successful call to {permit} increases ``owner``'s nonce by one. This | |
* prevents a signature from being used multiple times. | |
*/ | |
function nonces(address owner) external view returns (uint256); | |
/** | |
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. | |
*/ | |
// solhint-disable-next-line func-name-mixedcase | |
function DOMAIN_SEPARATOR() external view returns (bytes32); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: AGPL-3.0 | |
pragma solidity 0.8.20; | |
import { IThunderLoan } from "./IThunderLoan.sol"; | |
/** | |
* @dev Inspired by Aave: | |
* https://github.com/aave/aave-v3-core/blob/master/contracts/flashloan/interfaces/IFlashLoanReceiver.sol | |
*/ | |
interface IFlashLoanReceiver { | |
function executeOperation( | |
address token, | |
uint256 amount, | |
uint256 fee, | |
address initiator, | |
bytes calldata params | |
) | |
external | |
returns (bool); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.6.2 <0.9.0; | |
pragma experimental ABIEncoderV2; | |
interface IMulticall3 { | |
struct Call { | |
address target; | |
bytes callData; | |
} | |
struct Call3 { | |
address target; | |
bool allowFailure; | |
bytes callData; | |
} | |
struct Call3Value { | |
address target; | |
bool allowFailure; | |
uint256 value; | |
bytes callData; | |
} | |
struct Result { | |
bool success; | |
bytes returnData; | |
} | |
function aggregate(Call[] calldata calls) | |
external | |
payable | |
returns (uint256 blockNumber, bytes[] memory returnData); | |
function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData); | |
function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData); | |
function blockAndAggregate(Call[] calldata calls) | |
external | |
payable | |
returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData); | |
function getBasefee() external view returns (uint256 basefee); | |
function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash); | |
function getBlockNumber() external view returns (uint256 blockNumber); | |
function getChainId() external view returns (uint256 chainid); | |
function getCurrentBlockCoinbase() external view returns (address coinbase); | |
function getCurrentBlockDifficulty() external view returns (uint256 difficulty); | |
function getCurrentBlockGasLimit() external view returns (uint256 gaslimit); | |
function getCurrentBlockTimestamp() external view returns (uint256 timestamp); | |
function getEthBalance(address addr) external view returns (uint256 balance); | |
function getLastBlockHash() external view returns (bytes32 blockHash); | |
function tryAggregate(bool requireSuccess, Call[] calldata calls) | |
external | |
payable | |
returns (Result[] memory returnData); | |
function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls) | |
external | |
payable | |
returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) | |
pragma solidity ^0.8.20; | |
/** | |
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed | |
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an | |
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer | |
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. | |
* | |
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be | |
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in | |
* case an upgrade adds a module that needs to be initialized. | |
* | |
* For example: | |
* | |
* [.hljs-theme-light.nopadding] | |
* ```solidity | |
* contract MyToken is ERC20Upgradeable { | |
* function initialize() initializer public { | |
* __ERC20_init("MyToken", "MTK"); | |
* } | |
* } | |
* | |
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { | |
* function initializeV2() reinitializer(2) public { | |
* __ERC20Permit_init("MyToken"); | |
* } | |
* } | |
* ``` | |
* | |
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as | |
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. | |
* | |
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure | |
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. | |
* | |
* [CAUTION] | |
* ==== | |
* Avoid leaving a contract uninitialized. | |
* | |
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation | |
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke | |
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: | |
* | |
* [.hljs-theme-light.nopadding] | |
* ``` | |
* /// @custom:oz-upgrades-unsafe-allow constructor | |
* constructor() { | |
* _disableInitializers(); | |
* } | |
* ``` | |
* ==== | |
*/ | |
abstract contract Initializable { | |
/** | |
* @dev Storage of the initializable contract. | |
* | |
* It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions | |
* when using with upgradeable contracts. | |
* | |
* @custom:storage-location erc7201:openzeppelin.storage.Initializable | |
*/ | |
struct InitializableStorage { | |
/** | |
* @dev Indicates that the contract has been initialized. | |
*/ | |
uint64 _initialized; | |
/** | |
* @dev Indicates that the contract is in the process of being initialized. | |
*/ | |
bool _initializing; | |
} | |
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) | |
bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; | |
/** | |
* @dev The contract is already initialized. | |
*/ | |
error InvalidInitialization(); | |
/** | |
* @dev The contract is not initializing. | |
*/ | |
error NotInitializing(); | |
/** | |
* @dev Triggered when the contract has been initialized or reinitialized. | |
*/ | |
event Initialized(uint64 version); | |
/** | |
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, | |
* `onlyInitializing` functions can be used to initialize parent contracts. | |
* | |
* Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any | |
* number of times. This behavior in the constructor can be useful during testing and is not expected to be used in | |
* production. | |
* | |
* Emits an {Initialized} event. | |
*/ | |
modifier initializer() { | |
// solhint-disable-next-line var-name-mixedcase | |
InitializableStorage storage $ = _getInitializableStorage(); | |
// Cache values to avoid duplicated sloads | |
bool isTopLevelCall = !$._initializing; | |
uint64 initialized = $._initialized; | |
// Allowed calls: | |
// - initialSetup: the contract is not in the initializing state and no previous version was | |
// initialized | |
// - construction: the contract is initialized at version 1 (no reininitialization) and the | |
// current contract is just being deployed | |
bool initialSetup = initialized == 0 && isTopLevelCall; | |
bool construction = initialized == 1 && address(this).code.length == 0; | |
if (!initialSetup && !construction) { | |
revert InvalidInitialization(); | |
} | |
$._initialized = 1; | |
if (isTopLevelCall) { | |
$._initializing = true; | |
} | |
_; | |
if (isTopLevelCall) { | |
$._initializing = false; | |
emit Initialized(1); | |
} | |
} | |
/** | |
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the | |
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be | |
* used to initialize parent contracts. | |
* | |
* A reinitializer may be used after the original initialization step. This is essential to configure modules that | |
* are added through upgrades and that require initialization. | |
* | |
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` | |
* cannot be nested. If one is invoked in the context of another, execution will revert. | |
* | |
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in | |
* a contract, executing them in the right order is up to the developer or operator. | |
* | |
* WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. | |
* | |
* Emits an {Initialized} event. | |
*/ | |
modifier reinitializer(uint64 version) { | |
// solhint-disable-next-line var-name-mixedcase | |
InitializableStorage storage $ = _getInitializableStorage(); | |
if ($._initializing || $._initialized >= version) { | |
revert InvalidInitialization(); | |
} | |
$._initialized = version; | |
$._initializing = true; | |
_; | |
$._initializing = false; | |
emit Initialized(version); | |
} | |
/** | |
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the | |
* {initializer} and {reinitializer} modifiers, directly or indirectly. | |
*/ | |
modifier onlyInitializing() { | |
_checkInitializing(); | |
_; | |
} | |
/** | |
* @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. | |
*/ | |
function _checkInitializing() internal view virtual { | |
if (!_isInitializing()) { | |
revert NotInitializing(); | |
} | |
} | |
/** | |
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. | |
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized | |
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called | |
* through proxies. | |
* | |
* Emits an {Initialized} event the first time it is successfully executed. | |
*/ | |
function _disableInitializers() internal virtual { | |
// solhint-disable-next-line var-name-mixedcase | |
InitializableStorage storage $ = _getInitializableStorage(); | |
if ($._initializing) { | |
revert InvalidInitialization(); | |
} | |
if ($._initialized != type(uint64).max) { | |
$._initialized = type(uint64).max; | |
emit Initialized(type(uint64).max); | |
} | |
} | |
/** | |
* @dev Returns the highest version that has been initialized. See {reinitializer}. | |
*/ | |
function _getInitializedVersion() internal view returns (uint64) { | |
return _getInitializableStorage()._initialized; | |
} | |
/** | |
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. | |
*/ | |
function _isInitializing() internal view returns (bool) { | |
return _getInitializableStorage()._initializing; | |
} | |
/** | |
* @dev Returns a pointer to the storage namespace. | |
*/ | |
// solhint-disable-next-line var-name-mixedcase | |
function _getInitializableStorage() private pure returns (InitializableStorage storage $) { | |
assembly { | |
$.slot := INITIALIZABLE_STORAGE | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: AGPL-3.0-only | |
pragma solidity 0.8.20; | |
interface IPoolFactory { | |
function getPool(address tokenAddress) external view returns (address); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.20; | |
interface IThunderLoan { | |
function repay(address token, uint256 amount) external; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: AGPL-3.0-only | |
pragma solidity 0.8.20; | |
interface ITSwapPool { | |
function getPriceOfOnePoolTokenInWeth() external view returns (uint256); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: AGPL-3.0-only | |
pragma solidity 0.8.20; | |
import { ITSwapPool } from "./ITSwapPool.sol"; | |
import { IPoolFactory } from "./IPoolFactory.sol"; | |
import { Initializable } from "./Initializable.sol"; | |
contract OracleUpgradeable is Initializable { | |
address private s_poolFactory; | |
function __Oracle_init(address poolFactoryAddress) internal onlyInitializing { | |
__Oracle_init_unchained(poolFactoryAddress); | |
} | |
function __Oracle_init_unchained(address poolFactoryAddress) internal onlyInitializing { | |
s_poolFactory = poolFactoryAddress; | |
} | |
function getPriceInWeth(address token) public view returns (uint256) { | |
address swapPoolOfToken = IPoolFactory(s_poolFactory).getPool(token); | |
return ITSwapPool(swapPoolOfToken).getPriceOfOnePoolTokenInWeth(); | |
} | |
function getPrice(address token) external view returns (uint256) { | |
return getPriceInWeth(token); | |
} | |
function getPoolFactoryAddress() external view returns (address) { | |
return s_poolFactory; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) | |
pragma solidity ^0.8.20; | |
import {ContextUpgradeable} from "./ContextUpgradeable.sol"; | |
import {Initializable} from "./Initializable.sol"; | |
/** | |
* @dev Contract module which provides a basic access control mechanism, where | |
* there is an account (an owner) that can be granted exclusive access to | |
* specific functions. | |
* | |
* The initial owner is set to the address provided by the deployer. This can | |
* later be changed with {transferOwnership}. | |
* | |
* This module is used through inheritance. It will make available the modifier | |
* `onlyOwner`, which can be applied to your functions to restrict their use to | |
* the owner. | |
*/ | |
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { | |
/// @custom:storage-location erc7201:openzeppelin.storage.Ownable | |
struct OwnableStorage { | |
address _owner; | |
} | |
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff)) | |
bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300; | |
function _getOwnableStorage() private pure returns (OwnableStorage storage $) { | |
assembly { | |
$.slot := OwnableStorageLocation | |
} | |
} | |
/** | |
* @dev The caller account is not authorized to perform an operation. | |
*/ | |
error OwnableUnauthorizedAccount(address account); | |
/** | |
* @dev The owner is not a valid owner account. (eg. `address(0)`) | |
*/ | |
error OwnableInvalidOwner(address owner); | |
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); | |
/** | |
* @dev Initializes the contract setting the address provided by the deployer as the initial owner. | |
*/ | |
function __Ownable_init(address initialOwner) internal onlyInitializing { | |
__Ownable_init_unchained(initialOwner); | |
} | |
function __Ownable_init_unchained(address initialOwner) internal onlyInitializing { | |
if (initialOwner == address(0)) { | |
revert OwnableInvalidOwner(address(0)); | |
} | |
_transferOwnership(initialOwner); | |
} | |
/** | |
* @dev Throws if called by any account other than the owner. | |
*/ | |
modifier onlyOwner() { | |
_checkOwner(); | |
_; | |
} | |
/** | |
* @dev Returns the address of the current owner. | |
*/ | |
function owner() public view virtual returns (address) { | |
OwnableStorage storage $ = _getOwnableStorage(); | |
return $._owner; | |
} | |
/** | |
* @dev Throws if the sender is not the owner. | |
*/ | |
function _checkOwner() internal view virtual { | |
if (owner() != _msgSender()) { | |
revert OwnableUnauthorizedAccount(_msgSender()); | |
} | |
} | |
/** | |
* @dev Leaves the contract without owner. It will not be possible to call | |
* `onlyOwner` functions. Can only be called by the current owner. | |
* | |
* NOTE: Renouncing ownership will leave the contract without an owner, | |
* thereby disabling any functionality that is only available to the owner. | |
*/ | |
function renounceOwnership() public virtual onlyOwner { | |
_transferOwnership(address(0)); | |
} | |
/** | |
* @dev Transfers ownership of the contract to a new account (`newOwner`). | |
* Can only be called by the current owner. | |
*/ | |
function transferOwnership(address newOwner) public virtual onlyOwner { | |
if (newOwner == address(0)) { | |
revert OwnableInvalidOwner(address(0)); | |
} | |
_transferOwnership(newOwner); | |
} | |
/** | |
* @dev Transfers ownership of the contract to a new account (`newOwner`). | |
* Internal function without access restriction. | |
*/ | |
function _transferOwnership(address newOwner) internal virtual { | |
OwnableStorage storage $ = _getOwnableStorage(); | |
address oldOwner = $._owner; | |
$._owner = newOwner; | |
emit OwnershipTransferred(oldOwner, newOwner); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol) | |
pragma solidity ^0.8.20; | |
/** | |
* @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM | |
* instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to | |
* be specified by overriding the virtual {_implementation} function. | |
* | |
* Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a | |
* different contract through the {_delegate} function. | |
* | |
* The success and return data of the delegated call will be returned back to the caller of the proxy. | |
*/ | |
abstract contract Proxy { | |
/** | |
* @dev Delegates the current call to `implementation`. | |
* | |
* This function does not return to its internal call site, it will return directly to the external caller. | |
*/ | |
function _delegate(address implementation) internal virtual { | |
assembly { | |
// Copy msg.data. We take full control of memory in this inline assembly | |
// block because it will not return to Solidity code. We overwrite the | |
// Solidity scratch pad at memory position 0. | |
calldatacopy(0, 0, calldatasize()) | |
// Call the implementation. | |
// out and outsize are 0 because we don't know the size yet. | |
let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) | |
// Copy the returned data. | |
returndatacopy(0, 0, returndatasize()) | |
switch result | |
// delegatecall returns 0 on error. | |
case 0 { | |
revert(0, returndatasize()) | |
} | |
default { | |
return(0, returndatasize()) | |
} | |
} | |
} | |
/** | |
* @dev This is a virtual function that should be overridden so it returns the address to which the fallback | |
* function and {_fallback} should delegate. | |
*/ | |
function _implementation() internal view virtual returns (address); | |
/** | |
* @dev Delegates the current call to the address returned by `_implementation()`. | |
* | |
* This function does not return to its internal call site, it will return directly to the external caller. | |
*/ | |
function _fallback() internal virtual { | |
_delegate(_implementation()); | |
} | |
/** | |
* @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other | |
* function in the contract matches the call data. | |
*/ | |
fallback() external payable virtual { | |
_fallback(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.6.2 <0.9.0; | |
/// @author philogy <https://github.com/philogy> | |
/// @dev Code generated automatically by script. | |
library safeconsole { | |
uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67; | |
// Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374) | |
// for the view-to-pure log trick. | |
function _sendLogPayload(uint256 offset, uint256 size) private pure { | |
function(uint256, uint256) internal view fnIn = _sendLogPayloadView; | |
function(uint256, uint256) internal pure pureSendLogPayload; | |
assembly { | |
pureSendLogPayload := fnIn | |
} | |
pureSendLogPayload(offset, size); | |
} | |
function _sendLogPayloadView(uint256 offset, uint256 size) private view { | |
assembly { | |
pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0)) | |
} | |
} | |
function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure { | |
function(uint256, uint256, uint256) internal view fnIn = _memcopyView; | |
function(uint256, uint256, uint256) internal pure pureMemcopy; | |
assembly { | |
pureMemcopy := fnIn | |
} | |
pureMemcopy(fromOffset, toOffset, length); | |
} | |
function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view { | |
assembly { | |
pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length)) | |
} | |
} | |
function logMemory(uint256 offset, uint256 length) internal pure { | |
if (offset >= 0x60) { | |
// Sufficient memory before slice to prepare call header. | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
assembly { | |
m0 := mload(sub(offset, 0x60)) | |
m1 := mload(sub(offset, 0x40)) | |
m2 := mload(sub(offset, 0x20)) | |
// Selector of `logBytes(bytes)`. | |
mstore(sub(offset, 0x60), 0xe17bf956) | |
mstore(sub(offset, 0x40), 0x20) | |
mstore(sub(offset, 0x20), length) | |
} | |
_sendLogPayload(offset - 0x44, length + 0x44); | |
assembly { | |
mstore(sub(offset, 0x60), m0) | |
mstore(sub(offset, 0x40), m1) | |
mstore(sub(offset, 0x20), m2) | |
} | |
} else { | |
// Insufficient space, so copy slice forward, add header and reverse. | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
uint256 endOffset = offset + length; | |
assembly { | |
m0 := mload(add(endOffset, 0x00)) | |
m1 := mload(add(endOffset, 0x20)) | |
m2 := mload(add(endOffset, 0x40)) | |
} | |
_memcopy(offset, offset + 0x60, length); | |
assembly { | |
// Selector of `logBytes(bytes)`. | |
mstore(add(offset, 0x00), 0xe17bf956) | |
mstore(add(offset, 0x20), 0x20) | |
mstore(add(offset, 0x40), length) | |
} | |
_sendLogPayload(offset + 0x1c, length + 0x44); | |
_memcopy(offset + 0x60, offset, length); | |
assembly { | |
mstore(add(endOffset, 0x00), m0) | |
mstore(add(endOffset, 0x20), m1) | |
mstore(add(endOffset, 0x40), m2) | |
} | |
} | |
} | |
function log(address p0) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
// Selector of `log(address)`. | |
mstore(0x00, 0x2c2ecbc2) | |
mstore(0x20, p0) | |
} | |
_sendLogPayload(0x1c, 0x24); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
} | |
} | |
function log(bool p0) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
// Selector of `log(bool)`. | |
mstore(0x00, 0x32458eed) | |
mstore(0x20, p0) | |
} | |
_sendLogPayload(0x1c, 0x24); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
} | |
} | |
function log(uint256 p0) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
// Selector of `log(uint256)`. | |
mstore(0x00, 0xf82c50f1) | |
mstore(0x20, p0) | |
} | |
_sendLogPayload(0x1c, 0x24); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
} | |
} | |
function log(bytes32 p0) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(string)`. | |
mstore(0x00, 0x41304fac) | |
mstore(0x20, 0x20) | |
writeString(0x40, p0) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(address p0, address p1) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
// Selector of `log(address,address)`. | |
mstore(0x00, 0xdaf0d4aa) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
} | |
_sendLogPayload(0x1c, 0x44); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
} | |
} | |
function log(address p0, bool p1) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
// Selector of `log(address,bool)`. | |
mstore(0x00, 0x75b605d3) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
} | |
_sendLogPayload(0x1c, 0x44); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
} | |
} | |
function log(address p0, uint256 p1) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
// Selector of `log(address,uint256)`. | |
mstore(0x00, 0x8309e8a8) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
} | |
_sendLogPayload(0x1c, 0x44); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
} | |
} | |
function log(address p0, bytes32 p1) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,string)`. | |
mstore(0x00, 0x759f86bb) | |
mstore(0x20, p0) | |
mstore(0x40, 0x40) | |
writeString(0x60, p1) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, address p1) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
// Selector of `log(bool,address)`. | |
mstore(0x00, 0x853c4849) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
} | |
_sendLogPayload(0x1c, 0x44); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
} | |
} | |
function log(bool p0, bool p1) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
// Selector of `log(bool,bool)`. | |
mstore(0x00, 0x2a110e83) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
} | |
_sendLogPayload(0x1c, 0x44); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
} | |
} | |
function log(bool p0, uint256 p1) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
// Selector of `log(bool,uint256)`. | |
mstore(0x00, 0x399174d3) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
} | |
_sendLogPayload(0x1c, 0x44); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
} | |
} | |
function log(bool p0, bytes32 p1) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,string)`. | |
mstore(0x00, 0x8feac525) | |
mstore(0x20, p0) | |
mstore(0x40, 0x40) | |
writeString(0x60, p1) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, address p1) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
// Selector of `log(uint256,address)`. | |
mstore(0x00, 0x69276c86) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
} | |
_sendLogPayload(0x1c, 0x44); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
} | |
} | |
function log(uint256 p0, bool p1) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
// Selector of `log(uint256,bool)`. | |
mstore(0x00, 0x1c9d7eb3) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
} | |
_sendLogPayload(0x1c, 0x44); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
} | |
} | |
function log(uint256 p0, uint256 p1) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
// Selector of `log(uint256,uint256)`. | |
mstore(0x00, 0xf666715a) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
} | |
_sendLogPayload(0x1c, 0x44); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
} | |
} | |
function log(uint256 p0, bytes32 p1) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,string)`. | |
mstore(0x00, 0x643fd0df) | |
mstore(0x20, p0) | |
mstore(0x40, 0x40) | |
writeString(0x60, p1) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bytes32 p0, address p1) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(string,address)`. | |
mstore(0x00, 0x319af333) | |
mstore(0x20, 0x40) | |
mstore(0x40, p1) | |
writeString(0x60, p0) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bytes32 p0, bool p1) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(string,bool)`. | |
mstore(0x00, 0xc3b55635) | |
mstore(0x20, 0x40) | |
mstore(0x40, p1) | |
writeString(0x60, p0) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bytes32 p0, uint256 p1) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(string,uint256)`. | |
mstore(0x00, 0xb60e72cc) | |
mstore(0x20, 0x40) | |
mstore(0x40, p1) | |
writeString(0x60, p0) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,string)`. | |
mstore(0x00, 0x4b5c4277) | |
mstore(0x20, 0x40) | |
mstore(0x40, 0x80) | |
writeString(0x60, p0) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, address p1, address p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(address,address,address)`. | |
mstore(0x00, 0x018c84c2) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(address p0, address p1, bool p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(address,address,bool)`. | |
mstore(0x00, 0xf2a66286) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(address p0, address p1, uint256 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(address,address,uint256)`. | |
mstore(0x00, 0x17fe6185) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(address p0, address p1, bytes32 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(address,address,string)`. | |
mstore(0x00, 0x007150be) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x60) | |
writeString(0x80, p2) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(address p0, bool p1, address p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(address,bool,address)`. | |
mstore(0x00, 0xf11699ed) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(address p0, bool p1, bool p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(address,bool,bool)`. | |
mstore(0x00, 0xeb830c92) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(address p0, bool p1, uint256 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(address,bool,uint256)`. | |
mstore(0x00, 0x9c4f99fb) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(address p0, bool p1, bytes32 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(address,bool,string)`. | |
mstore(0x00, 0x212255cc) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x60) | |
writeString(0x80, p2) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(address p0, uint256 p1, address p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(address,uint256,address)`. | |
mstore(0x00, 0x7bc0d848) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(address p0, uint256 p1, bool p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(address,uint256,bool)`. | |
mstore(0x00, 0x678209a8) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(address p0, uint256 p1, uint256 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(address,uint256,uint256)`. | |
mstore(0x00, 0xb69bcaf6) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(address p0, uint256 p1, bytes32 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(address,uint256,string)`. | |
mstore(0x00, 0xa1f2e8aa) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x60) | |
writeString(0x80, p2) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(address p0, bytes32 p1, address p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(address,string,address)`. | |
mstore(0x00, 0xf08744e8) | |
mstore(0x20, p0) | |
mstore(0x40, 0x60) | |
mstore(0x60, p2) | |
writeString(0x80, p1) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(address p0, bytes32 p1, bool p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(address,string,bool)`. | |
mstore(0x00, 0xcf020fb1) | |
mstore(0x20, p0) | |
mstore(0x40, 0x60) | |
mstore(0x60, p2) | |
writeString(0x80, p1) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(address p0, bytes32 p1, uint256 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(address,string,uint256)`. | |
mstore(0x00, 0x67dd6ff1) | |
mstore(0x20, p0) | |
mstore(0x40, 0x60) | |
mstore(0x60, p2) | |
writeString(0x80, p1) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(address p0, bytes32 p1, bytes32 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
// Selector of `log(address,string,string)`. | |
mstore(0x00, 0xfb772265) | |
mstore(0x20, p0) | |
mstore(0x40, 0x60) | |
mstore(0x60, 0xa0) | |
writeString(0x80, p1) | |
writeString(0xc0, p2) | |
} | |
_sendLogPayload(0x1c, 0xe4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
} | |
} | |
function log(bool p0, address p1, address p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(bool,address,address)`. | |
mstore(0x00, 0xd2763667) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(bool p0, address p1, bool p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(bool,address,bool)`. | |
mstore(0x00, 0x18c9c746) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(bool p0, address p1, uint256 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(bool,address,uint256)`. | |
mstore(0x00, 0x5f7b9afb) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(bool p0, address p1, bytes32 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(bool,address,string)`. | |
mstore(0x00, 0xde9a9270) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x60) | |
writeString(0x80, p2) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(bool p0, bool p1, address p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(bool,bool,address)`. | |
mstore(0x00, 0x1078f68d) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(bool p0, bool p1, bool p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(bool,bool,bool)`. | |
mstore(0x00, 0x50709698) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(bool p0, bool p1, uint256 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(bool,bool,uint256)`. | |
mstore(0x00, 0x12f21602) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(bool p0, bool p1, bytes32 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(bool,bool,string)`. | |
mstore(0x00, 0x2555fa46) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x60) | |
writeString(0x80, p2) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(bool p0, uint256 p1, address p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(bool,uint256,address)`. | |
mstore(0x00, 0x088ef9d2) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(bool p0, uint256 p1, bool p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(bool,uint256,bool)`. | |
mstore(0x00, 0xe8defba9) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(bool p0, uint256 p1, uint256 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(bool,uint256,uint256)`. | |
mstore(0x00, 0x37103367) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(bool p0, uint256 p1, bytes32 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(bool,uint256,string)`. | |
mstore(0x00, 0xc3fc3970) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x60) | |
writeString(0x80, p2) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(bool p0, bytes32 p1, address p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(bool,string,address)`. | |
mstore(0x00, 0x9591b953) | |
mstore(0x20, p0) | |
mstore(0x40, 0x60) | |
mstore(0x60, p2) | |
writeString(0x80, p1) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(bool p0, bytes32 p1, bool p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(bool,string,bool)`. | |
mstore(0x00, 0xdbb4c247) | |
mstore(0x20, p0) | |
mstore(0x40, 0x60) | |
mstore(0x60, p2) | |
writeString(0x80, p1) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(bool p0, bytes32 p1, uint256 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(bool,string,uint256)`. | |
mstore(0x00, 0x1093ee11) | |
mstore(0x20, p0) | |
mstore(0x40, 0x60) | |
mstore(0x60, p2) | |
writeString(0x80, p1) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(bool p0, bytes32 p1, bytes32 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
// Selector of `log(bool,string,string)`. | |
mstore(0x00, 0xb076847f) | |
mstore(0x20, p0) | |
mstore(0x40, 0x60) | |
mstore(0x60, 0xa0) | |
writeString(0x80, p1) | |
writeString(0xc0, p2) | |
} | |
_sendLogPayload(0x1c, 0xe4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
} | |
} | |
function log(uint256 p0, address p1, address p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(uint256,address,address)`. | |
mstore(0x00, 0xbcfd9be0) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(uint256 p0, address p1, bool p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(uint256,address,bool)`. | |
mstore(0x00, 0x9b6ec042) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(uint256 p0, address p1, uint256 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(uint256,address,uint256)`. | |
mstore(0x00, 0x5a9b5ed5) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(uint256 p0, address p1, bytes32 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(uint256,address,string)`. | |
mstore(0x00, 0x63cb41f9) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x60) | |
writeString(0x80, p2) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(uint256 p0, bool p1, address p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(uint256,bool,address)`. | |
mstore(0x00, 0x35085f7b) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(uint256 p0, bool p1, bool p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(uint256,bool,bool)`. | |
mstore(0x00, 0x20718650) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(uint256 p0, bool p1, uint256 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(uint256,bool,uint256)`. | |
mstore(0x00, 0x20098014) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(uint256 p0, bool p1, bytes32 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(uint256,bool,string)`. | |
mstore(0x00, 0x85775021) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x60) | |
writeString(0x80, p2) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(uint256 p0, uint256 p1, address p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(uint256,uint256,address)`. | |
mstore(0x00, 0x5c96b331) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(uint256 p0, uint256 p1, bool p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(uint256,uint256,bool)`. | |
mstore(0x00, 0x4766da72) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(uint256 p0, uint256 p1, uint256 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
// Selector of `log(uint256,uint256,uint256)`. | |
mstore(0x00, 0xd1ed7a3c) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
} | |
_sendLogPayload(0x1c, 0x64); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
} | |
} | |
function log(uint256 p0, uint256 p1, bytes32 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(uint256,uint256,string)`. | |
mstore(0x00, 0x71d04af2) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x60) | |
writeString(0x80, p2) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, address p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(uint256,string,address)`. | |
mstore(0x00, 0x7afac959) | |
mstore(0x20, p0) | |
mstore(0x40, 0x60) | |
mstore(0x60, p2) | |
writeString(0x80, p1) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, bool p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(uint256,string,bool)`. | |
mstore(0x00, 0x4ceda75a) | |
mstore(0x20, p0) | |
mstore(0x40, 0x60) | |
mstore(0x60, p2) | |
writeString(0x80, p1) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, uint256 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(uint256,string,uint256)`. | |
mstore(0x00, 0x37aa7d4c) | |
mstore(0x20, p0) | |
mstore(0x40, 0x60) | |
mstore(0x60, p2) | |
writeString(0x80, p1) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
// Selector of `log(uint256,string,string)`. | |
mstore(0x00, 0xb115611f) | |
mstore(0x20, p0) | |
mstore(0x40, 0x60) | |
mstore(0x60, 0xa0) | |
writeString(0x80, p1) | |
writeString(0xc0, p2) | |
} | |
_sendLogPayload(0x1c, 0xe4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
} | |
} | |
function log(bytes32 p0, address p1, address p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(string,address,address)`. | |
mstore(0x00, 0xfcec75e0) | |
mstore(0x20, 0x60) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
writeString(0x80, p0) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(bytes32 p0, address p1, bool p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(string,address,bool)`. | |
mstore(0x00, 0xc91d5ed4) | |
mstore(0x20, 0x60) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
writeString(0x80, p0) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(bytes32 p0, address p1, uint256 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(string,address,uint256)`. | |
mstore(0x00, 0x0d26b925) | |
mstore(0x20, 0x60) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
writeString(0x80, p0) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(bytes32 p0, address p1, bytes32 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
// Selector of `log(string,address,string)`. | |
mstore(0x00, 0xe0e9ad4f) | |
mstore(0x20, 0x60) | |
mstore(0x40, p1) | |
mstore(0x60, 0xa0) | |
writeString(0x80, p0) | |
writeString(0xc0, p2) | |
} | |
_sendLogPayload(0x1c, 0xe4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
} | |
} | |
function log(bytes32 p0, bool p1, address p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(string,bool,address)`. | |
mstore(0x00, 0x932bbb38) | |
mstore(0x20, 0x60) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
writeString(0x80, p0) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(bytes32 p0, bool p1, bool p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(string,bool,bool)`. | |
mstore(0x00, 0x850b7ad6) | |
mstore(0x20, 0x60) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
writeString(0x80, p0) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(bytes32 p0, bool p1, uint256 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(string,bool,uint256)`. | |
mstore(0x00, 0xc95958d6) | |
mstore(0x20, 0x60) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
writeString(0x80, p0) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(bytes32 p0, bool p1, bytes32 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
// Selector of `log(string,bool,string)`. | |
mstore(0x00, 0xe298f47d) | |
mstore(0x20, 0x60) | |
mstore(0x40, p1) | |
mstore(0x60, 0xa0) | |
writeString(0x80, p0) | |
writeString(0xc0, p2) | |
} | |
_sendLogPayload(0x1c, 0xe4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, address p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(string,uint256,address)`. | |
mstore(0x00, 0x1c7ec448) | |
mstore(0x20, 0x60) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
writeString(0x80, p0) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, bool p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(string,uint256,bool)`. | |
mstore(0x00, 0xca7733b1) | |
mstore(0x20, 0x60) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
writeString(0x80, p0) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, uint256 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
// Selector of `log(string,uint256,uint256)`. | |
mstore(0x00, 0xca47c4eb) | |
mstore(0x20, 0x60) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
writeString(0x80, p0) | |
} | |
_sendLogPayload(0x1c, 0xa4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
// Selector of `log(string,uint256,string)`. | |
mstore(0x00, 0x5970e089) | |
mstore(0x20, 0x60) | |
mstore(0x40, p1) | |
mstore(0x60, 0xa0) | |
writeString(0x80, p0) | |
writeString(0xc0, p2) | |
} | |
_sendLogPayload(0x1c, 0xe4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, address p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
// Selector of `log(string,string,address)`. | |
mstore(0x00, 0x95ed0195) | |
mstore(0x20, 0x60) | |
mstore(0x40, 0xa0) | |
mstore(0x60, p2) | |
writeString(0x80, p0) | |
writeString(0xc0, p1) | |
} | |
_sendLogPayload(0x1c, 0xe4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, bool p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
// Selector of `log(string,string,bool)`. | |
mstore(0x00, 0xb0e0f9b5) | |
mstore(0x20, 0x60) | |
mstore(0x40, 0xa0) | |
mstore(0x60, p2) | |
writeString(0x80, p0) | |
writeString(0xc0, p1) | |
} | |
_sendLogPayload(0x1c, 0xe4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
// Selector of `log(string,string,uint256)`. | |
mstore(0x00, 0x5821efa1) | |
mstore(0x20, 0x60) | |
mstore(0x40, 0xa0) | |
mstore(0x60, p2) | |
writeString(0x80, p0) | |
writeString(0xc0, p1) | |
} | |
_sendLogPayload(0x1c, 0xe4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
bytes32 m9; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
m9 := mload(0x120) | |
// Selector of `log(string,string,string)`. | |
mstore(0x00, 0x2ced7cef) | |
mstore(0x20, 0x60) | |
mstore(0x40, 0xa0) | |
mstore(0x60, 0xe0) | |
writeString(0x80, p0) | |
writeString(0xc0, p1) | |
writeString(0x100, p2) | |
} | |
_sendLogPayload(0x1c, 0x124); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
mstore(0x120, m9) | |
} | |
} | |
function log(address p0, address p1, address p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,address,address,address)`. | |
mstore(0x00, 0x665bf134) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, address p1, address p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,address,address,bool)`. | |
mstore(0x00, 0x0e378994) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, address p1, address p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,address,address,uint256)`. | |
mstore(0x00, 0x94250d77) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, address p1, address p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,address,address,string)`. | |
mstore(0x00, 0xf808da20) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, address p1, bool p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,address,bool,address)`. | |
mstore(0x00, 0x9f1bc36e) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, address p1, bool p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,address,bool,bool)`. | |
mstore(0x00, 0x2cd4134a) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, address p1, bool p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,address,bool,uint256)`. | |
mstore(0x00, 0x3971e78c) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, address p1, bool p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,address,bool,string)`. | |
mstore(0x00, 0xaa6540c8) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, address p1, uint256 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,address,uint256,address)`. | |
mstore(0x00, 0x8da6def5) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, address p1, uint256 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,address,uint256,bool)`. | |
mstore(0x00, 0x9b4254e2) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, address p1, uint256 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,address,uint256,uint256)`. | |
mstore(0x00, 0xbe553481) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,address,uint256,string)`. | |
mstore(0x00, 0xfdb4f990) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, address p1, bytes32 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,address,string,address)`. | |
mstore(0x00, 0x8f736d16) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, address p1, bytes32 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,address,string,bool)`. | |
mstore(0x00, 0x6f1a594e) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,address,string,uint256)`. | |
mstore(0x00, 0xef1cefe7) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(address,address,string,string)`. | |
mstore(0x00, 0x21bdaf25) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p2) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(address p0, bool p1, address p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,bool,address,address)`. | |
mstore(0x00, 0x660375dd) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, bool p1, address p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,bool,address,bool)`. | |
mstore(0x00, 0xa6f50b0f) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, bool p1, address p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,bool,address,uint256)`. | |
mstore(0x00, 0xa75c59de) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, bool p1, address p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,bool,address,string)`. | |
mstore(0x00, 0x2dd778e6) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, bool p1, bool p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,bool,bool,address)`. | |
mstore(0x00, 0xcf394485) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, bool p1, bool p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,bool,bool,bool)`. | |
mstore(0x00, 0xcac43479) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, bool p1, bool p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,bool,bool,uint256)`. | |
mstore(0x00, 0x8c4e5de6) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, bool p1, bool p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,bool,bool,string)`. | |
mstore(0x00, 0xdfc4a2e8) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, bool p1, uint256 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,bool,uint256,address)`. | |
mstore(0x00, 0xccf790a1) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, bool p1, uint256 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,bool,uint256,bool)`. | |
mstore(0x00, 0xc4643e20) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,bool,uint256,uint256)`. | |
mstore(0x00, 0x386ff5f4) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,bool,uint256,string)`. | |
mstore(0x00, 0x0aa6cfad) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, bool p1, bytes32 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,bool,string,address)`. | |
mstore(0x00, 0x19fd4956) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, bool p1, bytes32 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,bool,string,bool)`. | |
mstore(0x00, 0x50ad461d) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,bool,string,uint256)`. | |
mstore(0x00, 0x80e6a20b) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(address,bool,string,string)`. | |
mstore(0x00, 0x475c5c33) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p2) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(address p0, uint256 p1, address p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,uint256,address,address)`. | |
mstore(0x00, 0x478d1c62) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, uint256 p1, address p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,uint256,address,bool)`. | |
mstore(0x00, 0xa1bcc9b3) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, uint256 p1, address p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,uint256,address,uint256)`. | |
mstore(0x00, 0x100f650e) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,uint256,address,string)`. | |
mstore(0x00, 0x1da986ea) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, uint256 p1, bool p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,uint256,bool,address)`. | |
mstore(0x00, 0xa31bfdcc) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, uint256 p1, bool p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,uint256,bool,bool)`. | |
mstore(0x00, 0x3bf5e537) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,uint256,bool,uint256)`. | |
mstore(0x00, 0x22f6b999) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,uint256,bool,string)`. | |
mstore(0x00, 0xc5ad85f9) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, uint256 p1, uint256 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,uint256,uint256,address)`. | |
mstore(0x00, 0x20e3984d) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,uint256,uint256,bool)`. | |
mstore(0x00, 0x66f1bc67) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(address,uint256,uint256,uint256)`. | |
mstore(0x00, 0x34f0e636) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,uint256,uint256,string)`. | |
mstore(0x00, 0x4a28c017) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,uint256,string,address)`. | |
mstore(0x00, 0x5c430d47) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,uint256,string,bool)`. | |
mstore(0x00, 0xcf18105c) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,uint256,string,uint256)`. | |
mstore(0x00, 0xbf01f891) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(address,uint256,string,string)`. | |
mstore(0x00, 0x88a8c406) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p2) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(address p0, bytes32 p1, address p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,string,address,address)`. | |
mstore(0x00, 0x0d36fa20) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, bytes32 p1, address p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,string,address,bool)`. | |
mstore(0x00, 0x0df12b76) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,string,address,uint256)`. | |
mstore(0x00, 0x457fe3cf) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(address,string,address,string)`. | |
mstore(0x00, 0xf7e36245) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p1) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(address p0, bytes32 p1, bool p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,string,bool,address)`. | |
mstore(0x00, 0x205871c2) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, bytes32 p1, bool p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,string,bool,bool)`. | |
mstore(0x00, 0x5f1d5c9f) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,string,bool,uint256)`. | |
mstore(0x00, 0x515e38b6) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(address,string,bool,string)`. | |
mstore(0x00, 0xbc0b61fe) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p1) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,string,uint256,address)`. | |
mstore(0x00, 0x63183678) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,string,uint256,bool)`. | |
mstore(0x00, 0x0ef7e050) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(address,string,uint256,uint256)`. | |
mstore(0x00, 0x1dc8e1b8) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(address,string,uint256,string)`. | |
mstore(0x00, 0x448830a8) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p1) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(address,string,string,address)`. | |
mstore(0x00, 0xa04e2f87) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(address,string,string,bool)`. | |
mstore(0x00, 0x35a5071f) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(address,string,string,uint256)`. | |
mstore(0x00, 0x159f8927) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
bytes32 m9; | |
bytes32 m10; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
m9 := mload(0x120) | |
m10 := mload(0x140) | |
// Selector of `log(address,string,string,string)`. | |
mstore(0x00, 0x5d02c50b) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, 0xc0) | |
mstore(0x80, 0x100) | |
writeString(0xa0, p1) | |
writeString(0xe0, p2) | |
writeString(0x120, p3) | |
} | |
_sendLogPayload(0x1c, 0x144); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
mstore(0x120, m9) | |
mstore(0x140, m10) | |
} | |
} | |
function log(bool p0, address p1, address p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,address,address,address)`. | |
mstore(0x00, 0x1d14d001) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, address p1, address p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,address,address,bool)`. | |
mstore(0x00, 0x46600be0) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, address p1, address p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,address,address,uint256)`. | |
mstore(0x00, 0x0c66d1be) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, address p1, address p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,address,address,string)`. | |
mstore(0x00, 0xd812a167) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, address p1, bool p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,address,bool,address)`. | |
mstore(0x00, 0x1c41a336) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, address p1, bool p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,address,bool,bool)`. | |
mstore(0x00, 0x6a9c478b) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, address p1, bool p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,address,bool,uint256)`. | |
mstore(0x00, 0x07831502) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, address p1, bool p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,address,bool,string)`. | |
mstore(0x00, 0x4a66cb34) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, address p1, uint256 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,address,uint256,address)`. | |
mstore(0x00, 0x136b05dd) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, address p1, uint256 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,address,uint256,bool)`. | |
mstore(0x00, 0xd6019f1c) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,address,uint256,uint256)`. | |
mstore(0x00, 0x7bf181a1) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,address,uint256,string)`. | |
mstore(0x00, 0x51f09ff8) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, address p1, bytes32 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,address,string,address)`. | |
mstore(0x00, 0x6f7c603e) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, address p1, bytes32 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,address,string,bool)`. | |
mstore(0x00, 0xe2bfd60b) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,address,string,uint256)`. | |
mstore(0x00, 0xc21f64c7) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(bool,address,string,string)`. | |
mstore(0x00, 0xa73c1db6) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p2) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bool p0, bool p1, address p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,bool,address,address)`. | |
mstore(0x00, 0xf4880ea4) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, bool p1, address p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,bool,address,bool)`. | |
mstore(0x00, 0xc0a302d8) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, bool p1, address p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,bool,address,uint256)`. | |
mstore(0x00, 0x4c123d57) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, bool p1, address p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,bool,address,string)`. | |
mstore(0x00, 0xa0a47963) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, bool p1, bool p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,bool,bool,address)`. | |
mstore(0x00, 0x8c329b1a) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, bool p1, bool p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,bool,bool,bool)`. | |
mstore(0x00, 0x3b2a5ce0) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, bool p1, bool p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,bool,bool,uint256)`. | |
mstore(0x00, 0x6d7045c1) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,bool,bool,string)`. | |
mstore(0x00, 0x2ae408d4) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, bool p1, uint256 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,bool,uint256,address)`. | |
mstore(0x00, 0x54a7a9a0) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, bool p1, uint256 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,bool,uint256,bool)`. | |
mstore(0x00, 0x619e4d0e) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,bool,uint256,uint256)`. | |
mstore(0x00, 0x0bb00eab) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,bool,uint256,string)`. | |
mstore(0x00, 0x7dd4d0e0) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, bool p1, bytes32 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,bool,string,address)`. | |
mstore(0x00, 0xf9ad2b89) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,bool,string,bool)`. | |
mstore(0x00, 0xb857163a) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,bool,string,uint256)`. | |
mstore(0x00, 0xe3a9ca2f) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(bool,bool,string,string)`. | |
mstore(0x00, 0x6d1e8751) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p2) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bool p0, uint256 p1, address p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,uint256,address,address)`. | |
mstore(0x00, 0x26f560a8) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, uint256 p1, address p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,uint256,address,bool)`. | |
mstore(0x00, 0xb4c314ff) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,uint256,address,uint256)`. | |
mstore(0x00, 0x1537dc87) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,uint256,address,string)`. | |
mstore(0x00, 0x1bb3b09a) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, uint256 p1, bool p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,uint256,bool,address)`. | |
mstore(0x00, 0x9acd3616) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, uint256 p1, bool p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,uint256,bool,bool)`. | |
mstore(0x00, 0xceb5f4d7) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,uint256,bool,uint256)`. | |
mstore(0x00, 0x7f9bbca2) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,uint256,bool,string)`. | |
mstore(0x00, 0x9143dbb1) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,uint256,uint256,address)`. | |
mstore(0x00, 0x00dd87b9) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,uint256,uint256,bool)`. | |
mstore(0x00, 0xbe984353) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(bool,uint256,uint256,uint256)`. | |
mstore(0x00, 0x374bb4b2) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,uint256,uint256,string)`. | |
mstore(0x00, 0x8e69fb5d) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,uint256,string,address)`. | |
mstore(0x00, 0xfedd1fff) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,uint256,string,bool)`. | |
mstore(0x00, 0xe5e70b2b) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,uint256,string,uint256)`. | |
mstore(0x00, 0x6a1199e2) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(bool,uint256,string,string)`. | |
mstore(0x00, 0xf5bc2249) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p2) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bool p0, bytes32 p1, address p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,string,address,address)`. | |
mstore(0x00, 0x2b2b18dc) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, bytes32 p1, address p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,string,address,bool)`. | |
mstore(0x00, 0x6dd434ca) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,string,address,uint256)`. | |
mstore(0x00, 0xa5cada94) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(bool,string,address,string)`. | |
mstore(0x00, 0x12d6c788) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p1) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bool p0, bytes32 p1, bool p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,string,bool,address)`. | |
mstore(0x00, 0x538e06ab) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,string,bool,bool)`. | |
mstore(0x00, 0xdc5e935b) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,string,bool,uint256)`. | |
mstore(0x00, 0x1606a393) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(bool,string,bool,string)`. | |
mstore(0x00, 0x483d0416) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p1) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,string,uint256,address)`. | |
mstore(0x00, 0x1596a1ce) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,string,uint256,bool)`. | |
mstore(0x00, 0x6b0e5d53) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(bool,string,uint256,uint256)`. | |
mstore(0x00, 0x28863fcb) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(bool,string,uint256,string)`. | |
mstore(0x00, 0x1ad96de6) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p1) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(bool,string,string,address)`. | |
mstore(0x00, 0x97d394d8) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(bool,string,string,bool)`. | |
mstore(0x00, 0x1e4b87e5) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(bool,string,string,uint256)`. | |
mstore(0x00, 0x7be0c3eb) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
bytes32 m9; | |
bytes32 m10; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
m9 := mload(0x120) | |
m10 := mload(0x140) | |
// Selector of `log(bool,string,string,string)`. | |
mstore(0x00, 0x1762e32a) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, 0xc0) | |
mstore(0x80, 0x100) | |
writeString(0xa0, p1) | |
writeString(0xe0, p2) | |
writeString(0x120, p3) | |
} | |
_sendLogPayload(0x1c, 0x144); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
mstore(0x120, m9) | |
mstore(0x140, m10) | |
} | |
} | |
function log(uint256 p0, address p1, address p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,address,address,address)`. | |
mstore(0x00, 0x2488b414) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, address p1, address p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,address,address,bool)`. | |
mstore(0x00, 0x091ffaf5) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, address p1, address p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,address,address,uint256)`. | |
mstore(0x00, 0x736efbb6) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,address,address,string)`. | |
mstore(0x00, 0x031c6f73) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, address p1, bool p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,address,bool,address)`. | |
mstore(0x00, 0xef72c513) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, address p1, bool p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,address,bool,bool)`. | |
mstore(0x00, 0xe351140f) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,address,bool,uint256)`. | |
mstore(0x00, 0x5abd992a) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,address,bool,string)`. | |
mstore(0x00, 0x90fb06aa) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, address p1, uint256 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,address,uint256,address)`. | |
mstore(0x00, 0x15c127b5) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,address,uint256,bool)`. | |
mstore(0x00, 0x5f743a7c) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,address,uint256,uint256)`. | |
mstore(0x00, 0x0c9cd9c1) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,address,uint256,string)`. | |
mstore(0x00, 0xddb06521) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,address,string,address)`. | |
mstore(0x00, 0x9cba8fff) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,address,string,bool)`. | |
mstore(0x00, 0xcc32ab07) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,address,string,uint256)`. | |
mstore(0x00, 0x46826b5d) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(uint256,address,string,string)`. | |
mstore(0x00, 0x3e128ca3) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p2) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(uint256 p0, bool p1, address p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,bool,address,address)`. | |
mstore(0x00, 0xa1ef4cbb) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, bool p1, address p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,bool,address,bool)`. | |
mstore(0x00, 0x454d54a5) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,bool,address,uint256)`. | |
mstore(0x00, 0x078287f5) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,bool,address,string)`. | |
mstore(0x00, 0xade052c7) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, bool p1, bool p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,bool,bool,address)`. | |
mstore(0x00, 0x69640b59) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, bool p1, bool p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,bool,bool,bool)`. | |
mstore(0x00, 0xb6f577a1) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,bool,bool,uint256)`. | |
mstore(0x00, 0x7464ce23) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,bool,bool,string)`. | |
mstore(0x00, 0xdddb9561) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,bool,uint256,address)`. | |
mstore(0x00, 0x88cb6041) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,bool,uint256,bool)`. | |
mstore(0x00, 0x91a02e2a) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,bool,uint256,uint256)`. | |
mstore(0x00, 0xc6acc7a8) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,bool,uint256,string)`. | |
mstore(0x00, 0xde03e774) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,bool,string,address)`. | |
mstore(0x00, 0xef529018) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,bool,string,bool)`. | |
mstore(0x00, 0xeb928d7f) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,bool,string,uint256)`. | |
mstore(0x00, 0x2c1d0746) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(uint256,bool,string,string)`. | |
mstore(0x00, 0x68c8b8bd) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p2) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(uint256 p0, uint256 p1, address p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,uint256,address,address)`. | |
mstore(0x00, 0x56a5d1b1) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,uint256,address,bool)`. | |
mstore(0x00, 0x15cac476) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,uint256,address,uint256)`. | |
mstore(0x00, 0x88f6e4b2) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,uint256,address,string)`. | |
mstore(0x00, 0x6cde40b8) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,uint256,bool,address)`. | |
mstore(0x00, 0x9a816a83) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,uint256,bool,bool)`. | |
mstore(0x00, 0xab085ae6) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,uint256,bool,uint256)`. | |
mstore(0x00, 0xeb7f6fd2) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,uint256,bool,string)`. | |
mstore(0x00, 0xa5b4fc99) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,uint256,uint256,address)`. | |
mstore(0x00, 0xfa8185af) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,uint256,uint256,bool)`. | |
mstore(0x00, 0xc598d185) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
assembly { | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
// Selector of `log(uint256,uint256,uint256,uint256)`. | |
mstore(0x00, 0x193fb800) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
} | |
_sendLogPayload(0x1c, 0x84); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
} | |
} | |
function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,uint256,uint256,string)`. | |
mstore(0x00, 0x59cfcbe3) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0x80) | |
writeString(0xa0, p3) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,uint256,string,address)`. | |
mstore(0x00, 0x42d21db7) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,uint256,string,bool)`. | |
mstore(0x00, 0x7af6ab25) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,uint256,string,uint256)`. | |
mstore(0x00, 0x5da297eb) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, p3) | |
writeString(0xa0, p2) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(uint256,uint256,string,string)`. | |
mstore(0x00, 0x27d8afd2) | |
mstore(0x20, p0) | |
mstore(0x40, p1) | |
mstore(0x60, 0x80) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p2) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,string,address,address)`. | |
mstore(0x00, 0x6168ed61) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,string,address,bool)`. | |
mstore(0x00, 0x90c30a56) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,string,address,uint256)`. | |
mstore(0x00, 0xe8d3018d) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(uint256,string,address,string)`. | |
mstore(0x00, 0x9c3adfa1) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p1) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,string,bool,address)`. | |
mstore(0x00, 0xae2ec581) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,string,bool,bool)`. | |
mstore(0x00, 0xba535d9c) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,string,bool,uint256)`. | |
mstore(0x00, 0xcf009880) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(uint256,string,bool,string)`. | |
mstore(0x00, 0xd2d423cd) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p1) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,string,uint256,address)`. | |
mstore(0x00, 0x3b2279b4) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,string,uint256,bool)`. | |
mstore(0x00, 0x691a8f74) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(uint256,string,uint256,uint256)`. | |
mstore(0x00, 0x82c25b74) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(uint256,string,uint256,string)`. | |
mstore(0x00, 0xb7b914ca) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p1) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(uint256,string,string,address)`. | |
mstore(0x00, 0xd583c602) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(uint256,string,string,bool)`. | |
mstore(0x00, 0xb3a6b6bd) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(uint256,string,string,uint256)`. | |
mstore(0x00, 0xb028c9bd) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p1) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
bytes32 m9; | |
bytes32 m10; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
m9 := mload(0x120) | |
m10 := mload(0x140) | |
// Selector of `log(uint256,string,string,string)`. | |
mstore(0x00, 0x21ad0683) | |
mstore(0x20, p0) | |
mstore(0x40, 0x80) | |
mstore(0x60, 0xc0) | |
mstore(0x80, 0x100) | |
writeString(0xa0, p1) | |
writeString(0xe0, p2) | |
writeString(0x120, p3) | |
} | |
_sendLogPayload(0x1c, 0x144); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
mstore(0x120, m9) | |
mstore(0x140, m10) | |
} | |
} | |
function log(bytes32 p0, address p1, address p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,address,address,address)`. | |
mstore(0x00, 0xed8f28f6) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, address p1, address p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,address,address,bool)`. | |
mstore(0x00, 0xb59dbd60) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,address,address,uint256)`. | |
mstore(0x00, 0x8ef3f399) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,address,address,string)`. | |
mstore(0x00, 0x800a1c67) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p0) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, address p1, bool p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,address,bool,address)`. | |
mstore(0x00, 0x223603bd) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, address p1, bool p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,address,bool,bool)`. | |
mstore(0x00, 0x79884c2b) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,address,bool,uint256)`. | |
mstore(0x00, 0x3e9f866a) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,address,bool,string)`. | |
mstore(0x00, 0x0454c079) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p0) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,address,uint256,address)`. | |
mstore(0x00, 0x63fb8bc5) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,address,uint256,bool)`. | |
mstore(0x00, 0xfc4845f0) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,address,uint256,uint256)`. | |
mstore(0x00, 0xf8f51b1e) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,address,uint256,string)`. | |
mstore(0x00, 0x5a477632) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p0) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,address,string,address)`. | |
mstore(0x00, 0xaabc9a31) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,address,string,bool)`. | |
mstore(0x00, 0x5f15d28c) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,address,string,uint256)`. | |
mstore(0x00, 0x91d1112e) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
bytes32 m9; | |
bytes32 m10; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
m9 := mload(0x120) | |
m10 := mload(0x140) | |
// Selector of `log(string,address,string,string)`. | |
mstore(0x00, 0x245986f2) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, 0xc0) | |
mstore(0x80, 0x100) | |
writeString(0xa0, p0) | |
writeString(0xe0, p2) | |
writeString(0x120, p3) | |
} | |
_sendLogPayload(0x1c, 0x144); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
mstore(0x120, m9) | |
mstore(0x140, m10) | |
} | |
} | |
function log(bytes32 p0, bool p1, address p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,bool,address,address)`. | |
mstore(0x00, 0x33e9dd1d) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, bool p1, address p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,bool,address,bool)`. | |
mstore(0x00, 0x958c28c6) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,bool,address,uint256)`. | |
mstore(0x00, 0x5d08bb05) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,bool,address,string)`. | |
mstore(0x00, 0x2d8e33a4) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p0) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, bool p1, bool p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,bool,bool,address)`. | |
mstore(0x00, 0x7190a529) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,bool,bool,bool)`. | |
mstore(0x00, 0x895af8c5) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,bool,bool,uint256)`. | |
mstore(0x00, 0x8e3f78a9) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,bool,bool,string)`. | |
mstore(0x00, 0x9d22d5dd) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p0) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,bool,uint256,address)`. | |
mstore(0x00, 0x935e09bf) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,bool,uint256,bool)`. | |
mstore(0x00, 0x8af7cf8a) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,bool,uint256,uint256)`. | |
mstore(0x00, 0x64b5bb67) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,bool,uint256,string)`. | |
mstore(0x00, 0x742d6ee7) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p0) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,bool,string,address)`. | |
mstore(0x00, 0xe0625b29) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,bool,string,bool)`. | |
mstore(0x00, 0x3f8a701d) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,bool,string,uint256)`. | |
mstore(0x00, 0x24f91465) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
bytes32 m9; | |
bytes32 m10; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
m9 := mload(0x120) | |
m10 := mload(0x140) | |
// Selector of `log(string,bool,string,string)`. | |
mstore(0x00, 0xa826caeb) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, 0xc0) | |
mstore(0x80, 0x100) | |
writeString(0xa0, p0) | |
writeString(0xe0, p2) | |
writeString(0x120, p3) | |
} | |
_sendLogPayload(0x1c, 0x144); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
mstore(0x120, m9) | |
mstore(0x140, m10) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,uint256,address,address)`. | |
mstore(0x00, 0x5ea2b7ae) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,uint256,address,bool)`. | |
mstore(0x00, 0x82112a42) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,uint256,address,uint256)`. | |
mstore(0x00, 0x4f04fdc6) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,uint256,address,string)`. | |
mstore(0x00, 0x9ffb2f93) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p0) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,uint256,bool,address)`. | |
mstore(0x00, 0xe0e95b98) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,uint256,bool,bool)`. | |
mstore(0x00, 0x354c36d6) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,uint256,bool,uint256)`. | |
mstore(0x00, 0xe41b6f6f) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,uint256,bool,string)`. | |
mstore(0x00, 0xabf73a98) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p0) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,uint256,uint256,address)`. | |
mstore(0x00, 0xe21de278) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,uint256,uint256,bool)`. | |
mstore(0x00, 0x7626db92) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
// Selector of `log(string,uint256,uint256,uint256)`. | |
mstore(0x00, 0xa7a87853) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
} | |
_sendLogPayload(0x1c, 0xc4); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,uint256,uint256,string)`. | |
mstore(0x00, 0x854b3496) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, p2) | |
mstore(0x80, 0xc0) | |
writeString(0xa0, p0) | |
writeString(0xe0, p3) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,uint256,string,address)`. | |
mstore(0x00, 0x7c4632a4) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,uint256,string,bool)`. | |
mstore(0x00, 0x7d24491d) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,uint256,string,uint256)`. | |
mstore(0x00, 0xc67ea9d1) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, 0xc0) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p2) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
bytes32 m9; | |
bytes32 m10; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
m9 := mload(0x120) | |
m10 := mload(0x140) | |
// Selector of `log(string,uint256,string,string)`. | |
mstore(0x00, 0x5ab84e1f) | |
mstore(0x20, 0x80) | |
mstore(0x40, p1) | |
mstore(0x60, 0xc0) | |
mstore(0x80, 0x100) | |
writeString(0xa0, p0) | |
writeString(0xe0, p2) | |
writeString(0x120, p3) | |
} | |
_sendLogPayload(0x1c, 0x144); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
mstore(0x120, m9) | |
mstore(0x140, m10) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,string,address,address)`. | |
mstore(0x00, 0x439c7bef) | |
mstore(0x20, 0x80) | |
mstore(0x40, 0xc0) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p1) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,string,address,bool)`. | |
mstore(0x00, 0x5ccd4e37) | |
mstore(0x20, 0x80) | |
mstore(0x40, 0xc0) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p1) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,string,address,uint256)`. | |
mstore(0x00, 0x7cc3c607) | |
mstore(0x20, 0x80) | |
mstore(0x40, 0xc0) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p1) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
bytes32 m9; | |
bytes32 m10; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
m9 := mload(0x120) | |
m10 := mload(0x140) | |
// Selector of `log(string,string,address,string)`. | |
mstore(0x00, 0xeb1bff80) | |
mstore(0x20, 0x80) | |
mstore(0x40, 0xc0) | |
mstore(0x60, p2) | |
mstore(0x80, 0x100) | |
writeString(0xa0, p0) | |
writeString(0xe0, p1) | |
writeString(0x120, p3) | |
} | |
_sendLogPayload(0x1c, 0x144); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
mstore(0x120, m9) | |
mstore(0x140, m10) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,string,bool,address)`. | |
mstore(0x00, 0xc371c7db) | |
mstore(0x20, 0x80) | |
mstore(0x40, 0xc0) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p1) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,string,bool,bool)`. | |
mstore(0x00, 0x40785869) | |
mstore(0x20, 0x80) | |
mstore(0x40, 0xc0) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p1) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,string,bool,uint256)`. | |
mstore(0x00, 0xd6aefad2) | |
mstore(0x20, 0x80) | |
mstore(0x40, 0xc0) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p1) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
bytes32 m9; | |
bytes32 m10; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
m9 := mload(0x120) | |
m10 := mload(0x140) | |
// Selector of `log(string,string,bool,string)`. | |
mstore(0x00, 0x5e84b0ea) | |
mstore(0x20, 0x80) | |
mstore(0x40, 0xc0) | |
mstore(0x60, p2) | |
mstore(0x80, 0x100) | |
writeString(0xa0, p0) | |
writeString(0xe0, p1) | |
writeString(0x120, p3) | |
} | |
_sendLogPayload(0x1c, 0x144); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
mstore(0x120, m9) | |
mstore(0x140, m10) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,string,uint256,address)`. | |
mstore(0x00, 0x1023f7b2) | |
mstore(0x20, 0x80) | |
mstore(0x40, 0xc0) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p1) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,string,uint256,bool)`. | |
mstore(0x00, 0xc3a8a654) | |
mstore(0x20, 0x80) | |
mstore(0x40, 0xc0) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p1) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
// Selector of `log(string,string,uint256,uint256)`. | |
mstore(0x00, 0xf45d7d2c) | |
mstore(0x20, 0x80) | |
mstore(0x40, 0xc0) | |
mstore(0x60, p2) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p1) | |
} | |
_sendLogPayload(0x1c, 0x104); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
bytes32 m9; | |
bytes32 m10; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
m9 := mload(0x120) | |
m10 := mload(0x140) | |
// Selector of `log(string,string,uint256,string)`. | |
mstore(0x00, 0x5d1a971a) | |
mstore(0x20, 0x80) | |
mstore(0x40, 0xc0) | |
mstore(0x60, p2) | |
mstore(0x80, 0x100) | |
writeString(0xa0, p0) | |
writeString(0xe0, p1) | |
writeString(0x120, p3) | |
} | |
_sendLogPayload(0x1c, 0x144); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
mstore(0x120, m9) | |
mstore(0x140, m10) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
bytes32 m9; | |
bytes32 m10; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
m9 := mload(0x120) | |
m10 := mload(0x140) | |
// Selector of `log(string,string,string,address)`. | |
mstore(0x00, 0x6d572f44) | |
mstore(0x20, 0x80) | |
mstore(0x40, 0xc0) | |
mstore(0x60, 0x100) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p1) | |
writeString(0x120, p2) | |
} | |
_sendLogPayload(0x1c, 0x144); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
mstore(0x120, m9) | |
mstore(0x140, m10) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
bytes32 m9; | |
bytes32 m10; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
m9 := mload(0x120) | |
m10 := mload(0x140) | |
// Selector of `log(string,string,string,bool)`. | |
mstore(0x00, 0x2c1754ed) | |
mstore(0x20, 0x80) | |
mstore(0x40, 0xc0) | |
mstore(0x60, 0x100) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p1) | |
writeString(0x120, p2) | |
} | |
_sendLogPayload(0x1c, 0x144); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
mstore(0x120, m9) | |
mstore(0x140, m10) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
bytes32 m9; | |
bytes32 m10; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
m9 := mload(0x120) | |
m10 := mload(0x140) | |
// Selector of `log(string,string,string,uint256)`. | |
mstore(0x00, 0x8eafb02b) | |
mstore(0x20, 0x80) | |
mstore(0x40, 0xc0) | |
mstore(0x60, 0x100) | |
mstore(0x80, p3) | |
writeString(0xa0, p0) | |
writeString(0xe0, p1) | |
writeString(0x120, p2) | |
} | |
_sendLogPayload(0x1c, 0x144); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
mstore(0x120, m9) | |
mstore(0x140, m10) | |
} | |
} | |
function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure { | |
bytes32 m0; | |
bytes32 m1; | |
bytes32 m2; | |
bytes32 m3; | |
bytes32 m4; | |
bytes32 m5; | |
bytes32 m6; | |
bytes32 m7; | |
bytes32 m8; | |
bytes32 m9; | |
bytes32 m10; | |
bytes32 m11; | |
bytes32 m12; | |
assembly { | |
function writeString(pos, w) { | |
let length := 0 | |
for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } | |
mstore(pos, length) | |
let shift := sub(256, shl(3, length)) | |
mstore(add(pos, 0x20), shl(shift, shr(shift, w))) | |
} | |
m0 := mload(0x00) | |
m1 := mload(0x20) | |
m2 := mload(0x40) | |
m3 := mload(0x60) | |
m4 := mload(0x80) | |
m5 := mload(0xa0) | |
m6 := mload(0xc0) | |
m7 := mload(0xe0) | |
m8 := mload(0x100) | |
m9 := mload(0x120) | |
m10 := mload(0x140) | |
m11 := mload(0x160) | |
m12 := mload(0x180) | |
// Selector of `log(string,string,string,string)`. | |
mstore(0x00, 0xde68f20a) | |
mstore(0x20, 0x80) | |
mstore(0x40, 0xc0) | |
mstore(0x60, 0x100) | |
mstore(0x80, 0x140) | |
writeString(0xa0, p0) | |
writeString(0xe0, p1) | |
writeString(0x120, p2) | |
writeString(0x160, p3) | |
} | |
_sendLogPayload(0x1c, 0x184); | |
assembly { | |
mstore(0x00, m0) | |
mstore(0x20, m1) | |
mstore(0x40, m2) | |
mstore(0x60, m3) | |
mstore(0x80, m4) | |
mstore(0xa0, m5) | |
mstore(0xc0, m6) | |
mstore(0xe0, m7) | |
mstore(0x100, m8) | |
mstore(0x120, m9) | |
mstore(0x140, m10) | |
mstore(0x160, m11) | |
mstore(0x180, m12) | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) | |
pragma solidity ^0.8.20; | |
import {IERC20} from "./IERC20.sol"; | |
import {IERC20Permit} from "./IERC20Permit.sol"; | |
import {Address} from "./Address.sol"; | |
/** | |
* @title SafeERC20 | |
* @dev Wrappers around ERC20 operations that throw on failure (when the token | |
* contract returns false). Tokens that return no value (and instead revert or | |
* throw on failure) are also supported, non-reverting calls are assumed to be | |
* successful. | |
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, | |
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc. | |
*/ | |
library SafeERC20 { | |
using Address for address; | |
/** | |
* @dev An operation with an ERC20 token failed. | |
*/ | |
error SafeERC20FailedOperation(address token); | |
/** | |
* @dev Indicates a failed `decreaseAllowance` request. | |
*/ | |
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); | |
/** | |
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, | |
* non-reverting calls are assumed to be successful. | |
*/ | |
function safeTransfer(IERC20 token, address to, uint256 value) internal { | |
_callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); | |
} | |
/** | |
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the | |
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. | |
*/ | |
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { | |
_callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); | |
} | |
/** | |
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, | |
* non-reverting calls are assumed to be successful. | |
*/ | |
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { | |
uint256 oldAllowance = token.allowance(address(this), spender); | |
forceApprove(token, spender, oldAllowance + value); | |
} | |
/** | |
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no | |
* value, non-reverting calls are assumed to be successful. | |
*/ | |
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { | |
unchecked { | |
uint256 currentAllowance = token.allowance(address(this), spender); | |
if (currentAllowance < requestedDecrease) { | |
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); | |
} | |
forceApprove(token, spender, currentAllowance - requestedDecrease); | |
} | |
} | |
/** | |
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, | |
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval | |
* to be set to zero before setting it to a non-zero value, such as USDT. | |
*/ | |
function forceApprove(IERC20 token, address spender, uint256 value) internal { | |
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); | |
if (!_callOptionalReturnBool(token, approvalCall)) { | |
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); | |
_callOptionalReturn(token, approvalCall); | |
} | |
} | |
/** | |
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement | |
* on the return value: the return value is optional (but if data is returned, it must not be false). | |
* @param token The token targeted by the call. | |
* @param data The call data (encoded using abi.encode or one of its variants). | |
*/ | |
function _callOptionalReturn(IERC20 token, bytes memory data) private { | |
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since | |
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that | |
// the target address contains contract code and also asserts for success in the low-level call. | |
bytes memory returndata = address(token).functionCall(data); | |
if (returndata.length != 0 && !abi.decode(returndata, (bool))) { | |
revert SafeERC20FailedOperation(address(token)); | |
} | |
} | |
/** | |
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement | |
* on the return value: the return value is optional (but if data is returned, it must not be false). | |
* @param token The token targeted by the call. | |
* @param data The call data (encoded using abi.encode or one of its variants). | |
* | |
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. | |
*/ | |
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { | |
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since | |
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false | |
// and not revert is the subcall reverts. | |
(bool success, bytes memory returndata) = address(token).call(data); | |
return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.6.2 <0.9.0; | |
// 💬 ABOUT | |
// Forge Std's default Script. | |
// 🧩 MODULES | |
import {console} from "./console.sol"; | |
import {console2} from "./console2.sol"; | |
import {safeconsole} from "./safeconsole.sol"; | |
import {StdChains} from "./StdChains.sol"; | |
import {StdCheatsSafe} from "./StdCheats.sol"; | |
import {stdJson} from "./StdJson.sol"; | |
import {stdMath} from "./StdMath.sol"; | |
import {StdStorage, stdStorageSafe} from "./StdStorage.sol"; | |
import {StdStyle} from "./StdStyle.sol"; | |
import {StdUtils} from "./StdUtils.sol"; | |
import {VmSafe} from "./Vm.sol"; | |
// 📦 BOILERPLATE | |
import {ScriptBase} from "./Base.sol"; | |
// ⭐️ SCRIPT | |
abstract contract Script is ScriptBase, StdChains, StdCheatsSafe, StdUtils { | |
// Note: IS_SCRIPT() must return true. | |
bool public IS_SCRIPT = true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.6.2 <0.9.0; | |
import {VmSafe} from "./Vm.sol"; | |
/** | |
* StdChains provides information about EVM compatible chains that can be used in scripts/tests. | |
* For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are | |
* identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of | |
* the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the | |
* alias used in this contract, which can be found as the first argument to the | |
* `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function. | |
* | |
* There are two main ways to use this contract: | |
* 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or | |
* `setChain(string memory chainAlias, Chain memory chain)` | |
* 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`. | |
* | |
* The first time either of those are used, chains are initialized with the default set of RPC URLs. | |
* This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in | |
* `defaultRpcUrls`. | |
* | |
* The `setChain` function is straightforward, and it simply saves off the given chain data. | |
* | |
* The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say | |
* we want to retrieve the RPC URL for `mainnet`: | |
* - If you have specified data with `setChain`, it will return that. | |
* - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it | |
* is valid (e.g. a URL is specified, or an environment variable is given and exists). | |
* - If neither of the above conditions is met, the default data is returned. | |
* | |
* Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults. | |
*/ | |
abstract contract StdChains { | |
VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); | |
bool private stdChainsInitialized; | |
struct ChainData { | |
string name; | |
uint256 chainId; | |
string rpcUrl; | |
} | |
struct Chain { | |
// The chain name. | |
string name; | |
// The chain's Chain ID. | |
uint256 chainId; | |
// The chain's alias. (i.e. what gets specified in `foundry.toml`). | |
string chainAlias; | |
// A default RPC endpoint for this chain. | |
// NOTE: This default RPC URL is included for convenience to facilitate quick tests and | |
// experimentation. Do not use this RPC URL for production test suites, CI, or other heavy | |
// usage as you will be throttled and this is a disservice to others who need this endpoint. | |
string rpcUrl; | |
} | |
// Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data. | |
mapping(string => Chain) private chains; | |
// Maps from the chain's alias to it's default RPC URL. | |
mapping(string => string) private defaultRpcUrls; | |
// Maps from a chain ID to it's alias. | |
mapping(uint256 => string) private idToAlias; | |
bool private fallbackToDefaultRpcUrls = true; | |
// The RPC URL will be fetched from config or defaultRpcUrls if possible. | |
function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) { | |
require(bytes(chainAlias).length != 0, "StdChains getChain(string): Chain alias cannot be the empty string."); | |
initializeStdChains(); | |
chain = chains[chainAlias]; | |
require( | |
chain.chainId != 0, | |
string(abi.encodePacked("StdChains getChain(string): Chain with alias \"", chainAlias, "\" not found.")) | |
); | |
chain = getChainWithUpdatedRpcUrl(chainAlias, chain); | |
} | |
function getChain(uint256 chainId) internal virtual returns (Chain memory chain) { | |
require(chainId != 0, "StdChains getChain(uint256): Chain ID cannot be 0."); | |
initializeStdChains(); | |
string memory chainAlias = idToAlias[chainId]; | |
chain = chains[chainAlias]; | |
require( | |
chain.chainId != 0, | |
string(abi.encodePacked("StdChains getChain(uint256): Chain with ID ", vm.toString(chainId), " not found.")) | |
); | |
chain = getChainWithUpdatedRpcUrl(chainAlias, chain); | |
} | |
// set chain info, with priority to argument's rpcUrl field. | |
function setChain(string memory chainAlias, ChainData memory chain) internal virtual { | |
require( | |
bytes(chainAlias).length != 0, | |
"StdChains setChain(string,ChainData): Chain alias cannot be the empty string." | |
); | |
require(chain.chainId != 0, "StdChains setChain(string,ChainData): Chain ID cannot be 0."); | |
initializeStdChains(); | |
string memory foundAlias = idToAlias[chain.chainId]; | |
require( | |
bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)), | |
string( | |
abi.encodePacked( | |
"StdChains setChain(string,ChainData): Chain ID ", | |
vm.toString(chain.chainId), | |
" already used by \"", | |
foundAlias, | |
"\"." | |
) | |
) | |
); | |
uint256 oldChainId = chains[chainAlias].chainId; | |
delete idToAlias[oldChainId]; | |
chains[chainAlias] = | |
Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl}); | |
idToAlias[chain.chainId] = chainAlias; | |
} | |
// set chain info, with priority to argument's rpcUrl field. | |
function setChain(string memory chainAlias, Chain memory chain) internal virtual { | |
setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl})); | |
} | |
function _toUpper(string memory str) private pure returns (string memory) { | |
bytes memory strb = bytes(str); | |
bytes memory copy = new bytes(strb.length); | |
for (uint256 i = 0; i < strb.length; i++) { | |
bytes1 b = strb[i]; | |
if (b >= 0x61 && b <= 0x7A) { | |
copy[i] = bytes1(uint8(b) - 32); | |
} else { | |
copy[i] = b; | |
} | |
} | |
return string(copy); | |
} | |
// lookup rpcUrl, in descending order of priority: | |
// current -> config (foundry.toml) -> environment variable -> default | |
function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) { | |
if (bytes(chain.rpcUrl).length == 0) { | |
try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) { | |
chain.rpcUrl = configRpcUrl; | |
} catch (bytes memory err) { | |
string memory envName = string(abi.encodePacked(_toUpper(chainAlias), "_RPC_URL")); | |
if (fallbackToDefaultRpcUrls) { | |
chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]); | |
} else { | |
chain.rpcUrl = vm.envString(envName); | |
} | |
// distinguish 'not found' from 'cannot read' | |
bytes memory notFoundError = | |
abi.encodeWithSignature("CheatCodeError", string(abi.encodePacked("invalid rpc url ", chainAlias))); | |
if (keccak256(notFoundError) != keccak256(err) || bytes(chain.rpcUrl).length == 0) { | |
/// @solidity memory-safe-assembly | |
assembly { | |
revert(add(32, err), mload(err)) | |
} | |
} | |
} | |
} | |
return chain; | |
} | |
function setFallbackToDefaultRpcUrls(bool useDefault) internal { | |
fallbackToDefaultRpcUrls = useDefault; | |
} | |
function initializeStdChains() private { | |
if (stdChainsInitialized) return; | |
stdChainsInitialized = true; | |
// If adding an RPC here, make sure to test the default RPC URL in `testRpcs` | |
setChainWithDefaultRpcUrl("anvil", ChainData("Anvil", 31337, "http://127.0.0.1:8545")); | |
setChainWithDefaultRpcUrl( | |
"mainnet", ChainData("Mainnet", 1, "https://mainnet.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001") | |
); | |
setChainWithDefaultRpcUrl( | |
"goerli", ChainData("Goerli", 5, "https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001") | |
); | |
setChainWithDefaultRpcUrl( | |
"sepolia", ChainData("Sepolia", 11155111, "https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001") | |
); | |
setChainWithDefaultRpcUrl("optimism", ChainData("Optimism", 10, "https://mainnet.optimism.io")); | |
setChainWithDefaultRpcUrl("optimism_goerli", ChainData("Optimism Goerli", 420, "https://goerli.optimism.io")); | |
setChainWithDefaultRpcUrl("arbitrum_one", ChainData("Arbitrum One", 42161, "https://arb1.arbitrum.io/rpc")); | |
setChainWithDefaultRpcUrl( | |
"arbitrum_one_goerli", ChainData("Arbitrum One Goerli", 421613, "https://goerli-rollup.arbitrum.io/rpc") | |
); | |
setChainWithDefaultRpcUrl("arbitrum_nova", ChainData("Arbitrum Nova", 42170, "https://nova.arbitrum.io/rpc")); | |
setChainWithDefaultRpcUrl("polygon", ChainData("Polygon", 137, "https://polygon-rpc.com")); | |
setChainWithDefaultRpcUrl( | |
"polygon_mumbai", ChainData("Polygon Mumbai", 80001, "https://rpc-mumbai.maticvigil.com") | |
); | |
setChainWithDefaultRpcUrl("avalanche", ChainData("Avalanche", 43114, "https://api.avax.network/ext/bc/C/rpc")); | |
setChainWithDefaultRpcUrl( | |
"avalanche_fuji", ChainData("Avalanche Fuji", 43113, "https://api.avax-test.network/ext/bc/C/rpc") | |
); | |
setChainWithDefaultRpcUrl( | |
"bnb_smart_chain", ChainData("BNB Smart Chain", 56, "https://bsc-dataseed1.binance.org") | |
); | |
setChainWithDefaultRpcUrl( | |
"bnb_smart_chain_testnet", | |
ChainData("BNB Smart Chain Testnet", 97, "https://rpc.ankr.com/bsc_testnet_chapel") | |
); | |
setChainWithDefaultRpcUrl("gnosis_chain", ChainData("Gnosis Chain", 100, "https://rpc.gnosischain.com")); | |
setChainWithDefaultRpcUrl("moonbeam", ChainData("Moonbeam", 1284, "https://rpc.api.moonbeam.network")); | |
setChainWithDefaultRpcUrl( | |
"moonriver", ChainData("Moonriver", 1285, "https://rpc.api.moonriver.moonbeam.network") | |
); | |
setChainWithDefaultRpcUrl("moonbase", ChainData("Moonbase", 1287, "https://rpc.testnet.moonbeam.network")); | |
setChainWithDefaultRpcUrl("base_goerli", ChainData("Base Goerli", 84531, "https://goerli.base.org")); | |
setChainWithDefaultRpcUrl("base", ChainData("Base", 8453, "https://mainnet.base.org")); | |
} | |
// set chain info, with priority to chainAlias' rpc url in foundry.toml | |
function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private { | |
string memory rpcUrl = chain.rpcUrl; | |
defaultRpcUrls[chainAlias] = rpcUrl; | |
chain.rpcUrl = ""; | |
setChain(chainAlias, chain); | |
chain.rpcUrl = rpcUrl; // restore argument | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.6.2 <0.9.0; | |
pragma experimental ABIEncoderV2; | |
import {StdStorage, stdStorage} from "./StdStorage.sol"; | |
import {console2} from "./console2.sol"; | |
import {Vm} from "./Vm.sol"; | |
abstract contract StdCheatsSafe { | |
Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); | |
uint256 private constant UINT256_MAX = | |
115792089237316195423570985008687907853269984665640564039457584007913129639935; | |
bool private gasMeteringOff; | |
// Data structures to parse Transaction objects from the broadcast artifact | |
// that conform to EIP1559. The Raw structs is what is parsed from the JSON | |
// and then converted to the one that is used by the user for better UX. | |
struct RawTx1559 { | |
string[] arguments; | |
address contractAddress; | |
string contractName; | |
// json value name = function | |
string functionSig; | |
bytes32 hash; | |
// json value name = tx | |
RawTx1559Detail txDetail; | |
// json value name = type | |
string opcode; | |
} | |
struct RawTx1559Detail { | |
AccessList[] accessList; | |
bytes data; | |
address from; | |
bytes gas; | |
bytes nonce; | |
address to; | |
bytes txType; | |
bytes value; | |
} | |
struct Tx1559 { | |
string[] arguments; | |
address contractAddress; | |
string contractName; | |
string functionSig; | |
bytes32 hash; | |
Tx1559Detail txDetail; | |
string opcode; | |
} | |
struct Tx1559Detail { | |
AccessList[] accessList; | |
bytes data; | |
address from; | |
uint256 gas; | |
uint256 nonce; | |
address to; | |
uint256 txType; | |
uint256 value; | |
} | |
// Data structures to parse Transaction objects from the broadcast artifact | |
// that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON | |
// and then converted to the one that is used by the user for better UX. | |
struct TxLegacy { | |
string[] arguments; | |
address contractAddress; | |
string contractName; | |
string functionSig; | |
string hash; | |
string opcode; | |
TxDetailLegacy transaction; | |
} | |
struct TxDetailLegacy { | |
AccessList[] accessList; | |
uint256 chainId; | |
bytes data; | |
address from; | |
uint256 gas; | |
uint256 gasPrice; | |
bytes32 hash; | |
uint256 nonce; | |
bytes1 opcode; | |
bytes32 r; | |
bytes32 s; | |
uint256 txType; | |
address to; | |
uint8 v; | |
uint256 value; | |
} | |
struct AccessList { | |
address accessAddress; | |
bytes32[] storageKeys; | |
} | |
// Data structures to parse Receipt objects from the broadcast artifact. | |
// The Raw structs is what is parsed from the JSON | |
// and then converted to the one that is used by the user for better UX. | |
struct RawReceipt { | |
bytes32 blockHash; | |
bytes blockNumber; | |
address contractAddress; | |
bytes cumulativeGasUsed; | |
bytes effectiveGasPrice; | |
address from; | |
bytes gasUsed; | |
RawReceiptLog[] logs; | |
bytes logsBloom; | |
bytes status; | |
address to; | |
bytes32 transactionHash; | |
bytes transactionIndex; | |
} | |
struct Receipt { | |
bytes32 blockHash; | |
uint256 blockNumber; | |
address contractAddress; | |
uint256 cumulativeGasUsed; | |
uint256 effectiveGasPrice; | |
address from; | |
uint256 gasUsed; | |
ReceiptLog[] logs; | |
bytes logsBloom; | |
uint256 status; | |
address to; | |
bytes32 transactionHash; | |
uint256 transactionIndex; | |
} | |
// Data structures to parse the entire broadcast artifact, assuming the | |
// transactions conform to EIP1559. | |
struct EIP1559ScriptArtifact { | |
string[] libraries; | |
string path; | |
string[] pending; | |
Receipt[] receipts; | |
uint256 timestamp; | |
Tx1559[] transactions; | |
TxReturn[] txReturns; | |
} | |
struct RawEIP1559ScriptArtifact { | |
string[] libraries; | |
string path; | |
string[] pending; | |
RawReceipt[] receipts; | |
TxReturn[] txReturns; | |
uint256 timestamp; | |
RawTx1559[] transactions; | |
} | |
struct RawReceiptLog { | |
// json value = address | |
address logAddress; | |
bytes32 blockHash; | |
bytes blockNumber; | |
bytes data; | |
bytes logIndex; | |
bool removed; | |
bytes32[] topics; | |
bytes32 transactionHash; | |
bytes transactionIndex; | |
bytes transactionLogIndex; | |
} | |
struct ReceiptLog { | |
// json value = address | |
address logAddress; | |
bytes32 blockHash; | |
uint256 blockNumber; | |
bytes data; | |
uint256 logIndex; | |
bytes32[] topics; | |
uint256 transactionIndex; | |
uint256 transactionLogIndex; | |
bool removed; | |
} | |
struct TxReturn { | |
string internalType; | |
string value; | |
} | |
struct Account { | |
address addr; | |
uint256 key; | |
} | |
enum AddressType { | |
Payable, | |
NonPayable, | |
ZeroAddress, | |
Precompile, | |
ForgeAddress | |
} | |
// Checks that `addr` is not blacklisted by token contracts that have a blacklist. | |
function assumeNotBlacklisted(address token, address addr) internal view virtual { | |
// Nothing to check if `token` is not a contract. | |
uint256 tokenCodeSize; | |
assembly { | |
tokenCodeSize := extcodesize(token) | |
} | |
require(tokenCodeSize > 0, "StdCheats assumeNotBlacklisted(address,address): Token address is not a contract."); | |
bool success; | |
bytes memory returnData; | |
// 4-byte selector for `isBlacklisted(address)`, used by USDC. | |
(success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr)); | |
vm.assume(!success || abi.decode(returnData, (bool)) == false); | |
// 4-byte selector for `isBlackListed(address)`, used by USDT. | |
(success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr)); | |
vm.assume(!success || abi.decode(returnData, (bool)) == false); | |
} | |
// Checks that `addr` is not blacklisted by token contracts that have a blacklist. | |
// This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for | |
// backwards compatibility, since this name was used in the original PR which has already has | |
// a release. This function can be removed in a future release once we want a breaking change. | |
function assumeNoBlacklisted(address token, address addr) internal view virtual { | |
assumeNotBlacklisted(token, addr); | |
} | |
function assumeAddressIsNot(address addr, AddressType addressType) internal virtual { | |
if (addressType == AddressType.Payable) { | |
assumeNotPayable(addr); | |
} else if (addressType == AddressType.NonPayable) { | |
assumePayable(addr); | |
} else if (addressType == AddressType.ZeroAddress) { | |
assumeNotZeroAddress(addr); | |
} else if (addressType == AddressType.Precompile) { | |
assumeNotPrecompile(addr); | |
} else if (addressType == AddressType.ForgeAddress) { | |
assumeNotForgeAddress(addr); | |
} | |
} | |
function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual { | |
assumeAddressIsNot(addr, addressType1); | |
assumeAddressIsNot(addr, addressType2); | |
} | |
function assumeAddressIsNot( | |
address addr, | |
AddressType addressType1, | |
AddressType addressType2, | |
AddressType addressType3 | |
) internal virtual { | |
assumeAddressIsNot(addr, addressType1); | |
assumeAddressIsNot(addr, addressType2); | |
assumeAddressIsNot(addr, addressType3); | |
} | |
function assumeAddressIsNot( | |
address addr, | |
AddressType addressType1, | |
AddressType addressType2, | |
AddressType addressType3, | |
AddressType addressType4 | |
) internal virtual { | |
assumeAddressIsNot(addr, addressType1); | |
assumeAddressIsNot(addr, addressType2); | |
assumeAddressIsNot(addr, addressType3); | |
assumeAddressIsNot(addr, addressType4); | |
} | |
// This function checks whether an address, `addr`, is payable. It works by sending 1 wei to | |
// `addr` and checking the `success` return value. | |
// NOTE: This function may result in state changes depending on the fallback/receive logic | |
// implemented by `addr`, which should be taken into account when this function is used. | |
function _isPayable(address addr) private returns (bool) { | |
require( | |
addr.balance < UINT256_MAX, | |
"StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds" | |
); | |
uint256 origBalanceTest = address(this).balance; | |
uint256 origBalanceAddr = address(addr).balance; | |
vm.deal(address(this), 1); | |
(bool success,) = payable(addr).call{value: 1}(""); | |
// reset balances | |
vm.deal(address(this), origBalanceTest); | |
vm.deal(addr, origBalanceAddr); | |
return success; | |
} | |
// NOTE: This function may result in state changes depending on the fallback/receive logic | |
// implemented by `addr`, which should be taken into account when this function is used. See the | |
// `_isPayable` method for more information. | |
function assumePayable(address addr) internal virtual { | |
vm.assume(_isPayable(addr)); | |
} | |
function assumeNotPayable(address addr) internal virtual { | |
vm.assume(!_isPayable(addr)); | |
} | |
function assumeNotZeroAddress(address addr) internal pure virtual { | |
vm.assume(addr != address(0)); | |
} | |
function assumeNotPrecompile(address addr) internal pure virtual { | |
assumeNotPrecompile(addr, _pureChainId()); | |
} | |
function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual { | |
// Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific | |
// address), but the same rationale for excluding them applies so we include those too. | |
// These should be present on all EVM-compatible chains. | |
vm.assume(addr < address(0x1) || addr > address(0x9)); | |
// forgefmt: disable-start | |
if (chainId == 10 || chainId == 420) { | |
// https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21 | |
vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800)); | |
} else if (chainId == 42161 || chainId == 421613) { | |
// https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains | |
vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068)); | |
} else if (chainId == 43114 || chainId == 43113) { | |
// https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59 | |
vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff)); | |
vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF)); | |
vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff)); | |
} | |
// forgefmt: disable-end | |
} | |
function assumeNotForgeAddress(address addr) internal pure virtual { | |
// vm, console, and Create2Deployer addresses | |
vm.assume( | |
addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67 | |
&& addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C | |
); | |
} | |
function readEIP1559ScriptArtifact(string memory path) | |
internal | |
view | |
virtual | |
returns (EIP1559ScriptArtifact memory) | |
{ | |
string memory data = vm.readFile(path); | |
bytes memory parsedData = vm.parseJson(data); | |
RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact)); | |
EIP1559ScriptArtifact memory artifact; | |
artifact.libraries = rawArtifact.libraries; | |
artifact.path = rawArtifact.path; | |
artifact.timestamp = rawArtifact.timestamp; | |
artifact.pending = rawArtifact.pending; | |
artifact.txReturns = rawArtifact.txReturns; | |
artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts); | |
artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions); | |
return artifact; | |
} | |
function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) { | |
Tx1559[] memory txs = new Tx1559[](rawTxs.length); | |
for (uint256 i; i < rawTxs.length; i++) { | |
txs[i] = rawToConvertedEIPTx1559(rawTxs[i]); | |
} | |
return txs; | |
} | |
function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) { | |
Tx1559 memory transaction; | |
transaction.arguments = rawTx.arguments; | |
transaction.contractName = rawTx.contractName; | |
transaction.functionSig = rawTx.functionSig; | |
transaction.hash = rawTx.hash; | |
transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail); | |
transaction.opcode = rawTx.opcode; | |
return transaction; | |
} | |
function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail) | |
internal | |
pure | |
virtual | |
returns (Tx1559Detail memory) | |
{ | |
Tx1559Detail memory txDetail; | |
txDetail.data = rawDetail.data; | |
txDetail.from = rawDetail.from; | |
txDetail.to = rawDetail.to; | |
txDetail.nonce = _bytesToUint(rawDetail.nonce); | |
txDetail.txType = _bytesToUint(rawDetail.txType); | |
txDetail.value = _bytesToUint(rawDetail.value); | |
txDetail.gas = _bytesToUint(rawDetail.gas); | |
txDetail.accessList = rawDetail.accessList; | |
return txDetail; | |
} | |
function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) { | |
string memory deployData = vm.readFile(path); | |
bytes memory parsedDeployData = vm.parseJson(deployData, ".transactions"); | |
RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[])); | |
return rawToConvertedEIPTx1559s(rawTxs); | |
} | |
function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) { | |
string memory deployData = vm.readFile(path); | |
string memory key = string(abi.encodePacked(".transactions[", vm.toString(index), "]")); | |
bytes memory parsedDeployData = vm.parseJson(deployData, key); | |
RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559)); | |
return rawToConvertedEIPTx1559(rawTx); | |
} | |
// Analogous to readTransactions, but for receipts. | |
function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) { | |
string memory deployData = vm.readFile(path); | |
bytes memory parsedDeployData = vm.parseJson(deployData, ".receipts"); | |
RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[])); | |
return rawToConvertedReceipts(rawReceipts); | |
} | |
function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) { | |
string memory deployData = vm.readFile(path); | |
string memory key = string(abi.encodePacked(".receipts[", vm.toString(index), "]")); | |
bytes memory parsedDeployData = vm.parseJson(deployData, key); | |
RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt)); | |
return rawToConvertedReceipt(rawReceipt); | |
} | |
function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) { | |
Receipt[] memory receipts = new Receipt[](rawReceipts.length); | |
for (uint256 i; i < rawReceipts.length; i++) { | |
receipts[i] = rawToConvertedReceipt(rawReceipts[i]); | |
} | |
return receipts; | |
} | |
function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) { | |
Receipt memory receipt; | |
receipt.blockHash = rawReceipt.blockHash; | |
receipt.to = rawReceipt.to; | |
receipt.from = rawReceipt.from; | |
receipt.contractAddress = rawReceipt.contractAddress; | |
receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice); | |
receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed); | |
receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed); | |
receipt.status = _bytesToUint(rawReceipt.status); | |
receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex); | |
receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber); | |
receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs); | |
receipt.logsBloom = rawReceipt.logsBloom; | |
receipt.transactionHash = rawReceipt.transactionHash; | |
return receipt; | |
} | |
function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs) | |
internal | |
pure | |
virtual | |
returns (ReceiptLog[] memory) | |
{ | |
ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length); | |
for (uint256 i; i < rawLogs.length; i++) { | |
logs[i].logAddress = rawLogs[i].logAddress; | |
logs[i].blockHash = rawLogs[i].blockHash; | |
logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber); | |
logs[i].data = rawLogs[i].data; | |
logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex); | |
logs[i].topics = rawLogs[i].topics; | |
logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex); | |
logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex); | |
logs[i].removed = rawLogs[i].removed; | |
} | |
return logs; | |
} | |
// Deploy a contract by fetching the contract bytecode from | |
// the artifacts directory | |
// e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))` | |
function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) { | |
bytes memory bytecode = abi.encodePacked(vm.getCode(what), args); | |
/// @solidity memory-safe-assembly | |
assembly { | |
addr := create(0, add(bytecode, 0x20), mload(bytecode)) | |
} | |
require(addr != address(0), "StdCheats deployCode(string,bytes): Deployment failed."); | |
} | |
function deployCode(string memory what) internal virtual returns (address addr) { | |
bytes memory bytecode = vm.getCode(what); | |
/// @solidity memory-safe-assembly | |
assembly { | |
addr := create(0, add(bytecode, 0x20), mload(bytecode)) | |
} | |
require(addr != address(0), "StdCheats deployCode(string): Deployment failed."); | |
} | |
/// @dev deploy contract with value on construction | |
function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) { | |
bytes memory bytecode = abi.encodePacked(vm.getCode(what), args); | |
/// @solidity memory-safe-assembly | |
assembly { | |
addr := create(val, add(bytecode, 0x20), mload(bytecode)) | |
} | |
require(addr != address(0), "StdCheats deployCode(string,bytes,uint256): Deployment failed."); | |
} | |
function deployCode(string memory what, uint256 val) internal virtual returns (address addr) { | |
bytes memory bytecode = vm.getCode(what); | |
/// @solidity memory-safe-assembly | |
assembly { | |
addr := create(val, add(bytecode, 0x20), mload(bytecode)) | |
} | |
require(addr != address(0), "StdCheats deployCode(string,uint256): Deployment failed."); | |
} | |
// creates a labeled address and the corresponding private key | |
function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) { | |
privateKey = uint256(keccak256(abi.encodePacked(name))); | |
addr = vm.addr(privateKey); | |
vm.label(addr, name); | |
} | |
// creates a labeled address | |
function makeAddr(string memory name) internal virtual returns (address addr) { | |
(addr,) = makeAddrAndKey(name); | |
} | |
// Destroys an account immediately, sending the balance to beneficiary. | |
// Destroying means: balance will be zero, code will be empty, and nonce will be 0 | |
// This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce | |
// only after tx ends, this will run immediately. | |
function destroyAccount(address who, address beneficiary) internal virtual { | |
uint256 currBalance = who.balance; | |
vm.etch(who, abi.encode()); | |
vm.deal(who, 0); | |
vm.resetNonce(who); | |
uint256 beneficiaryBalance = beneficiary.balance; | |
vm.deal(beneficiary, currBalance + beneficiaryBalance); | |
} | |
// creates a struct containing both a labeled address and the corresponding private key | |
function makeAccount(string memory name) internal virtual returns (Account memory account) { | |
(account.addr, account.key) = makeAddrAndKey(name); | |
} | |
function deriveRememberKey(string memory mnemonic, uint32 index) | |
internal | |
virtual | |
returns (address who, uint256 privateKey) | |
{ | |
privateKey = vm.deriveKey(mnemonic, index); | |
who = vm.rememberKey(privateKey); | |
} | |
function _bytesToUint(bytes memory b) private pure returns (uint256) { | |
require(b.length <= 32, "StdCheats _bytesToUint(bytes): Bytes length exceeds 32."); | |
return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256)); | |
} | |
function isFork() internal view virtual returns (bool status) { | |
try vm.activeFork() { | |
status = true; | |
} catch (bytes memory) {} | |
} | |
modifier skipWhenForking() { | |
if (!isFork()) { | |
_; | |
} | |
} | |
modifier skipWhenNotForking() { | |
if (isFork()) { | |
_; | |
} | |
} | |
modifier noGasMetering() { | |
vm.pauseGasMetering(); | |
// To prevent turning gas monitoring back on with nested functions that use this modifier, | |
// we check if gasMetering started in the off position. If it did, we don't want to turn | |
// it back on until we exit the top level function that used the modifier | |
// | |
// i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well. | |
// funcA will have `gasStartedOff` as false, funcB will have it as true, | |
// so we only turn metering back on at the end of the funcA | |
bool gasStartedOff = gasMeteringOff; | |
gasMeteringOff = true; | |
_; | |
// if gas metering was on when this modifier was called, turn it back on at the end | |
if (!gasStartedOff) { | |
gasMeteringOff = false; | |
vm.resumeGasMetering(); | |
} | |
} | |
// We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no | |
// compiler warnings when accessing chain ID in any solidity version supported by forge-std. We | |
// can't simply access the chain ID in a normal view or pure function because the solc View Pure | |
// Checker changed `chainid` from pure to view in 0.8.0. | |
function _viewChainId() private view returns (uint256 chainId) { | |
// Assembly required since `block.chainid` was introduced in 0.8.0. | |
assembly { | |
chainId := chainid() | |
} | |
address(this); // Silence warnings in older Solc versions. | |
} | |
function _pureChainId() private pure returns (uint256 chainId) { | |
function() internal view returns (uint256) fnIn = _viewChainId; | |
function() internal pure returns (uint256) pureChainId; | |
assembly { | |
pureChainId := fnIn | |
} | |
chainId = pureChainId(); | |
} | |
} | |
// Wrappers around cheatcodes to avoid footguns | |
abstract contract StdCheats is StdCheatsSafe { | |
using stdStorage for StdStorage; | |
StdStorage private stdstore; | |
Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); | |
address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; | |
// Skip forward or rewind time by the specified number of seconds | |
function skip(uint256 time) internal virtual { | |
vm.warp(block.timestamp + time); | |
} | |
function rewind(uint256 time) internal virtual { | |
vm.warp(block.timestamp - time); | |
} | |
// Setup a prank from an address that has some ether | |
function hoax(address msgSender) internal virtual { | |
vm.deal(msgSender, 1 << 128); | |
vm.prank(msgSender); | |
} | |
function hoax(address msgSender, uint256 give) internal virtual { | |
vm.deal(msgSender, give); | |
vm.prank(msgSender); | |
} | |
function hoax(address msgSender, address origin) internal virtual { | |
vm.deal(msgSender, 1 << 128); | |
vm.prank(msgSender, origin); | |
} | |
function hoax(address msgSender, address origin, uint256 give) internal virtual { | |
vm.deal(msgSender, give); | |
vm.prank(msgSender, origin); | |
} | |
// Start perpetual prank from an address that has some ether | |
function startHoax(address msgSender) internal virtual { | |
vm.deal(msgSender, 1 << 128); | |
vm.startPrank(msgSender); | |
} | |
function startHoax(address msgSender, uint256 give) internal virtual { | |
vm.deal(msgSender, give); | |
vm.startPrank(msgSender); | |
} | |
// Start perpetual prank from an address that has some ether | |
// tx.origin is set to the origin parameter | |
function startHoax(address msgSender, address origin) internal virtual { | |
vm.deal(msgSender, 1 << 128); | |
vm.startPrank(msgSender, origin); | |
} | |
function startHoax(address msgSender, address origin, uint256 give) internal virtual { | |
vm.deal(msgSender, give); | |
vm.startPrank(msgSender, origin); | |
} | |
function changePrank(address msgSender) internal virtual { | |
console2_log("changePrank is deprecated. Please use vm.startPrank instead."); | |
vm.stopPrank(); | |
vm.startPrank(msgSender); | |
} | |
function changePrank(address msgSender, address txOrigin) internal virtual { | |
vm.stopPrank(); | |
vm.startPrank(msgSender, txOrigin); | |
} | |
// The same as Vm's `deal` | |
// Use the alternative signature for ERC20 tokens | |
function deal(address to, uint256 give) internal virtual { | |
vm.deal(to, give); | |
} | |
// Set the balance of an account for any ERC20 token | |
// Use the alternative signature to update `totalSupply` | |
function deal(address token, address to, uint256 give) internal virtual { | |
deal(token, to, give, false); | |
} | |
// Set the balance of an account for any ERC1155 token | |
// Use the alternative signature to update `totalSupply` | |
function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual { | |
dealERC1155(token, to, id, give, false); | |
} | |
function deal(address token, address to, uint256 give, bool adjust) internal virtual { | |
// get current balance | |
(, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to)); | |
uint256 prevBal = abi.decode(balData, (uint256)); | |
// update balance | |
stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give); | |
// update total supply | |
if (adjust) { | |
(, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd)); | |
uint256 totSup = abi.decode(totSupData, (uint256)); | |
if (give < prevBal) { | |
totSup -= (prevBal - give); | |
} else { | |
totSup += (give - prevBal); | |
} | |
stdstore.target(token).sig(0x18160ddd).checked_write(totSup); | |
} | |
} | |
function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual { | |
// get current balance | |
(, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id)); | |
uint256 prevBal = abi.decode(balData, (uint256)); | |
// update balance | |
stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give); | |
// update total supply | |
if (adjust) { | |
(, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id)); | |
require( | |
totSupData.length != 0, | |
"StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply." | |
); | |
uint256 totSup = abi.decode(totSupData, (uint256)); | |
if (give < prevBal) { | |
totSup -= (prevBal - give); | |
} else { | |
totSup += (give - prevBal); | |
} | |
stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup); | |
} | |
} | |
function dealERC721(address token, address to, uint256 id) internal virtual { | |
// check if token id is already minted and the actual owner. | |
(bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id)); | |
require(successMinted, "StdCheats deal(address,address,uint,bool): id not minted."); | |
// get owner current balance | |
(, bytes memory fromBalData) = | |
token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address)))); | |
uint256 fromPrevBal = abi.decode(fromBalData, (uint256)); | |
// get new user current balance | |
(, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to)); | |
uint256 toPrevBal = abi.decode(toBalData, (uint256)); | |
// update balances | |
stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal); | |
stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal); | |
// update owner | |
stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to); | |
} | |
function deployCodeTo(string memory what, address where) internal virtual { | |
deployCodeTo(what, "", 0, where); | |
} | |
function deployCodeTo(string memory what, bytes memory args, address where) internal virtual { | |
deployCodeTo(what, args, 0, where); | |
} | |
function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual { | |
bytes memory creationCode = vm.getCode(what); | |
vm.etch(where, abi.encodePacked(creationCode, args)); | |
(bool success, bytes memory runtimeBytecode) = where.call{value: value}(""); | |
require(success, "StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode."); | |
vm.etch(where, runtimeBytecode); | |
} | |
// Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere. | |
function console2_log(string memory p0) private view { | |
(bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature("log(string)", p0)); | |
status; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.6.0 <0.9.0; | |
pragma experimental ABIEncoderV2; | |
import {VmSafe} from "./Vm.sol"; | |
// Helpers for parsing and writing JSON files | |
// To parse: | |
// ``` | |
// using stdJson for string; | |
// string memory json = vm.readFile("some_peth"); | |
// json.parseUint("<json_path>"); | |
// ``` | |
// To write: | |
// ``` | |
// using stdJson for string; | |
// string memory json = "deploymentArtifact"; | |
// Contract contract = new Contract(); | |
// json.serialize("contractAddress", address(contract)); | |
// json = json.serialize("deploymentTimes", uint(1)); | |
// // store the stringified JSON to the 'json' variable we have been using as a key | |
// // as we won't need it any longer | |
// string memory json2 = "finalArtifact"; | |
// string memory final = json2.serialize("depArtifact", json); | |
// final.write("<some_path>"); | |
// ``` | |
library stdJson { | |
VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); | |
function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) { | |
return vm.parseJson(json, key); | |
} | |
function readUint(string memory json, string memory key) internal pure returns (uint256) { | |
return vm.parseJsonUint(json, key); | |
} | |
function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) { | |
return vm.parseJsonUintArray(json, key); | |
} | |
function readInt(string memory json, string memory key) internal pure returns (int256) { | |
return vm.parseJsonInt(json, key); | |
} | |
function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) { | |
return vm.parseJsonIntArray(json, key); | |
} | |
function readBytes32(string memory json, string memory key) internal pure returns (bytes32) { | |
return vm.parseJsonBytes32(json, key); | |
} | |
function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) { | |
return vm.parseJsonBytes32Array(json, key); | |
} | |
function readString(string memory json, string memory key) internal pure returns (string memory) { | |
return vm.parseJsonString(json, key); | |
} | |
function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) { | |
return vm.parseJsonStringArray(json, key); | |
} | |
function readAddress(string memory json, string memory key) internal pure returns (address) { | |
return vm.parseJsonAddress(json, key); | |
} | |
function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) { | |
return vm.parseJsonAddressArray(json, key); | |
} | |
function readBool(string memory json, string memory key) internal pure returns (bool) { | |
return vm.parseJsonBool(json, key); | |
} | |
function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) { | |
return vm.parseJsonBoolArray(json, key); | |
} | |
function readBytes(string memory json, string memory key) internal pure returns (bytes memory) { | |
return vm.parseJsonBytes(json, key); | |
} | |
function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) { | |
return vm.parseJsonBytesArray(json, key); | |
} | |
function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) { | |
return vm.serializeJson(jsonKey, rootObject); | |
} | |
function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) { | |
return vm.serializeBool(jsonKey, key, value); | |
} | |
function serialize(string memory jsonKey, string memory key, bool[] memory value) | |
internal | |
returns (string memory) | |
{ | |
return vm.serializeBool(jsonKey, key, value); | |
} | |
function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) { | |
return vm.serializeUint(jsonKey, key, value); | |
} | |
function serialize(string memory jsonKey, string memory key, uint256[] memory value) | |
internal | |
returns (string memory) | |
{ | |
return vm.serializeUint(jsonKey, key, value); | |
} | |
function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) { | |
return vm.serializeInt(jsonKey, key, value); | |
} | |
function serialize(string memory jsonKey, string memory key, int256[] memory value) | |
internal | |
returns (string memory) | |
{ | |
return vm.serializeInt(jsonKey, key, value); | |
} | |
function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) { | |
return vm.serializeAddress(jsonKey, key, value); | |
} | |
function serialize(string memory jsonKey, string memory key, address[] memory value) | |
internal | |
returns (string memory) | |
{ | |
return vm.serializeAddress(jsonKey, key, value); | |
} | |
function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) { | |
return vm.serializeBytes32(jsonKey, key, value); | |
} | |
function serialize(string memory jsonKey, string memory key, bytes32[] memory value) | |
internal | |
returns (string memory) | |
{ | |
return vm.serializeBytes32(jsonKey, key, value); | |
} | |
function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) { | |
return vm.serializeBytes(jsonKey, key, value); | |
} | |
function serialize(string memory jsonKey, string memory key, bytes[] memory value) | |
internal | |
returns (string memory) | |
{ | |
return vm.serializeBytes(jsonKey, key, value); | |
} | |
function serialize(string memory jsonKey, string memory key, string memory value) | |
internal | |
returns (string memory) | |
{ | |
return vm.serializeString(jsonKey, key, value); | |
} | |
function serialize(string memory jsonKey, string memory key, string[] memory value) | |
internal | |
returns (string memory) | |
{ | |
return vm.serializeString(jsonKey, key, value); | |
} | |
function write(string memory jsonKey, string memory path) internal { | |
vm.writeJson(jsonKey, path); | |
} | |
function write(string memory jsonKey, string memory path, string memory valueKey) internal { | |
vm.writeJson(jsonKey, path, valueKey); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.6.2 <0.9.0; | |
library stdMath { | |
int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968; | |
function abs(int256 a) internal pure returns (uint256) { | |
// Required or it will fail when `a = type(int256).min` | |
if (a == INT256_MIN) { | |
return 57896044618658097711785492504343953926634992332820282019728792003956564819968; | |
} | |
return uint256(a > 0 ? a : -a); | |
} | |
function delta(uint256 a, uint256 b) internal pure returns (uint256) { | |
return a > b ? a - b : b - a; | |
} | |
function delta(int256 a, int256 b) internal pure returns (uint256) { | |
// a and b are of the same sign | |
// this works thanks to two's complement, the left-most bit is the sign bit | |
if ((a ^ b) > -1) { | |
return delta(abs(a), abs(b)); | |
} | |
// a and b are of opposite signs | |
return abs(a) + abs(b); | |
} | |
function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) { | |
uint256 absDelta = delta(a, b); | |
return absDelta * 1e18 / b; | |
} | |
function percentDelta(int256 a, int256 b) internal pure returns (uint256) { | |
uint256 absDelta = delta(a, b); | |
uint256 absB = abs(b); | |
return absDelta * 1e18 / absB; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.6.2 <0.9.0; | |
import {Vm} from "./Vm.sol"; | |
struct StdStorage { | |
mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots; | |
mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds; | |
bytes32[] _keys; | |
bytes4 _sig; | |
uint256 _depth; | |
address _target; | |
bytes32 _set; | |
} | |
library stdStorageSafe { | |
event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot); | |
event WARNING_UninitedSlot(address who, uint256 slot); | |
Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); | |
function sigs(string memory sigStr) internal pure returns (bytes4) { | |
return bytes4(keccak256(bytes(sigStr))); | |
} | |
/// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against | |
// slot complexity: | |
// if flat, will be bytes32(uint256(uint)); | |
// if map, will be keccak256(abi.encode(key, uint(slot))); | |
// if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot))))); | |
// if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth); | |
function find(StdStorage storage self) internal returns (uint256) { | |
address who = self._target; | |
bytes4 fsig = self._sig; | |
uint256 field_depth = self._depth; | |
bytes32[] memory ins = self._keys; | |
// calldata to test against | |
if (self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) { | |
return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]; | |
} | |
bytes memory cald = abi.encodePacked(fsig, flatten(ins)); | |
vm.record(); | |
bytes32 fdat; | |
{ | |
(, bytes memory rdat) = who.staticcall(cald); | |
fdat = bytesToBytes32(rdat, 32 * field_depth); | |
} | |
(bytes32[] memory reads,) = vm.accesses(address(who)); | |
if (reads.length == 1) { | |
bytes32 curr = vm.load(who, reads[0]); | |
if (curr == bytes32(0)) { | |
emit WARNING_UninitedSlot(who, uint256(reads[0])); | |
} | |
if (fdat != curr) { | |
require( | |
false, | |
"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported." | |
); | |
} | |
emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[0])); | |
self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[0]); | |
self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true; | |
} else if (reads.length > 1) { | |
for (uint256 i = 0; i < reads.length; i++) { | |
bytes32 prev = vm.load(who, reads[i]); | |
if (prev == bytes32(0)) { | |
emit WARNING_UninitedSlot(who, uint256(reads[i])); | |
} | |
if (prev != fdat) { | |
continue; | |
} | |
bytes32 new_val = ~prev; | |
// store | |
vm.store(who, reads[i], new_val); | |
bool success; | |
{ | |
bytes memory rdat; | |
(success, rdat) = who.staticcall(cald); | |
fdat = bytesToBytes32(rdat, 32 * field_depth); | |
} | |
if (success && fdat == new_val) { | |
// we found which of the slots is the actual one | |
emit SlotFound(who, fsig, keccak256(abi.encodePacked(ins, field_depth)), uint256(reads[i])); | |
self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = uint256(reads[i]); | |
self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))] = true; | |
vm.store(who, reads[i], prev); | |
break; | |
} | |
vm.store(who, reads[i], prev); | |
} | |
} else { | |
revert("stdStorage find(StdStorage): No storage use detected for target."); | |
} | |
require( | |
self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))], | |
"stdStorage find(StdStorage): Slot(s) not found." | |
); | |
delete self._target; | |
delete self._sig; | |
delete self._keys; | |
delete self._depth; | |
return self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]; | |
} | |
function target(StdStorage storage self, address _target) internal returns (StdStorage storage) { | |
self._target = _target; | |
return self; | |
} | |
function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) { | |
self._sig = _sig; | |
return self; | |
} | |
function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) { | |
self._sig = sigs(_sig); | |
return self; | |
} | |
function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) { | |
self._keys.push(bytes32(uint256(uint160(who)))); | |
return self; | |
} | |
function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) { | |
self._keys.push(bytes32(amt)); | |
return self; | |
} | |
function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) { | |
self._keys.push(key); | |
return self; | |
} | |
function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) { | |
self._depth = _depth; | |
return self; | |
} | |
function read(StdStorage storage self) private returns (bytes memory) { | |
address t = self._target; | |
uint256 s = find(self); | |
return abi.encode(vm.load(t, bytes32(s))); | |
} | |
function read_bytes32(StdStorage storage self) internal returns (bytes32) { | |
return abi.decode(read(self), (bytes32)); | |
} | |
function read_bool(StdStorage storage self) internal returns (bool) { | |
int256 v = read_int(self); | |
if (v == 0) return false; | |
if (v == 1) return true; | |
revert("stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool."); | |
} | |
function read_address(StdStorage storage self) internal returns (address) { | |
return abi.decode(read(self), (address)); | |
} | |
function read_uint(StdStorage storage self) internal returns (uint256) { | |
return abi.decode(read(self), (uint256)); | |
} | |
function read_int(StdStorage storage self) internal returns (int256) { | |
return abi.decode(read(self), (int256)); | |
} | |
function parent(StdStorage storage self) internal returns (uint256, bytes32) { | |
address who = self._target; | |
uint256 field_depth = self._depth; | |
vm.startMappingRecording(); | |
uint256 child = find(self) - field_depth; | |
(bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child)); | |
if (!found) { | |
revert( | |
"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called." | |
); | |
} | |
return (uint256(parent_slot), key); | |
} | |
function root(StdStorage storage self) internal returns (uint256) { | |
address who = self._target; | |
uint256 field_depth = self._depth; | |
vm.startMappingRecording(); | |
uint256 child = find(self) - field_depth; | |
bool found; | |
bytes32 root_slot; | |
bytes32 parent_slot; | |
(found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child)); | |
if (!found) { | |
revert( | |
"stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called." | |
); | |
} | |
while (found) { | |
root_slot = parent_slot; | |
(found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot)); | |
} | |
return uint256(root_slot); | |
} | |
function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) { | |
bytes32 out; | |
uint256 max = b.length > 32 ? 32 : b.length; | |
for (uint256 i = 0; i < max; i++) { | |
out |= bytes32(b[offset + i] & 0xFF) >> (i * 8); | |
} | |
return out; | |
} | |
function flatten(bytes32[] memory b) private pure returns (bytes memory) { | |
bytes memory result = new bytes(b.length * 32); | |
for (uint256 i = 0; i < b.length; i++) { | |
bytes32 k = b[i]; | |
/// @solidity memory-safe-assembly | |
assembly { | |
mstore(add(result, add(32, mul(32, i))), k) | |
} | |
} | |
return result; | |
} | |
} | |
library stdStorage { | |
Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); | |
function sigs(string memory sigStr) internal pure returns (bytes4) { | |
return stdStorageSafe.sigs(sigStr); | |
} | |
function find(StdStorage storage self) internal returns (uint256) { | |
return stdStorageSafe.find(self); | |
} | |
function target(StdStorage storage self, address _target) internal returns (StdStorage storage) { | |
return stdStorageSafe.target(self, _target); | |
} | |
function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) { | |
return stdStorageSafe.sig(self, _sig); | |
} | |
function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) { | |
return stdStorageSafe.sig(self, _sig); | |
} | |
function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) { | |
return stdStorageSafe.with_key(self, who); | |
} | |
function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) { | |
return stdStorageSafe.with_key(self, amt); | |
} | |
function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) { | |
return stdStorageSafe.with_key(self, key); | |
} | |
function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) { | |
return stdStorageSafe.depth(self, _depth); | |
} | |
function checked_write(StdStorage storage self, address who) internal { | |
checked_write(self, bytes32(uint256(uint160(who)))); | |
} | |
function checked_write(StdStorage storage self, uint256 amt) internal { | |
checked_write(self, bytes32(amt)); | |
} | |
function checked_write_int(StdStorage storage self, int256 val) internal { | |
checked_write(self, bytes32(uint256(val))); | |
} | |
function checked_write(StdStorage storage self, bool write) internal { | |
bytes32 t; | |
/// @solidity memory-safe-assembly | |
assembly { | |
t := write | |
} | |
checked_write(self, t); | |
} | |
function checked_write(StdStorage storage self, bytes32 set) internal { | |
address who = self._target; | |
bytes4 fsig = self._sig; | |
uint256 field_depth = self._depth; | |
bytes32[] memory ins = self._keys; | |
bytes memory cald = abi.encodePacked(fsig, flatten(ins)); | |
if (!self.finds[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]) { | |
find(self); | |
} | |
bytes32 slot = bytes32(self.slots[who][fsig][keccak256(abi.encodePacked(ins, field_depth))]); | |
bytes32 fdat; | |
{ | |
(, bytes memory rdat) = who.staticcall(cald); | |
fdat = bytesToBytes32(rdat, 32 * field_depth); | |
} | |
bytes32 curr = vm.load(who, slot); | |
if (fdat != curr) { | |
require( | |
false, | |
"stdStorage find(StdStorage): Packed slot. This would cause dangerous overwriting and currently isn't supported." | |
); | |
} | |
vm.store(who, slot, set); | |
delete self._target; | |
delete self._sig; | |
delete self._keys; | |
delete self._depth; | |
} | |
function read_bytes32(StdStorage storage self) internal returns (bytes32) { | |
return stdStorageSafe.read_bytes32(self); | |
} | |
function read_bool(StdStorage storage self) internal returns (bool) { | |
return stdStorageSafe.read_bool(self); | |
} | |
function read_address(StdStorage storage self) internal returns (address) { | |
return stdStorageSafe.read_address(self); | |
} | |
function read_uint(StdStorage storage self) internal returns (uint256) { | |
return stdStorageSafe.read_uint(self); | |
} | |
function read_int(StdStorage storage self) internal returns (int256) { | |
return stdStorageSafe.read_int(self); | |
} | |
function parent(StdStorage storage self) internal returns (uint256, bytes32) { | |
return stdStorageSafe.parent(self); | |
} | |
function root(StdStorage storage self) internal returns (uint256) { | |
return stdStorageSafe.root(self); | |
} | |
// Private function so needs to be copied over | |
function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) { | |
bytes32 out; | |
uint256 max = b.length > 32 ? 32 : b.length; | |
for (uint256 i = 0; i < max; i++) { | |
out |= bytes32(b[offset + i] & 0xFF) >> (i * 8); | |
} | |
return out; | |
} | |
// Private function so needs to be copied over | |
function flatten(bytes32[] memory b) private pure returns (bytes memory) { | |
bytes memory result = new bytes(b.length * 32); | |
for (uint256 i = 0; i < b.length; i++) { | |
bytes32 k = b[i]; | |
/// @solidity memory-safe-assembly | |
assembly { | |
mstore(add(result, add(32, mul(32, i))), k) | |
} | |
} | |
return result; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.4.22 <0.9.0; | |
import {VmSafe} from "./Vm.sol"; | |
library StdStyle { | |
VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); | |
string constant RED = "\u001b[91m"; | |
string constant GREEN = "\u001b[92m"; | |
string constant YELLOW = "\u001b[93m"; | |
string constant BLUE = "\u001b[94m"; | |
string constant MAGENTA = "\u001b[95m"; | |
string constant CYAN = "\u001b[96m"; | |
string constant BOLD = "\u001b[1m"; | |
string constant DIM = "\u001b[2m"; | |
string constant ITALIC = "\u001b[3m"; | |
string constant UNDERLINE = "\u001b[4m"; | |
string constant INVERSE = "\u001b[7m"; | |
string constant RESET = "\u001b[0m"; | |
function styleConcat(string memory style, string memory self) private pure returns (string memory) { | |
return string(abi.encodePacked(style, self, RESET)); | |
} | |
function red(string memory self) internal pure returns (string memory) { | |
return styleConcat(RED, self); | |
} | |
function red(uint256 self) internal pure returns (string memory) { | |
return red(vm.toString(self)); | |
} | |
function red(int256 self) internal pure returns (string memory) { | |
return red(vm.toString(self)); | |
} | |
function red(address self) internal pure returns (string memory) { | |
return red(vm.toString(self)); | |
} | |
function red(bool self) internal pure returns (string memory) { | |
return red(vm.toString(self)); | |
} | |
function redBytes(bytes memory self) internal pure returns (string memory) { | |
return red(vm.toString(self)); | |
} | |
function redBytes32(bytes32 self) internal pure returns (string memory) { | |
return red(vm.toString(self)); | |
} | |
function green(string memory self) internal pure returns (string memory) { | |
return styleConcat(GREEN, self); | |
} | |
function green(uint256 self) internal pure returns (string memory) { | |
return green(vm.toString(self)); | |
} | |
function green(int256 self) internal pure returns (string memory) { | |
return green(vm.toString(self)); | |
} | |
function green(address self) internal pure returns (string memory) { | |
return green(vm.toString(self)); | |
} | |
function green(bool self) internal pure returns (string memory) { | |
return green(vm.toString(self)); | |
} | |
function greenBytes(bytes memory self) internal pure returns (string memory) { | |
return green(vm.toString(self)); | |
} | |
function greenBytes32(bytes32 self) internal pure returns (string memory) { | |
return green(vm.toString(self)); | |
} | |
function yellow(string memory self) internal pure returns (string memory) { | |
return styleConcat(YELLOW, self); | |
} | |
function yellow(uint256 self) internal pure returns (string memory) { | |
return yellow(vm.toString(self)); | |
} | |
function yellow(int256 self) internal pure returns (string memory) { | |
return yellow(vm.toString(self)); | |
} | |
function yellow(address self) internal pure returns (string memory) { | |
return yellow(vm.toString(self)); | |
} | |
function yellow(bool self) internal pure returns (string memory) { | |
return yellow(vm.toString(self)); | |
} | |
function yellowBytes(bytes memory self) internal pure returns (string memory) { | |
return yellow(vm.toString(self)); | |
} | |
function yellowBytes32(bytes32 self) internal pure returns (string memory) { | |
return yellow(vm.toString(self)); | |
} | |
function blue(string memory self) internal pure returns (string memory) { | |
return styleConcat(BLUE, self); | |
} | |
function blue(uint256 self) internal pure returns (string memory) { | |
return blue(vm.toString(self)); | |
} | |
function blue(int256 self) internal pure returns (string memory) { | |
return blue(vm.toString(self)); | |
} | |
function blue(address self) internal pure returns (string memory) { | |
return blue(vm.toString(self)); | |
} | |
function blue(bool self) internal pure returns (string memory) { | |
return blue(vm.toString(self)); | |
} | |
function blueBytes(bytes memory self) internal pure returns (string memory) { | |
return blue(vm.toString(self)); | |
} | |
function blueBytes32(bytes32 self) internal pure returns (string memory) { | |
return blue(vm.toString(self)); | |
} | |
function magenta(string memory self) internal pure returns (string memory) { | |
return styleConcat(MAGENTA, self); | |
} | |
function magenta(uint256 self) internal pure returns (string memory) { | |
return magenta(vm.toString(self)); | |
} | |
function magenta(int256 self) internal pure returns (string memory) { | |
return magenta(vm.toString(self)); | |
} | |
function magenta(address self) internal pure returns (string memory) { | |
return magenta(vm.toString(self)); | |
} | |
function magenta(bool self) internal pure returns (string memory) { | |
return magenta(vm.toString(self)); | |
} | |
function magentaBytes(bytes memory self) internal pure returns (string memory) { | |
return magenta(vm.toString(self)); | |
} | |
function magentaBytes32(bytes32 self) internal pure returns (string memory) { | |
return magenta(vm.toString(self)); | |
} | |
function cyan(string memory self) internal pure returns (string memory) { | |
return styleConcat(CYAN, self); | |
} | |
function cyan(uint256 self) internal pure returns (string memory) { | |
return cyan(vm.toString(self)); | |
} | |
function cyan(int256 self) internal pure returns (string memory) { | |
return cyan(vm.toString(self)); | |
} | |
function cyan(address self) internal pure returns (string memory) { | |
return cyan(vm.toString(self)); | |
} | |
function cyan(bool self) internal pure returns (string memory) { | |
return cyan(vm.toString(self)); | |
} | |
function cyanBytes(bytes memory self) internal pure returns (string memory) { | |
return cyan(vm.toString(self)); | |
} | |
function cyanBytes32(bytes32 self) internal pure returns (string memory) { | |
return cyan(vm.toString(self)); | |
} | |
function bold(string memory self) internal pure returns (string memory) { | |
return styleConcat(BOLD, self); | |
} | |
function bold(uint256 self) internal pure returns (string memory) { | |
return bold(vm.toString(self)); | |
} | |
function bold(int256 self) internal pure returns (string memory) { | |
return bold(vm.toString(self)); | |
} | |
function bold(address self) internal pure returns (string memory) { | |
return bold(vm.toString(self)); | |
} | |
function bold(bool self) internal pure returns (string memory) { | |
return bold(vm.toString(self)); | |
} | |
function boldBytes(bytes memory self) internal pure returns (string memory) { | |
return bold(vm.toString(self)); | |
} | |
function boldBytes32(bytes32 self) internal pure returns (string memory) { | |
return bold(vm.toString(self)); | |
} | |
function dim(string memory self) internal pure returns (string memory) { | |
return styleConcat(DIM, self); | |
} | |
function dim(uint256 self) internal pure returns (string memory) { | |
return dim(vm.toString(self)); | |
} | |
function dim(int256 self) internal pure returns (string memory) { | |
return dim(vm.toString(self)); | |
} | |
function dim(address self) internal pure returns (string memory) { | |
return dim(vm.toString(self)); | |
} | |
function dim(bool self) internal pure returns (string memory) { | |
return dim(vm.toString(self)); | |
} | |
function dimBytes(bytes memory self) internal pure returns (string memory) { | |
return dim(vm.toString(self)); | |
} | |
function dimBytes32(bytes32 self) internal pure returns (string memory) { | |
return dim(vm.toString(self)); | |
} | |
function italic(string memory self) internal pure returns (string memory) { | |
return styleConcat(ITALIC, self); | |
} | |
function italic(uint256 self) internal pure returns (string memory) { | |
return italic(vm.toString(self)); | |
} | |
function italic(int256 self) internal pure returns (string memory) { | |
return italic(vm.toString(self)); | |
} | |
function italic(address self) internal pure returns (string memory) { | |
return italic(vm.toString(self)); | |
} | |
function italic(bool self) internal pure returns (string memory) { | |
return italic(vm.toString(self)); | |
} | |
function italicBytes(bytes memory self) internal pure returns (string memory) { | |
return italic(vm.toString(self)); | |
} | |
function italicBytes32(bytes32 self) internal pure returns (string memory) { | |
return italic(vm.toString(self)); | |
} | |
function underline(string memory self) internal pure returns (string memory) { | |
return styleConcat(UNDERLINE, self); | |
} | |
function underline(uint256 self) internal pure returns (string memory) { | |
return underline(vm.toString(self)); | |
} | |
function underline(int256 self) internal pure returns (string memory) { | |
return underline(vm.toString(self)); | |
} | |
function underline(address self) internal pure returns (string memory) { | |
return underline(vm.toString(self)); | |
} | |
function underline(bool self) internal pure returns (string memory) { | |
return underline(vm.toString(self)); | |
} | |
function underlineBytes(bytes memory self) internal pure returns (string memory) { | |
return underline(vm.toString(self)); | |
} | |
function underlineBytes32(bytes32 self) internal pure returns (string memory) { | |
return underline(vm.toString(self)); | |
} | |
function inverse(string memory self) internal pure returns (string memory) { | |
return styleConcat(INVERSE, self); | |
} | |
function inverse(uint256 self) internal pure returns (string memory) { | |
return inverse(vm.toString(self)); | |
} | |
function inverse(int256 self) internal pure returns (string memory) { | |
return inverse(vm.toString(self)); | |
} | |
function inverse(address self) internal pure returns (string memory) { | |
return inverse(vm.toString(self)); | |
} | |
function inverse(bool self) internal pure returns (string memory) { | |
return inverse(vm.toString(self)); | |
} | |
function inverseBytes(bytes memory self) internal pure returns (string memory) { | |
return inverse(vm.toString(self)); | |
} | |
function inverseBytes32(bytes32 self) internal pure returns (string memory) { | |
return inverse(vm.toString(self)); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.6.2 <0.9.0; | |
pragma experimental ABIEncoderV2; | |
import {IMulticall3} from "./IMulticall3.sol"; | |
import {VmSafe} from "./Vm.sol"; | |
abstract contract StdUtils { | |
/*////////////////////////////////////////////////////////////////////////// | |
CONSTANTS | |
//////////////////////////////////////////////////////////////////////////*/ | |
IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11); | |
VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); | |
address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; | |
uint256 private constant INT256_MIN_ABS = | |
57896044618658097711785492504343953926634992332820282019728792003956564819968; | |
uint256 private constant SECP256K1_ORDER = | |
115792089237316195423570985008687907852837564279074904382605163141518161494337; | |
uint256 private constant UINT256_MAX = | |
115792089237316195423570985008687907853269984665640564039457584007913129639935; | |
// Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy. | |
address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C; | |
/*////////////////////////////////////////////////////////////////////////// | |
INTERNAL FUNCTIONS | |
//////////////////////////////////////////////////////////////////////////*/ | |
function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) { | |
require(min <= max, "StdUtils bound(uint256,uint256,uint256): Max is less than min."); | |
// If x is between min and max, return x directly. This is to ensure that dictionary values | |
// do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188 | |
if (x >= min && x <= max) return x; | |
uint256 size = max - min + 1; | |
// If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side. | |
// This helps ensure coverage of the min/max values. | |
if (x <= 3 && size > x) return min + x; | |
if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x); | |
// Otherwise, wrap x into the range [min, max], i.e. the range is inclusive. | |
if (x > max) { | |
uint256 diff = x - max; | |
uint256 rem = diff % size; | |
if (rem == 0) return max; | |
result = min + rem - 1; | |
} else if (x < min) { | |
uint256 diff = min - x; | |
uint256 rem = diff % size; | |
if (rem == 0) return min; | |
result = max - rem + 1; | |
} | |
} | |
function bound(uint256 x, uint256 min, uint256 max) internal view virtual returns (uint256 result) { | |
result = _bound(x, min, max); | |
console2_log("Bound Result", result); | |
} | |
function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) { | |
require(min <= max, "StdUtils bound(int256,int256,int256): Max is less than min."); | |
// Shifting all int256 values to uint256 to use _bound function. The range of two types are: | |
// int256 : -(2**255) ~ (2**255 - 1) | |
// uint256: 0 ~ (2**256 - 1) | |
// So, add 2**255, INT256_MIN_ABS to the integer values. | |
// | |
// If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow. | |
// So, use `~uint256(x) + 1` instead. | |
uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS); | |
uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS); | |
uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS); | |
uint256 y = _bound(_x, _min, _max); | |
// To move it back to int256 value, subtract INT256_MIN_ABS at here. | |
result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS); | |
} | |
function bound(int256 x, int256 min, int256 max) internal view virtual returns (int256 result) { | |
result = _bound(x, min, max); | |
console2_log("Bound result", vm.toString(result)); | |
} | |
function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) { | |
result = _bound(privateKey, 1, SECP256K1_ORDER - 1); | |
} | |
function bytesToUint(bytes memory b) internal pure virtual returns (uint256) { | |
require(b.length <= 32, "StdUtils bytesToUint(bytes): Bytes length exceeds 32."); | |
return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256)); | |
} | |
/// @dev Compute the address a contract will be deployed at for a given deployer address and nonce | |
/// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol) | |
function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) { | |
// forgefmt: disable-start | |
// The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0. | |
// A one byte integer uses its own value as its length prefix, there is no additional "0x80 + length" prefix that comes before it. | |
if (nonce == 0x00) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80)))); | |
if (nonce <= 0x7f) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, uint8(nonce)))); | |
// Nonces greater than 1 byte all follow a consistent encoding scheme, where each value is preceded by a prefix of 0x80 + length. | |
if (nonce <= 2**8 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployer, bytes1(0x81), uint8(nonce)))); | |
if (nonce <= 2**16 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployer, bytes1(0x82), uint16(nonce)))); | |
if (nonce <= 2**24 - 1) return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployer, bytes1(0x83), uint24(nonce)))); | |
// forgefmt: disable-end | |
// More details about RLP encoding can be found here: https://eth.wiki/fundamentals/rlp | |
// 0xda = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x84 ++ nonce) | |
// 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex) | |
// 0x84 = 0x80 + 0x04 (0x04 = the bytes length of the nonce, 4 bytes, in hex) | |
// We assume nobody can have a nonce large enough to require more than 32 bytes. | |
return addressFromLast20Bytes( | |
keccak256(abi.encodePacked(bytes1(0xda), bytes1(0x94), deployer, bytes1(0x84), uint32(nonce))) | |
); | |
} | |
function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer) | |
internal | |
pure | |
virtual | |
returns (address) | |
{ | |
return addressFromLast20Bytes(keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, initcodeHash))); | |
} | |
/// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer | |
function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) { | |
return computeCreate2Address(salt, initCodeHash, CREATE2_FACTORY); | |
} | |
/// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments | |
/// @param creationCode the creation code of a contract C, as returned by type(C).creationCode | |
function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) { | |
return hashInitCode(creationCode, ""); | |
} | |
/// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2 | |
/// @param creationCode the creation code of a contract C, as returned by type(C).creationCode | |
/// @param args the ABI-encoded arguments to the constructor of C | |
function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) { | |
return keccak256(abi.encodePacked(creationCode, args)); | |
} | |
// Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses. | |
function getTokenBalances(address token, address[] memory addresses) | |
internal | |
virtual | |
returns (uint256[] memory balances) | |
{ | |
uint256 tokenCodeSize; | |
assembly { | |
tokenCodeSize := extcodesize(token) | |
} | |
require(tokenCodeSize > 0, "StdUtils getTokenBalances(address,address[]): Token address is not a contract."); | |
// ABI encode the aggregate call to Multicall3. | |
uint256 length = addresses.length; | |
IMulticall3.Call[] memory calls = new IMulticall3.Call[](length); | |
for (uint256 i = 0; i < length; ++i) { | |
// 0x70a08231 = bytes4("balanceOf(address)")) | |
calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))}); | |
} | |
// Make the aggregate call. | |
(, bytes[] memory returnData) = multicall.aggregate(calls); | |
// ABI decode the return data and return the balances. | |
balances = new uint256[](length); | |
for (uint256 i = 0; i < length; ++i) { | |
balances[i] = abi.decode(returnData[i], (uint256)); | |
} | |
} | |
/*////////////////////////////////////////////////////////////////////////// | |
PRIVATE FUNCTIONS | |
//////////////////////////////////////////////////////////////////////////*/ | |
function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) { | |
return address(uint160(uint256(bytesValue))); | |
} | |
// Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere. | |
function console2_log(string memory p0, uint256 p1) private view { | |
(bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature("log(string,uint256)", p0, p1)); | |
status; | |
} | |
function console2_log(string memory p0, string memory p1) private view { | |
(bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature("log(string,string)", p0, p1)); | |
status; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol) | |
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js. | |
pragma solidity ^0.8.20; | |
/** | |
* @dev Library for reading and writing primitive types to specific storage slots. | |
* | |
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. | |
* This library helps with reading and writing to such slots without the need for inline assembly. | |
* | |
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write. | |
* | |
* Example usage to set ERC1967 implementation slot: | |
* ```solidity | |
* contract ERC1967 { | |
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; | |
* | |
* function _getImplementation() internal view returns (address) { | |
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; | |
* } | |
* | |
* function _setImplementation(address newImplementation) internal { | |
* require(newImplementation.code.length > 0); | |
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; | |
* } | |
* } | |
* ``` | |
*/ | |
library StorageSlot { | |
struct AddressSlot { | |
address value; | |
} | |
struct BooleanSlot { | |
bool value; | |
} | |
struct Bytes32Slot { | |
bytes32 value; | |
} | |
struct Uint256Slot { | |
uint256 value; | |
} | |
struct StringSlot { | |
string value; | |
} | |
struct BytesSlot { | |
bytes value; | |
} | |
/** | |
* @dev Returns an `AddressSlot` with member `value` located at `slot`. | |
*/ | |
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { | |
/// @solidity memory-safe-assembly | |
assembly { | |
r.slot := slot | |
} | |
} | |
/** | |
* @dev Returns an `BooleanSlot` with member `value` located at `slot`. | |
*/ | |
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { | |
/// @solidity memory-safe-assembly | |
assembly { | |
r.slot := slot | |
} | |
} | |
/** | |
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`. | |
*/ | |
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { | |
/// @solidity memory-safe-assembly | |
assembly { | |
r.slot := slot | |
} | |
} | |
/** | |
* @dev Returns an `Uint256Slot` with member `value` located at `slot`. | |
*/ | |
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { | |
/// @solidity memory-safe-assembly | |
assembly { | |
r.slot := slot | |
} | |
} | |
/** | |
* @dev Returns an `StringSlot` with member `value` located at `slot`. | |
*/ | |
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { | |
/// @solidity memory-safe-assembly | |
assembly { | |
r.slot := slot | |
} | |
} | |
/** | |
* @dev Returns an `StringSlot` representation of the string storage pointer `store`. | |
*/ | |
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { | |
/// @solidity memory-safe-assembly | |
assembly { | |
r.slot := store.slot | |
} | |
} | |
/** | |
* @dev Returns an `BytesSlot` with member `value` located at `slot`. | |
*/ | |
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { | |
/// @solidity memory-safe-assembly | |
assembly { | |
r.slot := slot | |
} | |
} | |
/** | |
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. | |
*/ | |
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { | |
/// @solidity memory-safe-assembly | |
assembly { | |
r.slot := store.slot | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// .edee... ..... .eeec. ..eee.. | |
// .d*" """"*e..d*"""""**e..e*"" "*c.d"" ""*e. | |
// z" "$ $"" *F **e. | |
// z" "c d" *. "$. | |
// .F " " 'F | |
// d J% | |
// 3 . e" | |
// 4r e" . d" | |
// $ .d" . .F z ..zeeeeed" | |
// "*beeeP" P d e. $**"" " | |
// "*b. Jbc. z*%e.. .$**eeeeP" | |
// "*beee* "$$eeed" ^$$$"" " | |
// '$$. .$$$c | |
// "$$. e$$*$$c | |
// "$$..$$P" '$$r | |
// "$$$$" "$$. .d | |
// z. .$$$" "$$. .dP" | |
// ^*e e$$" "$$. .e$" | |
// *b. .$$P" "$$. z$" | |
// "$c e$$" "$$.z$*" | |
// ^*e$$P" "$$$" | |
// *$$ "$$r | |
// '$$F .$$P | |
// $$$ z$$" | |
// 4$$ d$$b. | |
// .$$% .$$*"*$$e. | |
// e$$$*" z$$" "*$$e. | |
// 4$$" d$P" "*$$e. | |
// $P .d$$$c "*$$e.. | |
// d$" z$$" *$b. "*$L | |
// 4$" e$P" "*$c ^$$ | |
// $" .d$" "$$. ^$r | |
// dP z$$" ^*$e. "b | |
// 4$ e$P "$$ " | |
// J$F $$ | |
// $$ .$F | |
// 4$" $P" | |
// $" dP Gilo94' | |
// https://www.asciiart.eu/nature/lightning | |
// ▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄ ▄ ▄ ▄▄ ▄ ▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ | |
// ▐░░░░░░░░░░░▌▐░▌ ▐░▌▐░▌ ▐░▌▐░░▌ ▐░▌▐░░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ | |
// ▀▀▀▀█░█▀▀▀▀ ▐░▌ ▐░▌▐░▌ ▐░▌▐░▌░▌ ▐░▌▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌ | |
// ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌▐░▌▐░▌ ▐░▌▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ | |
// ▐░▌ ▐░█▄▄▄▄▄▄▄█░▌▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌ | |
// ▐░▌ ▐░░░░░░░░░░░▌▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ | |
// ▐░▌ ▐░█▀▀▀▀▀▀▀█░▌▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀█░█▀▀ | |
// ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌▐░▌ ▐░▌▐░▌▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ | |
// ▐░▌ ▐░▌ ▐░▌▐░█▄▄▄▄▄▄▄█░▌▐░▌ ▐░▐░▌▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░▌ ▐░▌ | |
// ▐░▌ ▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░▌ ▐░░▌▐░░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░▌ ▐░▌ | |
// ▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀▀ ▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ | |
// | |
// ▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄ ▄ | |
// ▐░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░▌ ▐░▌ | |
// ▐░▌ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌▐░▌░▌ ▐░▌ | |
// ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌▐░▌▐░▌ ▐░▌ | |
// ▐░▌ ▐░▌ ▐░▌▐░█▄▄▄▄▄▄▄█░▌▐░▌ ▐░▌ ▐░▌ | |
// ▐░▌ ▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌ ▐░▌ | |
// ▐░▌ ▐░▌ ▐░▌▐░█▀▀▀▀▀▀▀█░▌▐░▌ ▐░▌ ▐░▌ | |
// ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌▐░▌ ▐░▌▐░▌ | |
// ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌▐░▌ ▐░▌▐░▌ ▐░▐░▌ | |
// ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌▐░▌ ▐░░▌ | |
// ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀ ▀▀ | |
// SPDX-License-Identifier: AGPL-3.0-only | |
pragma solidity 0.8.20; | |
import { SafeERC20 } from "./SafeERC20.sol"; | |
import { AssetToken } from "./AssetToken.sol"; | |
import { IERC20 } from "./IERC20.sol"; | |
import { IERC20Metadata } from "./IERC20Metadata.sol"; | |
import { OwnableUpgradeable } from "./OwnableUpgradeable.sol"; | |
import { Initializable } from "./Initializable.sol"; | |
import { UUPSUpgradeable } from "./UUPSUpgradeable.sol"; | |
import { OracleUpgradeable } from "./OracleUpgradeable.sol"; | |
import { Address } from "./Address.sol"; | |
import { IFlashLoanReceiver } from "./IFlashLoanReceiver.sol"; | |
contract ThunderLoan is Initializable, OwnableUpgradeable, UUPSUpgradeable, OracleUpgradeable { | |
error ThunderLoan__NotAllowedToken(IERC20 token); | |
error ThunderLoan__CantBeZero(); | |
error ThunderLoan__NotPaidBack(uint256 expectedEndingBalance, uint256 endingBalance); | |
error ThunderLoan__NotEnoughTokenBalance(uint256 startingBalance, uint256 amount); | |
error ThunderLoan__CallerIsNotContract(); | |
error ThunderLoan__AlreadyAllowed(); | |
error ThunderLoan__ExhangeRateCanOnlyIncrease(); | |
error ThunderLoan__NotCurrentlyFlashLoaning(); | |
error ThunderLoan__BadNewFee(); | |
using SafeERC20 for IERC20; | |
using Address for address; | |
/*////////////////////////////////////////////////////////////// | |
STATE VARIABLES | |
//////////////////////////////////////////////////////////////*/ | |
mapping(IERC20 => AssetToken) public s_tokenToAssetToken; | |
// The fee in WEI, it should have 18 decimals. Each flash loan takes a flat fee of the token price. | |
uint256 private s_feePrecision; | |
uint256 private s_flashLoanFee; // 0.3% ETH fee | |
mapping(IERC20 token => bool currentlyFlashLoaning) private s_currentlyFlashLoaning; | |
/*////////////////////////////////////////////////////////////// | |
EVENTS | |
//////////////////////////////////////////////////////////////*/ | |
event Deposit(address indexed account, IERC20 indexed token, uint256 amount); | |
event AllowedTokenSet(IERC20 indexed token, AssetToken indexed asset, bool allowed); | |
event Redeemed( | |
address indexed account, IERC20 indexed token, uint256 amountOfAssetToken, uint256 amountOfUnderlying | |
); | |
event FlashLoan(address indexed receiverAddress, IERC20 indexed token, uint256 amount, uint256 fee, bytes params); | |
/*////////////////////////////////////////////////////////////// | |
MODIFIERS | |
//////////////////////////////////////////////////////////////*/ | |
modifier revertIfZero(uint256 amount) { | |
if (amount == 0) { | |
revert ThunderLoan__CantBeZero(); | |
} | |
_; | |
} | |
modifier revertIfNotAllowedToken(IERC20 token) { | |
if (!isAllowedToken(token)) { | |
revert ThunderLoan__NotAllowedToken(token); | |
} | |
_; | |
} | |
/*////////////////////////////////////////////////////////////// | |
FUNCTIONS | |
//////////////////////////////////////////////////////////////*/ | |
/// @custom:oz-upgrades-unsafe-allow constructor | |
constructor() { | |
_disableInitializers(); | |
} | |
/*////////////////////////////////////////////////////////////// | |
EXTERNAL FUNCTIONS | |
//////////////////////////////////////////////////////////////*/ | |
function initialize(address tswapAddress) external initializer { | |
__Ownable_init(msg.sender); | |
__UUPSUpgradeable_init(); | |
__Oracle_init(tswapAddress); | |
s_feePrecision = 1e18; | |
s_flashLoanFee = 3e15; // 0.3% ETH fee | |
} | |
function deposit(IERC20 token, uint256 amount) external revertIfZero(amount) revertIfNotAllowedToken(token) { | |
AssetToken assetToken = s_tokenToAssetToken[token]; | |
uint256 exchangeRate = assetToken.getExchangeRate(); | |
uint256 mintAmount = (amount * assetToken.EXCHANGE_RATE_PRECISION()) / exchangeRate; | |
emit Deposit(msg.sender, token, amount); | |
assetToken.mint(msg.sender, mintAmount); | |
uint256 calculatedFee = getCalculatedFee(token, amount); | |
assetToken.updateExchangeRate(calculatedFee); | |
token.safeTransferFrom(msg.sender, address(assetToken), amount); | |
} | |
/// @notice Withdraws the underlying token from the asset token | |
/// @param token The token they want to withdraw from | |
/// @param amountOfAssetToken The amount of the underlying they want to withdraw | |
function redeem( | |
IERC20 token, | |
uint256 amountOfAssetToken | |
) | |
external | |
revertIfZero(amountOfAssetToken) | |
revertIfNotAllowedToken(token) | |
{ | |
AssetToken assetToken = s_tokenToAssetToken[token]; | |
uint256 exchangeRate = assetToken.getExchangeRate(); | |
if (amountOfAssetToken == type(uint256).max) { | |
amountOfAssetToken = assetToken.balanceOf(msg.sender); | |
} | |
uint256 amountUnderlying = (amountOfAssetToken * exchangeRate) / assetToken.EXCHANGE_RATE_PRECISION(); | |
emit Redeemed(msg.sender, token, amountOfAssetToken, amountUnderlying); | |
assetToken.burn(msg.sender, amountOfAssetToken); | |
assetToken.transferUnderlyingTo(msg.sender, amountUnderlying); | |
} | |
function flashloan( | |
address receiverAddress, | |
IERC20 token, | |
uint256 amount, | |
bytes calldata params | |
) | |
external | |
revertIfZero(amount) | |
revertIfNotAllowedToken(token) | |
{ | |
AssetToken assetToken = s_tokenToAssetToken[token]; | |
uint256 startingBalance = IERC20(token).balanceOf(address(assetToken)); | |
if (amount > startingBalance) { | |
revert ThunderLoan__NotEnoughTokenBalance(startingBalance, amount); | |
} | |
if (receiverAddress.code.length == 0) { | |
revert ThunderLoan__CallerIsNotContract(); | |
} | |
uint256 fee = getCalculatedFee(token, amount); | |
// slither-disable-next-line reentrancy-vulnerabilities-2 reentrancy-vulnerabilities-3 | |
assetToken.updateExchangeRate(fee); | |
emit FlashLoan(receiverAddress, token, amount, fee, params); | |
s_currentlyFlashLoaning[token] = true; | |
assetToken.transferUnderlyingTo(receiverAddress, amount); | |
// slither-disable-next-line unused-return reentrancy-vulnerabilities-2 | |
receiverAddress.functionCall( | |
abi.encodeCall( | |
IFlashLoanReceiver.executeOperation, | |
( | |
address(token), | |
amount, | |
fee, | |
msg.sender, // initiator | |
params | |
) | |
) | |
); | |
uint256 endingBalance = token.balanceOf(address(assetToken)); | |
if (endingBalance < startingBalance + fee) { | |
revert ThunderLoan__NotPaidBack(startingBalance + fee, endingBalance); | |
} | |
s_currentlyFlashLoaning[token] = false; | |
} | |
function repay(IERC20 token, uint256 amount) public { | |
if (!s_currentlyFlashLoaning[token]) { | |
revert ThunderLoan__NotCurrentlyFlashLoaning(); | |
} | |
AssetToken assetToken = s_tokenToAssetToken[token]; | |
token.safeTransferFrom(msg.sender, address(assetToken), amount); | |
} | |
function setAllowedToken(IERC20 token, bool allowed) external onlyOwner returns (AssetToken) { | |
if (allowed) { | |
if (address(s_tokenToAssetToken[token]) != address(0)) { | |
revert ThunderLoan__AlreadyAllowed(); | |
} | |
string memory name = string.concat("ThunderLoan ", IERC20Metadata(address(token)).name()); | |
string memory symbol = string.concat("tl", IERC20Metadata(address(token)).symbol()); | |
AssetToken assetToken = new AssetToken(address(this), token, name, symbol); | |
s_tokenToAssetToken[token] = assetToken; | |
emit AllowedTokenSet(token, assetToken, allowed); | |
return assetToken; | |
} else { | |
AssetToken assetToken = s_tokenToAssetToken[token]; | |
delete s_tokenToAssetToken[token]; | |
emit AllowedTokenSet(token, assetToken, allowed); | |
return assetToken; | |
} | |
} | |
function getCalculatedFee(IERC20 token, uint256 amount) public view returns (uint256 fee) { | |
//slither-disable-next-line divide-before-multiply | |
uint256 valueOfBorrowedToken = (amount * getPriceInWeth(address(token))) / s_feePrecision; | |
//slither-disable-next-line divide-before-multiply | |
fee = (valueOfBorrowedToken * s_flashLoanFee) / s_feePrecision; | |
} | |
function updateFlashLoanFee(uint256 newFee) external onlyOwner { | |
if (newFee > s_feePrecision) { | |
revert ThunderLoan__BadNewFee(); | |
} | |
s_flashLoanFee = newFee; | |
} | |
function isAllowedToken(IERC20 token) public view returns (bool) { | |
return address(s_tokenToAssetToken[token]) != address(0); | |
} | |
function getAssetFromToken(IERC20 token) public view returns (AssetToken) { | |
return s_tokenToAssetToken[token]; | |
} | |
function isCurrentlyFlashLoaning(IERC20 token) public view returns (bool) { | |
return s_currentlyFlashLoaning[token]; | |
} | |
function getFee() external view returns (uint256) { | |
return s_flashLoanFee; | |
} | |
function getFeePrecision() external view returns (uint256) { | |
return s_feePrecision; | |
} | |
function _authorizeUpgrade(address newImplementation) internal override onlyOwner { } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/UUPSUpgradeable.sol) | |
pragma solidity ^0.8.20; | |
import {IERC1822Proxiable} from "./draft-IERC1822.sol"; | |
import {ERC1967Utils} from "./ERC1967Utils.sol"; | |
import {Initializable} from "./Initializable.sol"; | |
/** | |
* @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an | |
* {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. | |
* | |
* A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is | |
* reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing | |
* `UUPSUpgradeable` with a custom implementation of upgrades. | |
* | |
* The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. | |
*/ | |
abstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable { | |
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable | |
address private immutable __self = address(this); | |
/** | |
* @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)` | |
* and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called, | |
* while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string. | |
* If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must | |
* be the empty byte string if no function should be called, making it impossible to invoke the `receive` function | |
* during an upgrade. | |
*/ | |
string public constant UPGRADE_INTERFACE_VERSION = "5.0.0"; | |
/** | |
* @dev The call is from an unauthorized context. | |
*/ | |
error UUPSUnauthorizedCallContext(); | |
/** | |
* @dev The storage `slot` is unsupported as a UUID. | |
*/ | |
error UUPSUnsupportedProxiableUUID(bytes32 slot); | |
/** | |
* @dev Check that the execution is being performed through a delegatecall call and that the execution context is | |
* a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case | |
* for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a | |
* function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to | |
* fail. | |
*/ | |
modifier onlyProxy() { | |
_checkProxy(); | |
_; | |
} | |
/** | |
* @dev Check that the execution is not being performed through a delegate call. This allows a function to be | |
* callable on the implementing contract but not through proxies. | |
*/ | |
modifier notDelegated() { | |
_checkNotDelegated(); | |
_; | |
} | |
function __UUPSUpgradeable_init() internal onlyInitializing { | |
} | |
function __UUPSUpgradeable_init_unchained() internal onlyInitializing { | |
} | |
/** | |
* @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the | |
* implementation. It is used to validate the implementation's compatibility when performing an upgrade. | |
* | |
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks | |
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this | |
* function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. | |
*/ | |
function proxiableUUID() external view virtual notDelegated returns (bytes32) { | |
return ERC1967Utils.IMPLEMENTATION_SLOT; | |
} | |
/** | |
* @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call | |
* encoded in `data`. | |
* | |
* Calls {_authorizeUpgrade}. | |
* | |
* Emits an {Upgraded} event. | |
* | |
* @custom:oz-upgrades-unsafe-allow-reachable delegatecall | |
*/ | |
function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy { | |
_authorizeUpgrade(newImplementation); | |
_upgradeToAndCallUUPS(newImplementation, data); | |
} | |
/** | |
* @dev Reverts if the execution is not performed via delegatecall or the execution | |
* context is not of a proxy with an ERC1967-compliant implementation pointing to self. | |
* See {_onlyProxy}. | |
*/ | |
function _checkProxy() internal view virtual { | |
if ( | |
address(this) == __self || // Must be called through delegatecall | |
ERC1967Utils.getImplementation() != __self // Must be called through an active proxy | |
) { | |
revert UUPSUnauthorizedCallContext(); | |
} | |
} | |
/** | |
* @dev Reverts if the execution is performed via delegatecall. | |
* See {notDelegated}. | |
*/ | |
function _checkNotDelegated() internal view virtual { | |
if (address(this) != __self) { | |
// Must not be called through delegatecall | |
revert UUPSUnauthorizedCallContext(); | |
} | |
} | |
/** | |
* @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by | |
* {upgradeToAndCall}. | |
* | |
* Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. | |
* | |
* ```solidity | |
* function _authorizeUpgrade(address) internal onlyOwner {} | |
* ``` | |
*/ | |
function _authorizeUpgrade(address newImplementation) internal virtual; | |
/** | |
* @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call. | |
* | |
* As a security check, {proxiableUUID} is invoked in the new implementation, and the return value | |
* is expected to be the implementation slot in ERC1967. | |
* | |
* Emits an {IERC1967-Upgraded} event. | |
*/ | |
function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private { | |
try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) { | |
if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) { | |
revert UUPSUnsupportedProxiableUUID(slot); | |
} | |
ERC1967Utils.upgradeToAndCall(newImplementation, data); | |
} catch { | |
// The implementation is not UUPS | |
revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████ | |
Find any smart contract, and build your project faster: https://www.cookbook.dev | |
Twitter: https://twitter.com/cookbook_dev | |
Discord: https://discord.gg/WzsfPcfHrk | |
Find this contract on Cookbook: https://www.cookbook.dev/contracts/6-thunder-loan-audit-DeployThunderLoan/?utm=code | |
*/ | |
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.6.2 <0.9.0; | |
pragma experimental ABIEncoderV2; | |
// Cheatcodes are marked as view/pure/none using the following rules: | |
// 0. A call's observable behaviour includes its return value, logs, reverts and state writes, | |
// 1. If you can influence a later call's observable behaviour, you're neither `view` nor `pure (you are modifying some state be it the EVM, interpreter, filesystem, etc), | |
// 2. Otherwise if you can be influenced by an earlier call, or if reading some state, you're `view`, | |
// 3. Otherwise you're `pure`. | |
// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may | |
// result in Script simulations differing from on-chain execution. It is recommended to only use | |
// these cheats in scripts. | |
interface VmSafe { | |
// ======== Types ======== | |
enum CallerMode { | |
None, | |
Broadcast, | |
RecurrentBroadcast, | |
Prank, | |
RecurrentPrank | |
} | |
struct Log { | |
bytes32[] topics; | |
bytes data; | |
address emitter; | |
} | |
struct Rpc { | |
string key; | |
string url; | |
} | |
struct DirEntry { | |
string errorMessage; | |
string path; | |
uint64 depth; | |
bool isDir; | |
bool isSymlink; | |
} | |
struct FsMetadata { | |
bool isDir; | |
bool isSymlink; | |
uint256 length; | |
bool readOnly; | |
uint256 modified; | |
uint256 accessed; | |
uint256 created; | |
} | |
struct Wallet { | |
address addr; | |
uint256 publicKeyX; | |
uint256 publicKeyY; | |
uint256 privateKey; | |
} | |
struct FfiResult { | |
int32 exitCode; | |
bytes stdout; | |
bytes stderr; | |
} | |
// ======== EVM ======== | |
// Gets the address for a given private key | |
function addr(uint256 privateKey) external pure returns (address keyAddr); | |
// Gets the nonce of an account. | |
// See `getNonce(Wallet memory wallet)` for an alternative way to manage users and get their nonces. | |
function getNonce(address account) external view returns (uint64 nonce); | |
// Loads a storage slot from an address | |
function load(address target, bytes32 slot) external view returns (bytes32 data); | |
// Signs data | |
function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); | |
// -------- Record Storage -------- | |
// Records all storage reads and writes | |
function record() external; | |
// Gets all accessed reads and write slot from a `vm.record` session, for a given address | |
function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots); | |
// -------- Recording Map Writes -------- | |
// Starts recording all map SSTOREs for later retrieval. | |
function startMappingRecording() external; | |
// Stops recording all map SSTOREs for later retrieval and clears the recorded data. | |
function stopMappingRecording() external; | |
// Gets the number of elements in the mapping at the given slot, for a given address. | |
function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length); | |
// Gets the elements at index idx of the mapping at the given slot, for a given address. The | |
// index must be less than the length of the mapping (i.e. the number of keys in the mapping). | |
function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value); | |
// Gets the map key and parent of a mapping at a given slot, for a given address. | |
function getMappingKeyAndParentOf(address target, bytes32 elementSlot) | |
external | |
returns (bool found, bytes32 key, bytes32 parent); | |
// -------- Record Logs -------- | |
// Record all the transaction logs | |
function recordLogs() external; | |
// Gets all the recorded logs | |
function getRecordedLogs() external returns (Log[] memory logs); | |
// -------- Gas Metering -------- | |
// It's recommend to use the `noGasMetering` modifier included with forge-std, instead of | |
// using these functions directly. | |
// Pauses gas metering (i.e. gas usage is not counted). Noop if already paused. | |
function pauseGasMetering() external; | |
// Resumes gas metering (i.e. gas usage is counted again). Noop if already on. | |
function resumeGasMetering() external; | |
// ======== Test Configuration ======== | |
// If the condition is false, discard this run's fuzz inputs and generate new ones. | |
function assume(bool condition) external pure; | |
// Writes a breakpoint to jump to in the debugger | |
function breakpoint(string calldata char) external; | |
// Writes a conditional breakpoint to jump to in the debugger | |
function breakpoint(string calldata char, bool value) external; | |
// Returns the RPC url for the given alias | |
function rpcUrl(string calldata rpcAlias) external view returns (string memory json); | |
// Returns all rpc urls and their aliases `[alias, url][]` | |
function rpcUrls() external view returns (string[2][] memory urls); | |
// Returns all rpc urls and their aliases as structs. | |
function rpcUrlStructs() external view returns (Rpc[] memory urls); | |
// Suspends execution of the main thread for `duration` milliseconds | |
function sleep(uint256 duration) external; | |
// ======== OS and Filesystem ======== | |
// -------- Metadata -------- | |
// Returns true if the given path points to an existing entity, else returns false | |
function exists(string calldata path) external returns (bool result); | |
// Given a path, query the file system to get information about a file, directory, etc. | |
function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata); | |
// Returns true if the path exists on disk and is pointing at a directory, else returns false | |
function isDir(string calldata path) external returns (bool result); | |
// Returns true if the path exists on disk and is pointing at a regular file, else returns false | |
function isFile(string calldata path) external returns (bool result); | |
// Get the path of the current project root. | |
function projectRoot() external view returns (string memory path); | |
// Returns the time since unix epoch in milliseconds | |
function unixTime() external returns (uint256 milliseconds); | |
// -------- Reading and writing -------- | |
// Closes file for reading, resetting the offset and allowing to read it from beginning with readLine. | |
// `path` is relative to the project root. | |
function closeFile(string calldata path) external; | |
// Copies the contents of one file to another. This function will **overwrite** the contents of `to`. | |
// On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`. | |
// Both `from` and `to` are relative to the project root. | |
function copyFile(string calldata from, string calldata to) external returns (uint64 copied); | |
// Creates a new, empty directory at the provided path. | |
// This cheatcode will revert in the following situations, but is not limited to just these cases: | |
// - User lacks permissions to modify `path`. | |
// - A parent of the given path doesn't exist and `recursive` is false. | |
// - `path` already exists and `recursive` is false. | |
// `path` is relative to the project root. | |
function createDir(string calldata path, bool recursive) external; | |
// Reads the directory at the given path recursively, up to `max_depth`. | |
// `max_depth` defaults to 1, meaning only the direct children of the given directory will be returned. | |
// Follows symbolic links if `follow_links` is true. | |
function readDir(string calldata path) external view returns (DirEntry[] memory entries); | |
function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries); | |
function readDir(string calldata path, uint64 maxDepth, bool followLinks) | |
external | |
view | |
returns (DirEntry[] memory entries); | |
// Reads the entire content of file to string. `path` is relative to the project root. | |
function readFile(string calldata path) external view returns (string memory data); | |
// Reads the entire content of file as binary. `path` is relative to the project root. | |
function readFileBinary(string calldata path) external view returns (bytes memory data); | |
// Reads next line of file to string. | |
function readLine(string calldata path) external view returns (string memory line); | |
// Reads a symbolic link, returning the path that the link points to. | |
// This cheatcode will revert in the following situations, but is not limited to just these cases: | |
// - `path` is not a symbolic link. | |
// - `path` does not exist. | |
function readLink(string calldata linkPath) external view returns (string memory targetPath); | |
// Removes a directory at the provided path. | |
// This cheatcode will revert in the following situations, but is not limited to just these cases: | |
// - `path` doesn't exist. | |
// - `path` isn't a directory. | |
// - User lacks permissions to modify `path`. | |
// - The directory is not empty and `recursive` is false. | |
// `path` is relative to the project root. | |
function removeDir(string calldata path, bool recursive) external; | |
// Removes a file from the filesystem. | |
// This cheatcode will revert in the following situations, but is not limited to just these cases: | |
// - `path` points to a directory. | |
// - The file doesn't exist. | |
// - The user lacks permissions to remove the file. | |
// `path` is relative to the project root. | |
function removeFile(string calldata path) external; | |
// Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does. | |
// `path` is relative to the project root. | |
function writeFile(string calldata path, string calldata data) external; | |
// Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does. | |
// `path` is relative to the project root. | |
function writeFileBinary(string calldata path, bytes calldata data) external; | |
// Writes line to file, creating a file if it does not exist. | |
// `path` is relative to the project root. | |
function writeLine(string calldata path, string calldata data) external; | |
// -------- Foreign Function Interface -------- | |
// Performs a foreign function call via the terminal | |
function ffi(string[] calldata commandInput) external returns (bytes memory result); | |
// Performs a foreign function call via terminal and returns the exit code, stdout, and stderr | |
function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result); | |
// ======== Environment Variables ======== | |
// Sets environment variables | |
function setEnv(string calldata name, string calldata value) external; | |
// Reads environment variables, (name) => (value) | |
function envBool(string calldata name) external view returns (bool value); | |
function envUint(string calldata name) external view returns (uint256 value); | |
function envInt(string calldata name) external view returns (int256 value); | |
function envAddress(string calldata name) external view returns (address value); | |
function envBytes32(string calldata name) external view returns (bytes32 value); | |
function envString(string calldata name) external view returns (string memory value); | |
function envBytes(string calldata name) external view returns (bytes memory value); | |
// Reads environment variables as arrays | |
function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value); | |
function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value); | |
function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value); | |
function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value); | |
function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value); | |
function envString(string calldata name, string calldata delim) external view returns (string[] memory value); | |
function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value); | |
// Read environment variables with default value | |
function envOr(string calldata name, bool defaultValue) external returns (bool value); | |
function envOr(string calldata name, uint256 defaultValue) external returns (uint256 value); | |
function envOr(string calldata name, int256 defaultValue) external returns (int256 value); | |
function envOr(string calldata name, address defaultValue) external returns (address value); | |
function envOr(string calldata name, bytes32 defaultValue) external returns (bytes32 value); | |
function envOr(string calldata name, string calldata defaultValue) external returns (string memory value); | |
function envOr(string calldata name, bytes calldata defaultValue) external returns (bytes memory value); | |
// Read environment variables as arrays with default value | |
function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue) | |
external | |
returns (bool[] memory value); | |
function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue) | |
external | |
returns (uint256[] memory value); | |
function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue) | |
external | |
returns (int256[] memory value); | |
function envOr(string calldata name, string calldata delim, address[] calldata defaultValue) | |
external | |
returns (address[] memory value); | |
function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue) | |
external | |
returns (bytes32[] memory value); | |
function envOr(string calldata name, string calldata delim, string[] calldata defaultValue) | |
external | |
returns (string[] memory value); | |
function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue) | |
external | |
returns (bytes[] memory value); | |
// ======== User Management ======== | |
// Derives a private key from the name, labels the account with that name, and returns the wallet | |
function createWallet(string calldata walletLabel) external returns (Wallet memory wallet); | |
// Generates a wallet from the private key and returns the wallet | |
function createWallet(uint256 privateKey) external returns (Wallet memory wallet); | |
// Generates a wallet from the private key, labels the account with that name, and returns the wallet | |
function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet); | |
// Gets the label for the specified address | |
function getLabel(address account) external returns (string memory currentLabel); | |
// Get nonce for a Wallet. | |
// See `getNonce(address account)` for an alternative way to get a nonce. | |
function getNonce(Wallet calldata wallet) external returns (uint64 nonce); | |
// Labels an address in call traces | |
function label(address account, string calldata newLabel) external; | |
// Signs data, (Wallet, digest) => (v, r, s) | |
function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s); | |
// ======== Scripts ======== | |
// -------- Broadcasting Transactions -------- | |
// Using the address that calls the test contract, has the next call (at this call depth only) create a transaction that can later be signed and sent onchain | |
function broadcast() external; | |
// Has the next call (at this call depth only) create a transaction with the address provided as the sender that can later be signed and sent onchain | |
function broadcast(address signer) external; | |
// Has the next call (at this call depth only) create a transaction with the private key provided as the sender that can later be signed and sent onchain | |
function broadcast(uint256 privateKey) external; | |
// Using the address that calls the test contract, has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain | |
function startBroadcast() external; | |
// Has all subsequent calls (at this call depth only) create transactions with the address provided that can later be signed and sent onchain | |
function startBroadcast(address signer) external; | |
// Has all subsequent calls (at this call depth only) create transactions with the private key provided that can later be signed and sent onchain | |
function startBroadcast(uint256 privateKey) external; | |
// Stops collecting onchain transactions | |
function stopBroadcast() external; | |
// -------- Key Management -------- | |
// Derive a private key from a provided mnenomic string (or mnenomic file path) at the derivation path m/44'/60'/0'/0/{index} | |
function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey); | |
// Derive a private key from a provided mnenomic string (or mnenomic file path) at {derivationPath}{index} | |
function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index) | |
external | |
pure | |
returns (uint256 privateKey); | |
// Adds a private key to the local forge wallet and returns the address | |
function rememberKey(uint256 privateKey) external returns (address keyAddr); | |
// ======== Utilities ======== | |
// Convert values to a string | |
function toString(address value) external pure returns (string memory stringifiedValue); | |
function toString(bytes calldata value) external pure returns (string memory stringifiedValue); | |
function toString(bytes32 value) external pure returns (string memory stringifiedValue); | |
function toString(bool value) external pure returns (string memory stringifiedValue); | |
function toString(uint256 value) external pure returns (string memory stringifiedValue); | |
function toString(int256 value) external pure returns (string memory stringifiedValue); | |
// Convert values from a string | |
function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue); | |
function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue); | |
function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue); | |
function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue); | |
function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue); | |
function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue); | |
// Gets the creation bytecode from an artifact file. Takes in the relative path to the json file | |
function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode); | |
// Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file | |
function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode); | |
// ======== JSON Parsing and Manipulation ======== | |
// -------- Reading -------- | |
// NOTE: Please read https://book.getfoundry.sh/cheatcodes/parse-json to understand the | |
// limitations and caveats of the JSON parsing cheats. | |
// Checks if a key exists in a JSON object. | |
function keyExists(string calldata json, string calldata key) external view returns (bool); | |
// Given a string of JSON, return it as ABI-encoded | |
function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData); | |
function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData); | |
// The following parseJson cheatcodes will do type coercion, for the type that they indicate. | |
// For example, parseJsonUint will coerce all values to a uint256. That includes stringified numbers '12' | |
// and hex numbers '0xEF'. | |
// Type coercion works ONLY for discrete values or arrays. That means that the key must return a value or array, not | |
// a JSON object. | |
function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256); | |
function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory); | |
function parseJsonInt(string calldata json, string calldata key) external pure returns (int256); | |
function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory); | |
function parseJsonBool(string calldata json, string calldata key) external pure returns (bool); | |
function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory); | |
function parseJsonAddress(string calldata json, string calldata key) external pure returns (address); | |
function parseJsonAddressArray(string calldata json, string calldata key) | |
external | |
pure | |
returns (address[] memory); | |
function parseJsonString(string calldata json, string calldata key) external pure returns (string memory); | |
function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory); | |
function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory); | |
function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory); | |
function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32); | |
function parseJsonBytes32Array(string calldata json, string calldata key) | |
external | |
pure | |
returns (bytes32[] memory); | |
// Returns array of keys for a JSON object | |
function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys); | |
// -------- Writing -------- | |
// NOTE: Please read https://book.getfoundry.sh/cheatcodes/serialize-json to understand how | |
// to use the serialization cheats. | |
// Serialize a key and value to a JSON object stored in-memory that can be later written to a file | |
// It returns the stringified version of the specific JSON file up to that moment. | |
function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json); | |
function serializeBool(string calldata objectKey, string calldata valueKey, bool value) | |
external | |
returns (string memory json); | |
function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value) | |
external | |
returns (string memory json); | |
function serializeInt(string calldata objectKey, string calldata valueKey, int256 value) | |
external | |
returns (string memory json); | |
function serializeAddress(string calldata objectKey, string calldata valueKey, address value) | |
external | |
returns (string memory json); | |
function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value) | |
external | |
returns (string memory json); | |
function serializeString(string calldata objectKey, string calldata valueKey, string calldata value) | |
external | |
returns (string memory json); | |
function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value) | |
external | |
returns (string memory json); | |
function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values) | |
external | |
returns (string memory json); | |
function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values) | |
external | |
returns (string memory json); | |
function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values) | |
external | |
returns (string memory json); | |
function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values) | |
external | |
returns (string memory json); | |
function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values) | |
external | |
returns (string memory json); | |
function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values) | |
external | |
returns (string memory json); | |
function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values) | |
external | |
returns (string memory json); | |
// NOTE: Please read https://book.getfoundry.sh/cheatcodes/write-json to understand how | |
// to use the JSON writing cheats. | |
// Write a serialized JSON object to a file. If the file exists, it will be overwritten. | |
function writeJson(string calldata json, string calldata path) external; | |
// Write a serialized JSON object to an **existing** JSON file, replacing a value with key = <value_key> | |
// This is useful to replace a specific value of a JSON file, without having to parse the entire thing | |
function writeJson(string calldata json, string calldata path, string calldata valueKey) external; | |
} | |
// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used | |
// in tests, but it is not recommended to use these cheats in scripts. | |
interface Vm is VmSafe { | |
// ======== EVM ======== | |
// -------- Block and Transaction Properties -------- | |
// Sets block.chainid | |
function chainId(uint256 newChainId) external; | |
// Sets block.coinbase | |
function coinbase(address newCoinbase) external; | |
// Sets block.difficulty | |
// Not available on EVM versions from Paris onwards. Use `prevrandao` instead. | |
// If used on unsupported EVM versions it will revert. | |
function difficulty(uint256 newDifficulty) external; | |
// Sets block.basefee | |
function fee(uint256 newBasefee) external; | |
// Sets block.prevrandao | |
// Not available on EVM versions before Paris. Use `difficulty` instead. | |
// If used on unsupported EVM versions it will revert. | |
function prevrandao(bytes32 newPrevrandao) external; | |
// Sets block.height | |
function roll(uint256 newHeight) external; | |
// Sets tx.gasprice | |
function txGasPrice(uint256 newGasPrice) external; | |
// Sets block.timestamp | |
function warp(uint256 newTimestamp) external; | |
// -------- Account State -------- | |
// Sets an address' balance | |
function deal(address account, uint256 newBalance) external; | |
// Sets an address' code | |
function etch(address target, bytes calldata newRuntimeBytecode) external; | |
// Resets the nonce of an account to 0 for EOAs and 1 for contract accounts | |
function resetNonce(address account) external; | |
// Sets the nonce of an account; must be higher than the current nonce of the account | |
function setNonce(address account, uint64 newNonce) external; | |
// Sets the nonce of an account to an arbitrary value | |
function setNonceUnsafe(address account, uint64 newNonce) external; | |
// Stores a value to an address' storage slot. | |
function store(address target, bytes32 slot, bytes32 value) external; | |
// -------- Call Manipulation -------- | |
// --- Mocks --- | |
// Clears all mocked calls | |
function clearMockedCalls() external; | |
// Mocks a call to an address, returning specified data. | |
// Calldata can either be strict or a partial match, e.g. if you only | |
// pass a Solidity selector to the expected calldata, then the entire Solidity | |
// function will be mocked. | |
function mockCall(address callee, bytes calldata data, bytes calldata returnData) external; | |
// Mocks a call to an address with a specific msg.value, returning specified data. | |
// Calldata match takes precedence over msg.value in case of ambiguity. | |
function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external; | |
// Reverts a call to an address with specified revert data. | |
function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external; | |
// Reverts a call to an address with a specific msg.value, with specified revert data. | |
function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData) | |
external; | |
// --- Impersonation (pranks) --- | |
// Sets the *next* call's msg.sender to be the input address | |
function prank(address msgSender) external; | |
// Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called | |
function startPrank(address msgSender) external; | |
// Sets the *next* call's msg.sender to be the input address, and the tx.origin to be the second input | |
function prank(address msgSender, address txOrigin) external; | |
// Sets all subsequent calls' msg.sender to be the input address until `stopPrank` is called, and the tx.origin to be the second input | |
function startPrank(address msgSender, address txOrigin) external; | |
// Resets subsequent calls' msg.sender to be `address(this)` | |
function stopPrank() external; | |
// Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification | |
function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin); | |
// -------- State Snapshots -------- | |
// Snapshot the current state of the evm. | |
// Returns the id of the snapshot that was created. | |
// To revert a snapshot use `revertTo` | |
function snapshot() external returns (uint256 snapshotId); | |
// Revert the state of the EVM to a previous snapshot | |
// Takes the snapshot id to revert to. | |
// This deletes the snapshot and all snapshots taken after the given snapshot id. | |
function revertTo(uint256 snapshotId) external returns (bool success); | |
// -------- Forking -------- | |
// --- Creation and Selection --- | |
// Returns the identifier of the currently active fork. Reverts if no fork is currently active. | |
function activeFork() external view returns (uint256 forkId); | |
// Creates a new fork with the given endpoint and block and returns the identifier of the fork | |
function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId); | |
// Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork | |
function createFork(string calldata urlOrAlias) external returns (uint256 forkId); | |
// Creates a new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before the transaction, | |
// and returns the identifier of the fork | |
function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId); | |
// Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork | |
function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId); | |
// Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, replays all transaction mined in the block before | |
// the transaction, returns the identifier of the fork | |
function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId); | |
// Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork | |
function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId); | |
// Updates the currently active fork to given block number | |
// This is similar to `roll` but for the currently active fork | |
function rollFork(uint256 blockNumber) external; | |
// Updates the currently active fork to given transaction | |
// this will `rollFork` with the number of the block the transaction was mined in and replays all transaction mined before it in the block | |
function rollFork(bytes32 txHash) external; | |
// Updates the given fork to given block number | |
function rollFork(uint256 forkId, uint256 blockNumber) external; | |
// Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block | |
function rollFork(uint256 forkId, bytes32 txHash) external; | |
// Takes a fork identifier created by `createFork` and sets the corresponding forked state as active. | |
function selectFork(uint256 forkId) external; | |
// Fetches the given transaction from the active fork and executes it on the current state | |
function transact(bytes32 txHash) external; | |
// Fetches the given transaction from the given fork and executes it on the current state | |
function transact(uint256 forkId, bytes32 txHash) external; | |
// --- Behavior --- | |
// In forking mode, explicitly grant the given address cheatcode access | |
function allowCheatcodes(address account) external; | |
// Marks that the account(s) should use persistent storage across fork swaps in a multifork setup | |
// Meaning, changes made to the state of this account will be kept when switching forks | |
function makePersistent(address account) external; | |
function makePersistent(address account0, address account1) external; | |
function makePersistent(address account0, address account1, address account2) external; | |
function makePersistent(address[] calldata accounts) external; | |
// Revokes persistent status from the address, previously added via `makePersistent` | |
function revokePersistent(address account) external; | |
function revokePersistent(address[] calldata accounts) external; | |
// Returns true if the account is marked as persistent | |
function isPersistent(address account) external view returns (bool persistent); | |
// ======== Test Assertions and Utilities ======== | |
// Expects a call to an address with the specified calldata. | |
// Calldata can either be a strict or a partial match | |
function expectCall(address callee, bytes calldata data) external; | |
// Expects given number of calls to an address with the specified calldata. | |
function expectCall(address callee, bytes calldata data, uint64 count) external; | |
// Expects a call to an address with the specified msg.value and calldata | |
function expectCall(address callee, uint256 msgValue, bytes calldata data) external; | |
// Expects given number of calls to an address with the specified msg.value and calldata | |
function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external; | |
// Expect a call to an address with the specified msg.value, gas, and calldata. | |
function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external; | |
// Expects given number of calls to an address with the specified msg.value, gas, and calldata. | |
function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external; | |
// Expect a call to an address with the specified msg.value and calldata, and a *minimum* amount of gas. | |
function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external; | |
// Expect given number of calls to an address with the specified msg.value and calldata, and a *minimum* amount of gas. | |
function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count) | |
external; | |
// Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData). | |
// Call this function, then emit an event, then call a function. Internally after the call, we check if | |
// logs were emitted in the expected order with the expected topics and data (as specified by the booleans). | |
function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external; | |
// Same as the previous method, but also checks supplied address against emitting contract. | |
function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter) | |
external; | |
// Prepare an expected log with all topic and data checks enabled. | |
// Call this function, then emit an event, then call a function. Internally after the call, we check if | |
// logs were emitted in the expected order with the expected topics and data. | |
function expectEmit() external; | |
// Same as the previous method, but also checks supplied address against emitting contract. | |
function expectEmit(address emitter) external; | |
// Expects an error on next call that exactly matches the revert data. | |
function expectRevert(bytes calldata revertData) external; | |
// Expects an error on next call that starts with the revert data. | |
function expectRevert(bytes4 revertData) external; | |
// Expects an error on next call with any revert data. | |
function expectRevert() external; | |
// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other | |
// memory is written to, the test will fail. Can be called multiple times to add more ranges to the set. | |
function expectSafeMemory(uint64 min, uint64 max) external; | |
// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext. | |
// If any other memory is written to, the test will fail. Can be called multiple times to add more ranges | |
// to the set. | |
function expectSafeMemoryCall(uint64 min, uint64 max) external; | |
// Marks a test as skipped. Must be called at the top of the test. | |
function skip(bool skipTest) external; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment