# quickMint **Repository Path**: fengpangzi_space/quick-mint ## Basic Information - **Project Name**: quickMint - **Description**: 抢公开发售脚本框架. - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-02-09 - **Last Updated**: 2023-02-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: NFT, token ## README # 抢公开发售脚本框架 具体目标:如合约管理员发起开放 mint 权限的交易,在此交易的同一区块中,同时发起 mint 交易. 从而达到抢购的目的 具体流程: 交易信息准备(设置好所需调用的合约方法与参数) -> await 检测合约管理员有无发起调用开始发售函数的交易 -> 有即立刻发起交易 # Pre-requirement 1. Nodejs.v14 2. Alchemy wss api # Configuration 配置文件各参数: // 钱包私钥 privateKey: '', // 钱包地址 fromAddress: ''.toLocaleLowerCase(), // 合约地址 toAddress: ''.toLocaleLowerCase(), // 合约管理员地址 creatorAddress: ''.toLocaleLowerCase(), // 发送的 token 数量 price: '0.08', // required. How many items you wants to buy maxPriorityFeePerGas: '200', // required. The collection contract address you want to buy maxFeePerGas: '300', // 调用合约函数所需的入参 param: ['1'], // number: "1", //http provider wssMainnet: 'wss://eth-mainnet.alchemyapi.io/v2/', wssRinkeby: 'wss://eth-rinkeby.alchemyapi.io/v2/', wssGoerli: 'wss://eth-goerli.alchemyapi.io/v2/', // 网络选择 network: '', // 定时开始时间指定 time: 1644069600 In public.js, 需要自定义修改的地方 1. 具体调用合约的函数名称 //----------------------------------------------------------------- //--------------- Change this function every time------------------ let extraData = await contract.methods.mint(config.param[0]); //----------------------------------------------------------------- //----------------------------------------------------------------- 2. 合约管理员调用的函数名称 //----------------------------------------------------------------- //--------------- Change this function every time------------------ if((decodedData.name == 'XXX')){ //----------------------------------------------------------------- //----------------------------------------------------------------- 在 ABI.JSON 中修改目标合约的 ABI 文件