simple web3j Demo to be continue,use web3j Brainless Trading,tool for arbitrage automatic trading, copying other transfer,tracking agency addresses, setting profit points, setting prices, grabbing blocks

Overview

简介

english doc

基础web3j基础上手款Demo 持续更新,做到web3j无脑交易 套利第一工具,自动买卖、跟单、追踪机构地址、设置利润点、设置价格、抢跑区块等... ...

  1. 代码开源。
  2. web3j是一个用于访问以太坊的轻量级的java库,用于连接客户端和以太坊区块链结点。

相关功能:

1 连接以太坊客户端
2 创建冷钱包
3 加载钱包文件
4 转账ETH,转账ERC20代币,批量转账功能
5 查询余额
6 部署合约
7 读取&更新 智能合约的数据
8 观察智能合约event
9 账号的锁定与解锁
10 批量生成钱包助记词,逐行保存文件
11.完善合约函数调用approve,transfer,transferForm等
12.增加Approve,Transfer Event监听

说明文档

持续更新中...... web3j对基础开发者调用不太友好, JS版本对开发周期和成本相对比较简单. 描述上述功能均为组合功能,需要对基础方法有一定了解,设计好流程思路

原博客 http://blog.csdn.net/baidu_30084597 现博客 https://blog.csdn.net/weixin_41602901

You might also like...

This repository contains example codes which will help you to know how to use selenium webdriver.

❓ What is this Repository about? This repo has example codes with Selenium 4 features. Websites used for testing are: automationpractice.com, saucedem

Dec 30, 2022

AssertJ is a library providing easy to use rich typed assertions

