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 "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; | |
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; | |
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; | |
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; | |
contract MyToken is Initializable, ERC721Upgradeable, OwnableUpgradeable, UUPSUpgradeable { |
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.1; | |
import "./Proxiable.sol"; | |
contract MyContract is Proxiable { | |
address public owner; | |
uint public count; |
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 "@openzeppelin/contracts/utils/math/SafeMath.sol"; | |
import "@aave/core-v3/contracts/flashloan/base/FlashLoanSimpleReceiverBase.sol"; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
contract SimpleFlashLoan is FlashLoanSimpleReceiverBase { | |
using SafeMath for uint; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Wallet Connect</title> | |
<script src="https://cdn.jsdelivr.net/npm/@walletconnect/web3-provider@1.7.1/dist/umd/index.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script> | |
</head> | |
<body> |
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 "@openzeppelin/contracts@4.7.3/token/ERC20/ERC20.sol"; | |
import "@openzeppelin/contracts@4.7.3/token/ERC20/extensions/draft-ERC20Permit.sol"; | |
contract MyToken is ERC20, ERC20Permit { | |
constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {} | |
function mint(address to, uint256 value) 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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.15; | |
import "erc721a/contracts/ERC721A.sol"; | |
contract BASENFT is ERC721A { | |
constructor() ERC721A("BASE URI NFT", "BUN") {} | |
function mint(uint256 quantity) external payable { | |
// `_mint`'s second argument now takes in a `quantity`, not a `tokenId`. |
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
// Try using this as URI ipfs://bafkreic6ov4qo4ucd4g4uuyve4h72nc4y2lg7ugtq3n3vxnfp3lojvtmdu | |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
import "@openzeppelin/contracts@4.7.0/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/contracts@4.7.0/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import "@openzeppelin/contracts@4.7.0/access/Ownable.sol"; | |
import "@openzeppelin/contracts@4.7.0/utils/Counters.sol"; |
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 "@openzeppelin/contracts@4.7.1/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/contracts@4.7.1/access/Ownable.sol"; | |
import "@openzeppelin/contracts@4.7.1/utils/Counters.sol"; | |
contract MyToken is ERC721, Ownable { | |
using Counters for Counters.Counter; |
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 "@openzeppelin/contracts@4.6.0/token/ERC20/ERC20.sol"; | |
import "@openzeppelin/contracts@4.6.0/token/ERC721/IERC721.sol"; | |
import "@openzeppelin/contracts@4.6.0/access/Ownable.sol"; | |
import "@openzeppelin/contracts@4.6.0/token/ERC20/extensions/draft-ERC20Permit.sol"; | |
import "@openzeppelin/contracts@4.6.0/token/ERC721/utils/ERC721Holder.sol"; | |
contract FractionalizedNFT is ERC20, Ownable, ERC20Permit, ERC721Holder { |
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.15; | |
import "erc721a/contracts/ERC721A.sol"; | |
contract MyNFT is ERC721A { | |
constructor() ERC721A("MyNFT", "MNFT") {} | |
function mint(uint256 quantity) external payable { | |
// `_mint`'s second argument now takes in a `quantity`, not a `tokenId`. |
NewerOlder