Skip to content
Permalink
Browse files

renamed eips -> contracts

  • Loading branch information...
yuriymyronovych committed Mar 7, 2019
1 parent 84f67d9 commit 1fd4ec8bef10b72c9206ecd6f02b8c0a373dbfda
@@ -8,7 +8,7 @@ description 'web3j command line tools'
dependencies {
compile project(':codegen'),
project(':infura'),
project(':eips')
project(':contracts')
runtime "org.slf4j:slf4j-nop:$slf4jVersion" // prevent logging of the library to the console
testCompile project(path: ':crypto', configuration: 'testArtifacts'),
project(path: ':core', configuration: 'testArtifacts')
@@ -1,5 +1,5 @@

description 'web3j support for Ethereum Improvement Proposals (EIP's)'
description 'web3j support for Ethereum Improvement Proposals (EIP\'s)'

dependencies {
compile project(':core')
@@ -11,11 +11,11 @@ targetFileIn=(
"src/main/resources/eip721/solidity/ERC721Metadata")

targetPackageOut=(
"org.web3j.eips.eip20.generated"
"org.web3j.eips.eip165.generated"
"org.web3j.eips.eip721.generated"
"org.web3j.eips.eip721.generated"
"org.web3j.eips.eip721.generated")
"org.web3j.contracts.eip20.generated"
"org.web3j.contracts.eip165.generated"
"org.web3j.contracts.eip721.generated"
"org.web3j.contracts.eip721.generated"
"org.web3j.contracts.eip721.generated")

mkdir -p ../build/

@@ -26,17 +26,17 @@ for i in ${!targetFileIn[@]}; do
fileName=$(basename $solcFileIn)

cd ../$dirName
eipsRootDir="../../../../../"
contractsRootDir="../../../../../"

echo "Compiling Solidity file ${fileName}.sol:"
solc --abi --optimize --overwrite ${fileName}.sol -o ${eipsRootDir}/build/
solc --abi --optimize --overwrite ${fileName}.sol -o ${contractsRootDir}/build/
echo "Complete"

echo "Generating web3j bindings"
web3j solidity generate \
-a ${eipsRootDir}build/${fileName}.abi \
-a ${contractsRootDir}build/${fileName}.abi \
-p ${packageOut} \
-o ${eipsRootDir}/src/main/java/ > /dev/null
-o ${contractsRootDir}/src/main/java/ > /dev/null
echo "Complete"

cd -
@@ -1,4 +1,4 @@
package org.web3j.eips.eip165.generated;
package org.web3j.contracts.eip165.generated;

import java.math.BigInteger;
import java.util.Arrays;
@@ -15,9 +15,12 @@

