Coder Social home page Coder Social logo

evm-inscription-mint's Introduction

兼容EVM链的铭文自动化Mint脚本

🛠 使用说明

Step 1: 首先安装 nodejs

先去 Nodejs 官网下载安装自己电脑操作系统对应的版本

https://nodejs.org/en

然后看一下安装的版本,是否安装成功

node -v
npm -v

如果你更喜欢使用 yarn 则安装 yarn

npm i -g yarn

Step 2: 下载脚本源代码

先用 git clone 源代码到本地

git clone https://github.com/sfter/evm-inscription-mint.git

cd evm-inscription-mint

如果是 Windows 电脑没有安装 git,先去下面网站下载安装 git 软件

https://gitforwindows.org

Step 3: 重命名当前目录下的 config.js.example 为 config.js 文件

cp config.js.example config.js

Step 4: 修改当前目录下的 config.js 配置文件

const config = {
    // 你想要打多少张,这里就设置多少,建议单次别超过 50,不然容易不上链
    repeatCount: 1,

    // 在当前的 gas 基础上增加多少倍
    increaseGas: 1.2,

    // 你钱包的私钥
    privateKey: "",

    // 铭文json数据(替换成你想打的铭文json格式数据)
    tokenJson: 'data:,{"p":"fair-20","op":"mint","tick":"fair","amt":"1000"}',

    // RPC结点(兼容 evm 链都行)打哪条链就用哪条链的节点地址
    // eth =>  https://mainnet.infura.io/v3
    // arb => https://arb1.arbitrum.io/rpc
    // polygon => https://polygon-rpc.com
    // op => https://mainnet.optimism.io
    // linea => https://mainnet.infura.io/v3
    // scroll => https://rpc.scroll.io
    // zks => https://mainnet.era.zksync.io
    rpcUrl: "https://arb1.arbitrum.io/rpc"
}

Step 5: 安装依赖包

npm i

or

yarn install

Step 6: 运行 Mint 脚本程序

node index.js

or

yarn start

or

npm run start

evm-inscription-mint's People

Contributors

sfter avatar stonega avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

evm-inscription-mint's Issues

作者麻烦看下这个参数是否有必要呢?

async function sendTransactions() {
const currentNonce = await getCurrentNonce(wallet);
const gasPrice = await getGasPrice();

for (let i = 0; i < config.repeatCount; i++) {
await sendTransaction(currentNonce + i, gasPrice);
}
}

await sendTransaction(currentNonce + i, gasPrice); 这句,这个gasPrice参数是不是没有必要?

报错,在有服务费得时候报错找不到

reason: 'processing response error',
code: 'SERVER_ERROR',
body: {"jsonrpc":"2.0","error":{"code":3,"message":"invalid sender. can't start a transaction from a non-account","data":"0x"},"id":50},

mint


  "p": "GRC20",
  "op": "mint",
  "tick": "GitHub",
  "amt": "2000"
}

报错

Error in transaction with nonce 10503: processing response error (body="{"jsonrpc":"2.0","id":56,"error":{"code":-32000,"message":"transaction underpriced"}}", error={"code":-32000}, requestBody="{"method":"eth_sendRawTransaction","params":["0x02f8a381cc82290780808255d8947f3afe1e5097f298ea8c405bb731c2c9915ffc2b80b83d646174613a2c7b2270223a226f70622d3230222c226f70223a226d696e74222c227469636b223a226f70626e6273222c22616d74223a2231303030227dc001a08dfb418f6a0efbb91306ef3fca9df26150bfcfe46e4181c9bb82ebfead77710fa0113110aa58dd8b1bcd49303b158fdc30f7307aaffdeceef970b84b7b34d9396d"],"id":56,"jsonrpc":"2.0"}", requestMethod="POST", url="https://opbnb-mainnet-rpc.bnbchain.org", code=SERVER_ERROR, version=web/5.7.1)

Mint


  "p": "GRC20",
  "op": "mint",
  "tick": "GitHub",
  "amt": "2000"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.