com.abey:abeyj

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Лицензия

Лицензия

Группа

Группа

com.abey
Идентификатор

Идентификатор

abeyj
Последняя версия

Последняя версия

1.0.0.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/
Система контроля версий

Система контроля версий

https://github.com/abeychain/abeyj.git

Скачать abeyj

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.abey/abeyj/ -->
<dependency>
    <groupId>com.abey</groupId>
    <artifactId>abeyj</artifactId>
    <version>1.0.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.abey/abeyj/
implementation 'com.abey:abeyj:1.0.0.3'
// https://jarcasting.com/artifacts/com.abey/abeyj/
implementation ("com.abey:abeyj:1.0.0.3")
'com.abey:abeyj:jar:1.0.0.3'
<dependency org="com.abey" name="abeyj" rev="1.0.0.3">
  <artifact name="abeyj" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.abey', module='abeyj', version='1.0.0.3')
)
libraryDependencies += "com.abey" % "abeyj" % "1.0.0.3"
[com.abey/abeyj "1.0.0.3"]

Зависимости

compile (15)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-api jar 1.7.25
org.bouncycastle : bcprov-jdk15on jar 1.65
io.reactivex.rxjava2 : rxjava jar 2.2.2
com.fasterxml.jackson.core : jackson-core jar 2.9.9
com.fasterxml.jackson.core : jackson-annotations jar 2.9.9
com.fasterxml.jackson.core : jackson-databind jar 2.9.9
org.java-websocket : Java-WebSocket jar 1.5.0
com.squareup.okhttp3 : okhttp jar 4.3.1
com.squareup : kotlinpoet jar 1.5.0
com.squareup : javapoet jar 1.7.0
info.picocli : picocli jar 3.0.0
org.junit.jupiter : junit-jupiter-api jar 5.6.2
com.squareup.okhttp3 : logging-interceptor jar 4.3.1
com.github.jnr : jnr-unixsocket jar 0.21
org.apache.commons : commons-lang3 jar 3.3.2

test (4)

Идентификатор библиотеки Тип Версия
org.junit.jupiter : junit-jupiter-engine jar 5.5.2
org.junit.vintage : junit-vintage-engine jar 5.5.2
org.junit.platform : junit-platform-launcher jar 1.5.2
org.junit.jupiter : junit-jupiter jar 5.5.2

Модули Проекта

Данный проект не имеет модулей.

Build

Maven

<!-- https://mvnrepository.com/artifact/com.abey/abeyj -->
<dependency>
    <groupId>com.abey</groupId>
    <artifactId>abeyj</artifactId>
    <version>1.0.0.1</version>
</dependency>

Gradle

// https://mvnrepository.com/artifact/com.abey/abeyj
implementation group: 'com.abey', name: 'abeyj', version: '1.0.0.0'

DEMO

Abeyj

public Abeyj abeyj = Web3j.build(new HttpService(Http service));

GasPrice:1200000000
GasLimit:30000(Transfer)/60000(ERC20)

Get Balance

    public BigInteger getBalance(String address) {
        BigInteger balance = BigInteger.ZERO;
        try {
            AbeyGetBalance abeyGetBalance = abeyj.ethGetBalance(address, 					DefaultBlockParameterName.LATEST).send();
            if (abeyGetBalance != null) {
                balance = abeyGetBalance.getBalance();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return balance;
    }

Get Nonce

    public BigInteger getTransactionNonce(String address) {
        BigInteger nonce = BigInteger.ZERO;
        try {
            AbeyGetTransactionCount abeyGetTransactionCount = abeyj.ethGetTransactionCount(address, DefaultBlockParameterName.PENDING).send();
            nonce = abeyGetTransactionCount.getTransactionCount();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return nonce;
    }

Get Gasprice

 public static BigInteger getGasPrice() {
        BigInteger gasPrice = null;
        try {
            AbeyGasPrice abeyGasPrice = abeyj.ethGasPrice().send();
            gasPrice = abeyGasPrice.getGasPrice();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return gasPrice;
    }

Send Transaction

	String service = "http service";
        Abeyj web3j = Abeyj.build(new HttpService(service));
        Credentials credentials = Credentials.create("User privateKey");
        String from_address = credentials.getAddress();
        BigInteger nonce = BigInteger.ZERO;
        try {
            AbeyGetTransactionCount ethGetTransactionCount = web3j.abeyGetTransactionCount(from_address, DefaultBlockParameterName.PENDING).send();
            nonce = ethGetTransactionCount.getTransactionCount();
        } catch (IOException e) {
            e.printStackTrace();
        }
        RawTransaction rawTransaction = RawTransaction.createEtherTransaction(nonce, new BigInteger("150000000000"),
                new BigInteger("21000"), "toaddress",new BigInteger("10000000"));
        byte[] signedMessage = TransactionEncoder.signMessage(rawTransaction, 178, credentials);
        String hexValue = Numeric.toHexString(signedMessage);
        AbeySendTransaction abdySendTransaction = null;
        try {
            abdySendTransaction = abeyj.abeySendRawTransaction(hexValue).sendAsync().get();
            String transactionHash = abdySendTransaction.getTransactionHash();
            System.out.println(transactionHash);
        }catch (Exception e){
            e.printStackTrace();
        }
com.abey

ABEY

The Fastest Smart-Contracts & Distributed Applications Platform In The World!

Версии библиотеки

Версия
1.0.0.3
1.0.0.2
1.0.0.1
1.0.0.0