AssertJ - Fluent assertions for java AssertJ provides a rich and intuitive set of strongly-typed assertions to use for unit testing (with JUnit, TestN

Jan 8, 2023

Ready-to-use UI Test Automation Architecture using Java and Selenium WebDriver.

Selenium Test Automation Boilerplate Ready-to-use UI Test Automation Architecture using Java and Selenium WebDriver. Languages and Frameworks The proj

Dec 26, 2022

provides all the interfaces that AREX-UI needs to use

provides all the interfaces that AREX-UI needs to use

AREX-SERVICE This project provides all the interfaces that AREX-UI needs to use. QUICK START quick start API DOCUMENTS We use swagger3 to generate int

Dec 15, 2022

A sample repo to help you use relative locators for automation test in Java-TestNG on LambdaTest. Run Selenium tests with TestNG on LambdaTest platform.

How to use relative locators for automation test in Java-TestNG on LambdaTest Environment Setup Global Dependencies Install Maven Or Install Maven wit

Jul 13, 2022

A sample repo to help you use CDP console in Java-TestNG automation test on LambdaTest. Run Selenium tests with TestNG on LambdaTest platform.

How to use CDP console in Java-TestNG automation test on LambdaTest Environment Setup Global Dependencies Install Maven Or Install Maven with Homebrew

Jul 13, 2022

Test Automation Made Simple

Test Automation Made Simple

Karate Test Automation Made Simple. Karate is the only open-source tool to combine API test-automation, mocks, performance-testing and even UI automat

Dec 28, 2022

CodeSheriff is a simple library that helps you in writing JUnit tests that check the quality of your code

CodeSheriff is a simple library that helps you in writing JUnit tests that check the quality of your code. For example, CodeSheriff may fail because you have methods in your code that have more than X lines of code, or that have complexity greater than Y.

Feb 10, 2022

A simple yet powerful parameterized test runner for Java.

TestParameterInjector Introduction TestParameterInjector is a JUnit4 test runner that runs its test methods for different combinations of field/parame

Dec 30, 2022
Comments
  • mint

    mint

    public boolean mintNFTByAmount(Web3j web3j, String contractAddress, int amount) { if (web3j == null) return false; String methodName = "mint"; String fromAddr = emptyAddress; Function function = new Function( methodName, Arrays.asList(new Uint256(amount)), Arrays.asList(new TypeReference() { }));

        String data = FunctionEncoder.encode(function);
        Transaction transaction = Transaction.createEthCallTransaction(fromAddr, contractAddress, data);
    
        EthCall ethCall;
        try {
            ethCall = web3j.ethCall(transaction, DefaultBlockParameterName.LATEST).sendAsync().get();
            //List<Type> results = FunctionReturnDecoder.decode(ethCall.getValue(), function.getOutputParameters());
        } catch (InterruptedException | ExecutionException e) {
            e.printStackTrace();
        }
        return true;
    }
    
    
    /**
     * 调用NFT的Mint方法根据合约有两种
     * Function: mint(address _to, uint256 _mintAmount)
     ***/
    public  boolean mintNFTByAmountAndAddress(Web3j web3j, Credentials credentials, String contractAddress, int amount) {
        if (web3j == null) return false;
        if (credentials == null) return false;
        String methodName = "mint";
        String fromAddr = emptyAddress;
        Function function = new Function(
                methodName,
                Arrays.asList(new Address(credentials.getAddress()), new Uint256(amount)),
                Arrays.asList(new TypeReference<Type>() {
                }));
    
        String data = FunctionEncoder.encode(function);
        Transaction transaction = Transaction.createEthCallTransaction(fromAddr, contractAddress, data);
    
        EthCall ethCall;
        try {
            ethCall = web3j.ethCall(transaction, DefaultBlockParameterName.LATEST).sendAsync().get();
            //List<Type> results = FunctionReturnDecoder.decode(ethCall.getValue(), function.getOutputParameters());
        } catch (InterruptedException | ExecutionException e) {
            e.printStackTrace();
        }
        return true;
    }
    

    have some problem for contract 721

    opened by NickRibbon 0
Releases(v1.0.2)
Owner
Nate River
App Team Leader of China ETC @YxyTech @ETCPark road park
Nate River
A library for setting up Java objects as test data.

Beanmother Beanmother helps to create various objects, simple and complex, super easily with fixtures for testing. It encourages developers to write m

Jaehyun Shin 113 Nov 7, 2022
🎁 A demo/tutorial for java-appium-sdk

test-ai-appium-demo Welcome to the test.ai Appium Java demo! This repository contains a pre-configured project and basic tutorial, so you can hit the

test.ai 5 Jun 14, 2022
🎊 A demo/tutorial for java-selenium-sdk

test-ai-selenium-demo Welcome to the test.ai Selenium Java demo! This repository contains a pre-configured project and basic tutorial, so you can hit

test.ai 15 Sep 26, 2022
Lightweight analysis tool for detecting mutability in Java classes

What is Mutability Detector? Mutability Detector is designed to analyse Java classes and report on whether instances of a given class are immutable. I

Mutability Detector 234 Dec 29, 2022
A tool for mocking HTTP services

WireMock - a web service test double for all occasions Key Features HTTP response stubbing, matchable on URL, header and body content patterns Request

Tom Akehurst 5.3k Dec 31, 2022
ShotDroid is a pentesting tool for android.

ShotDroid is a pentesting tool for android. There are 3 tools that have their respective functions, Get files from Android directory, internal and external storage, Android Keylogger + Reverse Shell and Take a webcam shot of the face from the front camera of the phone and PC.

null 179 Jan 8, 2023
WireMock - A tool for mocking HTTP services

WireMock only uses log4j in its test dependencies. Neither the thin nor standalone JAR depends on or embeds log4j, so you can continue to use WireMock 2.32.0 without any risk of exposue to the recently discovered vulnerability.

null 5.3k Dec 31, 2022
Gatling is a load test tool. It officially supports HTTP, WebSocket, Server-Sent-Events and JMS.

Gatling What is Gatling ? Gatling is a load test tool. It officially supports HTTP, WebSocket, Server-Sent-Events and JMS. Motivation Finding fancy GU

Gatling 5.8k Dec 27, 2022
High-level contextual steps in your tests for any reporting tool

Xteps High-level contextual steps in your tests for any reporting tool. License Maven Central Javadoc Xteps Xteps Allure Xteps ReportPortal How to use

Evgenii Plugatar 8 Dec 11, 2022
AssertJ is a library providing easy to use rich typed assertions

AssertJ - Fluent assertions for java AssertJ provides a rich and intuitive set of strongly-typed assertions to use for unit testing (with JUnit, TestN

AssertJ 2.3k Dec 30, 2022