Giter VIP home page Giter VIP logo

adventure's Introduction

Adventure

1. 编译

make

2. 操作

2.1 初始化账户

adventure evm batch-transfer 10 -i ${ip} -s ${private_key} -a ${address_file}
  • -i: ip地址
    • 必填
    • 支持cosmos端口、eth端口
  • -s: 私钥 (不是助记词)
    • 必填
    • 对应地址,拥有足够的okt
  • -a: 账户地址文件路径
    • 选填,如果为空,代码默认内置2000个固定账户
    • 0x地址格式

2.2 压力测试

公共参数

  • --ips, -i: ip地址列表
    • 必填
    • 支持cosmos、eth两者的域名或ip地址
  • --concurrency, -c: 启动的协程数量
    • 选填, 默认1
  • --sleep, -t: 单协程的每轮睡眠时间,毫秒
    • 选填, 默认1000ms
  • --private-key-file, -p: 账户私钥文件路径
    • 选填, 如果为空,代码默认内置2000个固定账户
    • 私钥 (不是助记词)

2.2.1 转账

adventure evm bench transfer -i ${ip1},${ip2},${ip3} -c 100 -p ${private_key_file}
  • --fixed, -f: 转账to地址是否固定一个
    • 选填
    • false, 默认, 每个账户转到对应的一个固定地址
    • true, 所有交易均转到同一个地址

2.2.2 压力测试合约

adventure evm bench operate -i ${ip1},${ip2},${ip3} -c 100 --opts 1,1,1,1,1 --times 1 --contract 0x6cc0277c979325800294774d7ae478A96B824271 --id 0 
  • --contract: router合约地址或测试合约地址
  • --direct: 默认false; 设置为true时,工具会直接往测试合约发tx,而不是router合约地址;--id就不需要设置,--contract直接设置为具体的合约地址
  • --id: 测试合约id
  • --opts: 每个操作码在单次循环的执行次数
  • --times: 循环次数

2.2.3 测试网uniswap挖卖提

adventure evm bench wmt -i ${ip1},${ip2},${ip3}  -c 250     

2.2.4 测试网查询

 adventure evm bench query -i https://exchaintestrpc.okex.org -t 1000 -o 1,1,1,1,1,1,1,1,1
  • -o: 每个查询接口在每秒创建的协程数量
    • 0: eth_blockNumber
    • 1: eth_getBalance
    • 2: eth_getBlockByNumber
    • 3: eth_gasPrice
    • 4: eth_getCode
    • 5: eth_getTransactionCount
    • 6: eth_getTransactionReceipt
    • 7: net_version
    • 8: eth_call

adventure's People

Contributors

bananalf avatar banishee avatar fineke avatar revelationofturing avatar scf0220 avatar xuqing-lee avatar yann-sjtu avatar

Watchers

 avatar  avatar

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.