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
// SPDX-License-Identifier: AGPL-3.0-only | |
pragma solidity ^0.8.19; | |
/// @notice Dollars-to-donuts exchange. | |
/// Put in one thing for another thing. | |
contract CTX { | |
IERC20 constant C = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); // Circle dollars. | |
IERC20 constant T = IERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7); // Tether dollars. | |
uint256 constant F = 1; // Fee is just a lil bit. Placeholder. Someone should do the math. |
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
// SPDX-License-Identifier: AGPL-3.0-only | |
pragma solidity ^0.8.19; | |
/// @notice Receiver mixin for ETH and safe-transferred ERC721 and ERC1155 tokens. | |
/// @author Solady (https://github.com/Vectorized/solady/blob/main/src/accounts/Receiver.sol) | |
/// | |
/// @dev Note: | |
/// - Handles all ERC721 and ERC1155 token safety callbacks. | |
/// - Collapses function table gas overhead and code size. | |
/// - Utilizes fallback so unknown calldata will pass on. |
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
// SPDX-License-Identifier: AGPL-3.0-only | |
pragma solidity >=0.8.0; | |
/// @dev ERC223ish | |
/// @author z0r0z | |
contract ERC223ish { | |
event Approval(address indexed from, address indexed to, uint amt); | |
event Transfer(address indexed from, address indexed to, uint amt); | |
event Transfer(address indexed from, address indexed to, uint amt, bytes 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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
import "https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC721.sol"; | |
import "https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol"; | |
struct OTC { | |
address to; | |
ERC20 tkn0; | |
uint256 tkn0amt; |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
error DeploymentFailed(); | |
address constant TURNSTILE = 0xEcf044C5B4b867CFda001101c617eCd347095B44; | |
/// @notice Minimal proxy library. | |
/// @author Modified from Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol) | |
library LibClone { |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
contract TheGame { | |
// Nothing to see here yet. | |
} |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
/// @notice Simple single owner authorization mixin with timer for guardianship. | |
/// @author Zolidity (https://github.com/z0r0z/zolidity/blob/main/src/auth/OwnedWithTimer.sol) | |
/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol) | |
contract OwnedWithTimer { | |
/// ----------------------------------------------------------------------- | |
/// Events | |
/// ----------------------------------------------------------------------- |
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
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.16; | |
/// @dev The ETH transfer has failed. | |
error ETHTransferFailed(); | |
/// @dev Sends `amount` (in wei) ETH to `to`. | |
/// Reverts upon failure. | |
function safeTransferETH(address to, uint256 amount) { | |
assembly { |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/interfaces/IERC20.sol"; | |
import "@openzeppelin/contracts/interfaces/IERC721.sol"; | |
import "@openzeppelin/contracts/interfaces/IERC721Receiver.sol"; | |
import "@openzeppelin/contracts/interfaces/IERC1155.sol"; | |
import "@openzeppelin/contracts/interfaces/IERC1155Receiver.sol"; | |
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; |
NewerOlder