# yolo-contract **Repository Path**: tree3170/yolo-contract ## Basic Information - **Project Name**: yolo-contract - **Description**: weewdssddsds - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-04-10 - **Last Updated**: 2025-10-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # yolo-contract ## Envirenment - **Node** Recommended version: v18.16.1 - **Foundry** Version: forge 0.2.0 ## Install Dependencies ```sh npm install ``` ## Configuration 1. create `.env` file. ```sh # copy from .env.example file cp .env.example .env # edit it vim .env ``` 2. Config fileds like the following ``` PRIVATE_KEY= LOCAL_HOST=http://127.0.0.1:7545 URL_SEPOLIA= URL_ARB= URL_ARB_SEPOLIA= ETHERSCAN_API_KEY= ARBSCAN_API_KEY= ``` ## Compile ```sh forge build ``` ## Test ```sh forge test ``` ## Deploy 1. `USD8.sol`: ```sh npx hardhat run script/deploy/deploy_usd8.js --network ``` e.g. ```sh npx hardhat run script/deploy/deploy_usd8.js --network blastSepolia ``` > Note: > > The network `blastSepolia` need to be configured in hardhat.config.js. 2. `TokenHolder.sol` ```sh npx hardhat run script/deploy/deploy_tokenHolder.js --network ``` npx hardhat run script/test/test_player.js --network blastSepolia e.g. ```sh npx hardhat run script/deploy/deploy_tokenHolder.js --network blastSepolia ``` 3. `YoloVRF.sol` ```sh npx hardhat run script/deploy/deploy_yolovrf.js --network ``` e.g. ```sh npx hardhat run script/deploy/deploy_yolovrf.js --network blastSepolia ``` 4. `Airplane.sol` ```sh npx hardhat run script/deploy/deploy_airplane_all.js --network ``` e.g. ```sh npx hardhat run script/deploy/deploy_airplane_all.js --network blastSepolia ``` 5. `Player.sol` ```sh npx hardhat run script/deploy/deploy_player.js --network blastSepolia ``` 6. `Hunt.sol` ```sh npx hardhat run script/deploy/deploy_hunt.js --network blastSepolia ``` ##Source code verify: npx hardhat verify --network blastSepolia 0xD2Dc8a29fC00aa55d05E2988329B15711fb88626 "0x413D9E821Bfc54D9B3D6B64a5c5c725502617463" ## Flatten a contract If you prefer to verify the contract with single file model you may need to flatten the contract, like following: ```solidity npx hardhat flatten > # For example: npx hardhat flatten src/YoloVRF.sol > YoloVRF_flatten.sol ``` ### VRF Settings Gelato VRF Operator Address: | Netowork | Operator Address | | ------------- | -------------------------------------------- | | Blast Mainnet | `0xCFB75946120666eeC2Ad2BDbDB43B8ad7f8Ff681` | | Blast Testnet | `0x413D9E821Bfc54D9B3D6B64a5c5c725502617463` | --- U8Token 主网地址:0xa0015A2A4b428A6AF178c76a8f4f50BD8d6F0440 https://blastscan.io/address/0xa0015A2A4b428A6AF178c76a8f4f50BD8d6F0440#readContract TokenHolder 主网地址:0x7b8097dc88c8F00a260189986314C21299021231 https://blastscan.io/address/0x7b8097dc88c8F00a260189986314C21299021231#readContract YoloVRF 主网地址:0x52D64A3A7e790968Df2ef07eCd78F7326A1CEb0e https://blastscan.io/address/0x52D64A3A7e790968Df2ef07eCd78F7326A1CEb0e#code YoloVRF 测试完地址:0x8fACB07873baF011146C8A4e22C0693735f72CC3 https://sepolia.blastscan.io/address/0x8fACB07873baF011146C8A4e22C0693735f72CC3 YoloVRF 1.1 最新 测试完地址:0xefbA009a2133753be68114747Ce8301A515D1599 https://sepolia.blastscan.io/address/0xefbA009a2133753be68114747Ce8301A515D1599 YoloVRF 1.1 最新 1 测试完地址:0xF80AEfF6E4e746706CcF0D0Ed41b36b74119e2d1 https://sepolia.blastscan.io/address/0xF80AEfF6E4e746706CcF0D0Ed41b36b74119e2d1 dicadetemessagenr: 0x413D9E821Bfc54D9B3D6B64a5c5c725502617463 项目测试 caller: 0xDF0f660475D0F73D6b055d94FDFec6ba4F67Ee83 Airplane blastSepolia deploy address: "U8Token": "0x9716642c2C83291390ED42EBb2A6A932D8beBE27", "TokenHolder": "0xFFd5E723a69a0E93B6345eE64439Aa7e688BEc06", "Airplane": "0xD2Dc8a29fC00aa55d05E2988329B15711fb88626" //ROUNDID FROM 3 https://sepolia.blastscan.io/address/0xD2Dc8a29fC00aa55d05E2988329B15711fb88626 "U8Token": "0x74C4fADb3827b7C7Bf098BA8dd8789Bcec835312", "TokenHolder": "0xA888B934A1De72b3A5aeC959eAFa36F471bb88D3", "Airplane": "0x27839fC672cFee2DcDf54dA734643898b0bfF005" "U8Token": "0xe49420Fb9A5861824d91cd22FA9416eB7d76547e", "TokenHolder": "0x34d1dD57ad36Bb5AD7aB2814572dADeD7A022791", "Airplane": "0xd6A1b273DaA603762Ad7a8963eC329447895540c" Player deploy address: 0xd42846EA5B0DE422Accfb635cB61E0b54798B1eC 0xBDddaE767De905DB602F0Dd2c78c63148c0a4847 Hunt 合约测试地址 1(部署用 deploy_hunt.js,测试用 test_hunt.js): "U8Token": "0xB2B6C9B8504A6f1f927Cfe5752BbAD6E92602EC1", "TokenHolder": "0x60F0a3DEcEE2d304EE56Aa26c712737C83D700CD", "Airplane": "0xd6A1b273DaA603762Ad7a8963eC329447895540c", "Player": "0xd42846EA5B0DE422Accfb635cB61E0b54798B1eC", "hunt": "0xa5A99281A5E56b5EA1c5C1681c975b08Ab7A801a" Hunt 合约测试地址 2(部署用 deploy_hunt.js,测试用 test_hunt.js): "hunt": "0x3fA83EC03F6D483fc92B9c70a627eFC1C1bC20A6" https://testnet.blastscan.io/address/0x3fa83ec03f6d483fc92b9c70a627efc1c1bc20a6#code Hunt 合约测试地址 3(部署用 deploy_hunt.js,测试用 test_hunt.js): "hunt": "0x72F1ef209EdC1403834ee760f145baE7772624ed" https://testnet.blastscan.io/address/0x72f1ef209edc1403834ee760f145bae7772624ed#code Hunt 1.1: 0xB019Bff3CBe887f43dA05d1f077ffbfcEeA1ac74 https://testnet.blastscan.io/address/0xB019Bff3CBe887f43dA05d1f077ffbfcEeA1ac74#code Hunt 1.1 new: 0x2Aa11dD64e4795f5394680A25aC1e03dca0Eda6a https://testnet.blastscan.io/address/0x2Aa11dD64e4795f5394680A25aC1e03dca0Eda6a#code Airplane 1.1 需求 合约测试地址(部署用 deploy_airplane_new.js,测试用 test_airplane_new.js): "U8Token": "0x8Dd0716B8Be82217FEC8F2d9334B1c6291281014", "TokenHolder": "0x59AAc6E3BD98b93103903c37CD257f8E4fFa278d", "Airplane": "0x532d68e1d36518D9E63De2DEd84187C28DDA6DF2", "Query": "0x6E5f28DBbfaf1cDD9C230674d764Ab569FD1A93f"