/**
* <p>Auto generated code.
* <p>See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md
* <p><strong>Do not modify!</strong>
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
* <a href="https://github.com/web3j/web3j/tree/master/codegen">codegen module</a> to update.
*
* <p>Generated with web3j version 4.0.0-SNAPSHOT.
* <p>Generated with web3j version 4.1.1.
*/
public class ERC165 extends Contract {
private static final String BINARY = "Bin file was not provided";
@@ -1,6 +1,6 @@
package org.web3j.eips.eip20.generated;
package org.web3j.contracts.eip20.generated;

import java.io.IOException;
import io.reactivex.Flowable;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
@@ -20,24 +20,20 @@
import org.web3j.protocol.core.DefaultBlockParameter;
import org.web3j.protocol.core.RemoteCall;
import org.web3j.protocol.core.methods.request.EthFilter;
import org.web3j.protocol.core.methods.response.EthSendTransaction;
import org.web3j.protocol.core.methods.response.Log;
import org.web3j.protocol.core.methods.response.TransactionReceipt;
import org.web3j.protocol.http.HttpService;
import org.web3j.tx.Contract;
import org.web3j.tx.ReadonlyTransactionManager;
import org.web3j.tx.TransactionManager;
import org.web3j.tx.gas.ContractGasProvider;
import org.web3j.tx.gas.DefaultGasProvider;
import rx.Observable;
import rx.functions.Func1;

/**
* <p>Auto generated code.
* <p>Abstract contract for the full ERC 20 Token standard
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* <p><strong>Do not modify!</strong>
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
* <a href="https://github.com/web3j/web3j/tree/master/codegen">codegen module</a> to update.
*
* <p>Generated with web3j version 4.0.0-SNAPSHOT.
* <p>Generated with web3j version 4.1.1.
*/
public class ERC20 extends Contract {
private static final String BINARY = "Bin file was not provided";
@@ -171,10 +167,10 @@ protected ERC20(String contractAddress, Web3j web3j, TransactionManager transact
return responses;
}

public Observable<TransferEventResponse> transferEventObservable(EthFilter filter) {
return web3j.ethLogObservable(filter).map(new Func1<Log, TransferEventResponse>() {
public Flowable<TransferEventResponse> transferEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new io.reactivex.functions.Function<Log, TransferEventResponse>() {
@Override
public TransferEventResponse call(Log log) {
public TransferEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(TRANSFER_EVENT, log);
TransferEventResponse typedResponse = new TransferEventResponse();
typedResponse.log = log;
@@ -186,10 +182,10 @@ public TransferEventResponse call(Log log) {
});
}

public Observable<TransferEventResponse> transferEventObservable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
public Flowable<TransferEventResponse> transferEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(TRANSFER_EVENT));
return transferEventObservable(filter);
return transferEventFlowable(filter);
}

public List<ApprovalEventResponse> getApprovalEvents(TransactionReceipt transactionReceipt) {
@@ -206,10 +202,10 @@ public TransferEventResponse call(Log log) {
return responses;
}

public Observable<ApprovalEventResponse> approvalEventObservable(EthFilter filter) {
return web3j.ethLogObservable(filter).map(new Func1<Log, ApprovalEventResponse>() {
public Flowable<ApprovalEventResponse> approvalEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new io.reactivex.functions.Function<Log, ApprovalEventResponse>() {
@Override
public ApprovalEventResponse call(Log log) {
public ApprovalEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(APPROVAL_EVENT, log);
ApprovalEventResponse typedResponse = new ApprovalEventResponse();
typedResponse.log = log;
@@ -221,10 +217,10 @@ public ApprovalEventResponse call(Log log) {
});
}

public Observable<ApprovalEventResponse> approvalEventObservable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
public Flowable<ApprovalEventResponse> approvalEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(APPROVAL_EVENT));
return approvalEventObservable(filter);
return approvalEventFlowable(filter);
}

@Deprecated
@@ -1,5 +1,6 @@
package org.web3j.eips.eip721.generated;
package org.web3j.contracts.eip721.generated;

import io.reactivex.Flowable;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
@@ -23,16 +24,15 @@
import org.web3j.tx.Contract;
import org.web3j.tx.TransactionManager;
import org.web3j.tx.gas.ContractGasProvider;
import rx.Observable;
import rx.functions.Func1;

/**
* <p>Auto generated code.
* <p>ERC-721 Non-Fungible Token Standard
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
* the ERC-165 identifier for this interface is 0x80ac58cd.
* <p><strong>Do not modify!</strong>
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
* <a href="https://github.com/web3j/web3j/tree/master/codegen">codegen module</a> to update.
*
* <p>Generated with web3j version 4.0.0-SNAPSHOT.
* <p>Generated with web3j version 4.1.1.
*/
public class ERC721 extends Contract {
private static final String BINARY = "Bin file was not provided";
@@ -175,10 +175,10 @@ protected ERC721(String contractAddress, Web3j web3j, TransactionManager transac
return responses;
}

public Observable<TransferEventResponse> transferEventObservable(EthFilter filter) {
return web3j.ethLogObservable(filter).map(new Func1<Log, TransferEventResponse>() {
public Flowable<TransferEventResponse> transferEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new io.reactivex.functions.Function<Log, TransferEventResponse>() {
@Override
public TransferEventResponse call(Log log) {
public TransferEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(TRANSFER_EVENT, log);
TransferEventResponse typedResponse = new TransferEventResponse();
typedResponse.log = log;
@@ -190,10 +190,10 @@ public TransferEventResponse call(Log log) {
});
}

public Observable<TransferEventResponse> transferEventObservable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
public Flowable<TransferEventResponse> transferEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(TRANSFER_EVENT));
return transferEventObservable(filter);
return transferEventFlowable(filter);
}

public List<ApprovalEventResponse> getApprovalEvents(TransactionReceipt transactionReceipt) {
@@ -210,10 +210,10 @@ public TransferEventResponse call(Log log) {
return responses;
}

public Observable<ApprovalEventResponse> approvalEventObservable(EthFilter filter) {
return web3j.ethLogObservable(filter).map(new Func1<Log, ApprovalEventResponse>() {
public Flowable<ApprovalEventResponse> approvalEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new io.reactivex.functions.Function<Log, ApprovalEventResponse>() {
@Override
public ApprovalEventResponse call(Log log) {
public ApprovalEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(APPROVAL_EVENT, log);
ApprovalEventResponse typedResponse = new ApprovalEventResponse();
typedResponse.log = log;
@@ -225,10 +225,10 @@ public ApprovalEventResponse call(Log log) {
});
}

public Observable<ApprovalEventResponse> approvalEventObservable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
public Flowable<ApprovalEventResponse> approvalEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(APPROVAL_EVENT));
return approvalEventObservable(filter);
return approvalEventFlowable(filter);
}

public List<ApprovalForAllEventResponse> getApprovalForAllEvents(TransactionReceipt transactionReceipt) {
@@ -245,10 +245,10 @@ public ApprovalEventResponse call(Log log) {
return responses;
}

public Observable<ApprovalForAllEventResponse> approvalForAllEventObservable(EthFilter filter) {
return web3j.ethLogObservable(filter).map(new Func1<Log, ApprovalForAllEventResponse>() {
public Flowable<ApprovalForAllEventResponse> approvalForAllEventFlowable(EthFilter filter) {
return web3j.ethLogFlowable(filter).map(new io.reactivex.functions.Function<Log, ApprovalForAllEventResponse>() {
@Override
public ApprovalForAllEventResponse call(Log log) {
public ApprovalForAllEventResponse apply(Log log) {
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(APPROVALFORALL_EVENT, log);
ApprovalForAllEventResponse typedResponse = new ApprovalForAllEventResponse();
typedResponse.log = log;
@@ -260,10 +260,10 @@ public ApprovalForAllEventResponse call(Log log) {
});
}

public Observable<ApprovalForAllEventResponse> approvalForAllEventObservable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
public Flowable<ApprovalForAllEventResponse> approvalForAllEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
filter.addSingleTopic(EventEncoder.encode(APPROVALFORALL_EVENT));
return approvalForAllEventObservable(filter);
return approvalForAllEventFlowable(filter);
}

@Deprecated
@@ -1,4 +1,4 @@
package org.web3j.eips.eip721.generated;
package org.web3j.contracts.eip721.generated;

import java.math.BigInteger;
import java.util.Arrays;
@@ -15,11 +15,12 @@

/**
* <p>Auto generated code.
* <p>ERC-721 Non-Fungible Token Standard, optional enumeration extension
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
* Note: the ERC-165 identifier for this interface is 0x780e9d63.
* <p><strong>Do not modify!</strong>
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
* <a href="https://github.com/web3j/web3j/tree/master/codegen">codegen module</a> to update.
*
* <p>Generated with web3j version 4.0.0-SNAPSHOT.
* <p>Generated with web3j version 4.1.1.
*/
public class ERC721Enumerable extends Contract {
private static final String BINARY = "Bin file was not provided";
@@ -1,4 +1,4 @@
package org.web3j.eips.eip721.generated;
package org.web3j.contracts.eip721.generated;

import java.math.BigInteger;
import java.util.Arrays;
@@ -15,11 +15,12 @@

/**
* <p>Auto generated code.
* <p>@title ERC-721 Non-Fungible Token Standard
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
* Note: the ERC-165 identifier for this interface is 0x5b5e139f.
* <p><strong>Do not modify!</strong>
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
* <a href="https://github.com/web3j/web3j/tree/master/codegen">codegen module</a> to update.
*
* <p>Generated with web3j version 4.0.0-SNAPSHOT.
* <p>Generated with web3j version 4.1.1.
*/
public class ERC721Metadata extends Contract {
private static final String BINARY = "Bin file was not provided";
@@ -1,4 +1,4 @@
EIPs supported by web3j
Contracts supported by web3j
=======================

EIP20
@@ -94,7 +94,7 @@ Contents:
management_apis.rst
infura.rst
ens.rst
eips.rst
contracts.rst
trouble.rst
projects.rst
companies.rst
@@ -20,7 +20,7 @@ The below modules only depend on the core module.
* geth - Geth specific JSON-RPC module
* parity - Parity specific JSON-RPC module
* infura - Infura specific HTTP header support
* eips - Support for specific EIP's (Ethereum Improvement Proposals)
* contracts - Support for specific EIP's (Ethereum Improvement Proposals)

For most use cases (interacting with the network and smart contracts) the *core* module should be
all you need. The dependencies of the core module are very granular and only likely to be of use
@@ -12,5 +12,5 @@ include 'parity'
include 'rlp'
include 'tuples'
include 'utils'
include 'eips'
include 'contracts'
include 'pantheon'

0 comments on commit 1fd4ec8

Please sign in to comment.
You can’t perform that action at this time.