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.18; | |
| contract BuyMeACoffee { | |
| uint256 totalCoffee; | |
| address payable public owner; | |
| constructor() payable { | |
| owner = payable(msg.sender); | |
| } |
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
| body { | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| flex-direction: column; | |
| font-family: sans-serif; | |
| } | |
| h1 { | |
| color: coral; | |
| } |
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
| @import url("https://fonts.googleapis.com/css2?family=Fira+Sans:wght@700&display=swap"); | |
| html { | |
| height: 100%; | |
| } | |
| body { | |
| font-family: "Noto Sans TC"; | |
| width: 100%; | |
| height: 100%; |
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
| import axios, { AxiosError } from "axios"; | |
| import { GetServerSidePropsContext } from "next"; | |
| import Router from "next/router"; | |
| const isServer = () => { | |
| return typeof window === "undefined"; | |
| } | |
| let accessToken = ""; | |
| let context = <GetServerSidePropsContext>{}; |
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
| # | |
| # This file provides an application definition that can be used with | |
| # PM2 ("Production Process Manager"). | |
| # | |
| # PM2 "allows you to keep applications alive forever, to reload them | |
| # without downtime and to facilitate common system admin tasks." | |
| # | |
| # Use this file by running it with PM2. For example: | |
| # $> pm2 start laravel-queue-worker.pm2.yml | |
| # |
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
| name: Deploy | |
| on: | |
| push: | |
| branches: | |
| - production | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest |
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.4; | |
| import "@openzeppelin/[email protected]/token/ERC721/ERC721.sol"; | |
| import "@openzeppelin/[email protected]/access/Ownable.sol"; | |
| import "@openzeppelin/[email protected]/utils/Counters.sol"; | |
| contract KryptoCampBlindBoxNft is ERC721, Ownable { | |
| using Counters for Counters.Counter; | |
| using Strings for 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: MIT | |
| pragma solidity ^0.8.4; | |
| import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
| contract HazelToken is ERC20 { | |
| // 調整 mint 數量,確定能夠拿到 10,000 個 ERC20 Token | |
| uint256 public initialSupply = 10000; | |
| // 嘗試修改 name 與 symbol |
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.0; | |
| import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
| contract HazelNFT is ERC721 { | |
| // TODO: 改掉 name, symbol | |
| constructor() ERC721("HazelNFT", "HZ") {} | |
| function mint(uint256 tokenId) public { |
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.4; | |
| import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
| contract RugPullToken is ERC20 { | |
| constructor(uint256 initialSupply) ERC20("Rug Pull", "RP") { | |
| } |
NewerOlder