Skip to content

coolberwin/BatchMinter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BatchMinter

一个合约Mint工具 原本只针对于批量撸XEN,但是参考 简单实现一个通用型薅羊毛合约 并借鉴其代码进行开发

文档简要说明

  • contracts
    • BatcherV0.sol 最基础的批量mint合约 利用create 批量创建合约
    • BatcherV1.sol 利用汇编create2创建合约 但存在问题
    • BatcherV2.sol 利用汇编create2创建合约 修复问题
    • BatcherV3.sol 通用批量Mint合约 而非只针对于XEN 汇编create2创建合约,调用方法和参数以call data方式通过js脚本传入

BatcherV2.sol 只在 BatcherV1.sol的基础上

address private original; 修改为
address private immutable original;

  • test
    • batcherV0.js 测试BatcherV0.sol
    • batcherV1.js 测试BatcherV1.sol
    • batcherV1Attack.js 测试BatcherV1.sol存在的权限Bug
    • batcherV2.js 测试BatcherV2.sol
    • batcherV3.js 测试BatcherV3.sol

gas费消耗对比

10个账号的对比,大批量下miniproxy消耗gas费更少

BatcherV0.sol

create创建合约

BatcherV1.sol

汇编create2创建合约

BatcherV3.sol

汇编create2创建合约,调用方法和参数以call data方式通过js脚本传入

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors