This file contains hidden or 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: GPL-3.0-or-later | |
pragma solidity >=0.8.4; | |
contract ETHfeed { | |
uint256 feeRate; | |
address feeReceiver; | |
constructor(uint256 feeRate_) { |
This file contains hidden or 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: UNLICENSED | |
pragma solidity >=0.8.0; | |
/// @notice Basic ERC20 implementation. | |
contract ERC20 { | |
string public name; | |
string public symbol; | |
uint8 constant public decimals = 18; | |
uint public totalSupply; | |
This file contains hidden or 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: GPL-3.0-or-later | |
pragma solidity >=0.8.4; | |
import "https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol"; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol"; | |
contract FERC721 is ERC721("FERC721", "FERC"), Ownable { | |
string public baseURI; |
This file contains hidden or 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: GPL-3.0-or-later | |
pragma solidity >=0.8.4; | |
import "https://github.com/Rari-Capital/solmate/src/tokens/ERC721.sol"; | |
interface IOwnable { | |
function owner() external view returns (address); | |
} |
This file contains hidden or 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: GPL-3.0-or-later | |
pragma solidity >=0.8.4; | |
import "https://github.com/Rari-Capital/solmate/src/tokens/ERC721.sol"; | |
import "https://github.com/kalidao/kali-contracts/blob/main/contracts/utils/NFThelper.sol"; | |
/// @notice Minimal ERC-20 interface. | |
interface IERC20minimal { | |
function balanceOf(address account) external view returns (uint256); |
This file contains hidden or 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; | |
import "https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol"; | |
/// @notice 1-of-1 NFT. | |
contract SingleNFT is ERC721 { | |
string internal URI; | |
constructor( |
This file contains hidden or 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: GPL-3.0-or-later | |
pragma solidity >=0.8.4; | |
/// @notice Babylonian method for computing square roots. | |
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol) | |
library SqrtMath { | |
function sqrt(uint256 x) internal pure returns (uint256 z) { | |
assembly { | |
// start off with z at 1 |
This file contains hidden or 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.10; | |
import "https://github.com/lexDAO/Kali/blob/main/contracts/tokens/erc20/ERC20.sol"; | |
interface IERC20 { | |
function balance(address account) external view returns (uint256); | |
function transfer(address to, uint256 amount) external; | |
} |
This file contains hidden or 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.10; | |
contract Payment { | |
address public payee = msg.sender; | |
string public agreement; | |
uint256 public payment = 0.1 ether; |
This file contains hidden or 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: GPL-3.0 | |
pragma solidity =0.5.16; | |
import "https://github.com/Uniswap/v2-core/blob/master/contracts/interfaces/IUniswapV2Pair.sol"; | |
import "https://github.com/Uniswap/v2-core/blob/master/contracts/UniswapV2ERC20.sol"; | |
import "https://github.com/Uniswap/v2-core/blob/master/contracts/libraries/Math.sol"; | |
import "https://github.com/Uniswap/v2-core/blob/master/contracts/libraries/UQ112x112.sol"; | |
import "https://github.com/Uniswap/v2-core/blob/master/contracts/interfaces/IUniswapV2Factory.sol"; | |
import "https://github.com/Uniswap/v2-core/blob/master/contracts/interfaces/IUniswapV2Callee.sol"; |