Skip to content

Commit 1fd4ec8

Browse files
renamed eips -> contracts
1 parent 84f67d9 commit 1fd4ec8

File tree

17 files changed

+72
-71
lines changed

17 files changed

+72
-71
lines changed

console/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description 'web3j command line tools'
88
dependencies {
99
compile project(':codegen'),
1010
project(':infura'),
11-
project(':eips')
11+
project(':contracts')
1212
runtime "org.slf4j:slf4j-nop:$slf4jVersion" // prevent logging of the library to the console
1313
testCompile project(path: ':crypto', configuration: 'testArtifacts'),
1414
project(path: ':core', configuration: 'testArtifacts')

eips/build.gradle contracts/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
description 'web3j support for Ethereum Improvement Proposals (EIP's)'
2+
description 'web3j support for Ethereum Improvement Proposals (EIP\'s)'
33

44
dependencies {
55
compile project(':core')

eips/scripts/generateWrappers.sh contracts/scripts/generateWrappers.sh

+9-9
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ targetFileIn=(
1111
"src/main/resources/eip721/solidity/ERC721Metadata")
1212

1313
targetPackageOut=(
14-
"org.web3j.eips.eip20.generated"
15-
"org.web3j.eips.eip165.generated"
16-
"org.web3j.eips.eip721.generated"
17-
"org.web3j.eips.eip721.generated"
18-
"org.web3j.eips.eip721.generated")
14+
"org.web3j.contracts.eip20.generated"
15+
"org.web3j.contracts.eip165.generated"
16+
"org.web3j.contracts.eip721.generated"
17+
"org.web3j.contracts.eip721.generated"
18+
"org.web3j.contracts.eip721.generated")
1919

2020
mkdir -p ../build/
2121

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

2828
cd ../$dirName
29-
eipsRootDir="../../../../../"
29+
contractsRootDir="../../../../../"
3030

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

3535
echo "Generating web3j bindings"
3636
web3j solidity generate \
37-
-a ${eipsRootDir}build/${fileName}.abi \
37+
-a ${contractsRootDir}build/${fileName}.abi \
3838
-p ${packageOut} \
39-
-o ${eipsRootDir}/src/main/java/ > /dev/null
39+
-o ${contractsRootDir}/src/main/java/ > /dev/null
4040
echo "Complete"
4141

4242
cd -

eips/src/main/java/org/web3j/eips/eip165/generated/ERC165.java contracts/src/main/java/org/web3j/contracts/eip165/generated/ERC165.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.web3j.eips.eip165.generated;
1+
package org.web3j.contracts.eip165.generated;
22

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

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

eips/src/main/java/org/web3j/eips/eip20/generated/ERC20.java contracts/src/main/java/org/web3j/contracts/eip20/generated/ERC20.java

+17-21
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package org.web3j.eips.eip20.generated;
1+
package org.web3j.contracts.eip20.generated;
22

3-
import java.io.IOException;
3+
import io.reactivex.Flowable;
44
import java.math.BigInteger;
55
import java.util.ArrayList;
66
import java.util.Arrays;
@@ -20,24 +20,20 @@
2020
import org.web3j.protocol.core.DefaultBlockParameter;
2121
import org.web3j.protocol.core.RemoteCall;
2222
import org.web3j.protocol.core.methods.request.EthFilter;
23-
import org.web3j.protocol.core.methods.response.EthSendTransaction;
2423
import org.web3j.protocol.core.methods.response.Log;
2524
import org.web3j.protocol.core.methods.response.TransactionReceipt;
26-
import org.web3j.protocol.http.HttpService;
2725
import org.web3j.tx.Contract;
28-
import org.web3j.tx.ReadonlyTransactionManager;
2926
import org.web3j.tx.TransactionManager;
3027
import org.web3j.tx.gas.ContractGasProvider;
31-
import org.web3j.tx.gas.DefaultGasProvider;
32-
import rx.Observable;
33-
import rx.functions.Func1;
3428

3529
/**
3630
* <p>Auto generated code.
37-
* <p>Abstract contract for the full ERC 20 Token standard
38-
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
31+
* <p><strong>Do not modify!</strong>
32+
* <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>,
33+
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
34+
* <a href="https://github.com/web3j/web3j/tree/master/codegen">codegen module</a> to update.
3935
*
40-
* <p>Generated with web3j version 4.0.0-SNAPSHOT.
36+
* <p>Generated with web3j version 4.1.1.
4137
*/
4238
public class ERC20 extends Contract {
4339
private static final String BINARY = "Bin file was not provided";
@@ -171,10 +167,10 @@ public List<TransferEventResponse> getTransferEvents(TransactionReceipt transact
171167
return responses;
172168
}
173169

174-
public Observable<TransferEventResponse> transferEventObservable(EthFilter filter) {
175-
return web3j.ethLogObservable(filter).map(new Func1<Log, TransferEventResponse>() {
170+
public Flowable<TransferEventResponse> transferEventFlowable(EthFilter filter) {
171+
return web3j.ethLogFlowable(filter).map(new io.reactivex.functions.Function<Log, TransferEventResponse>() {
176172
@Override
177-
public TransferEventResponse call(Log log) {
173+
public TransferEventResponse apply(Log log) {
178174
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(TRANSFER_EVENT, log);
179175
TransferEventResponse typedResponse = new TransferEventResponse();
180176
typedResponse.log = log;
@@ -186,10 +182,10 @@ public TransferEventResponse call(Log log) {
186182
});
187183
}
188184

189-
public Observable<TransferEventResponse> transferEventObservable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
185+
public Flowable<TransferEventResponse> transferEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
190186
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
191187
filter.addSingleTopic(EventEncoder.encode(TRANSFER_EVENT));
192-
return transferEventObservable(filter);
188+
return transferEventFlowable(filter);
193189
}
194190

195191
public List<ApprovalEventResponse> getApprovalEvents(TransactionReceipt transactionReceipt) {
@@ -206,10 +202,10 @@ public List<ApprovalEventResponse> getApprovalEvents(TransactionReceipt transact
206202
return responses;
207203
}
208204

209-
public Observable<ApprovalEventResponse> approvalEventObservable(EthFilter filter) {
210-
return web3j.ethLogObservable(filter).map(new Func1<Log, ApprovalEventResponse>() {
205+
public Flowable<ApprovalEventResponse> approvalEventFlowable(EthFilter filter) {
206+
return web3j.ethLogFlowable(filter).map(new io.reactivex.functions.Function<Log, ApprovalEventResponse>() {
211207
@Override
212-
public ApprovalEventResponse call(Log log) {
208+
public ApprovalEventResponse apply(Log log) {
213209
Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(APPROVAL_EVENT, log);
214210
ApprovalEventResponse typedResponse = new ApprovalEventResponse();
215211
typedResponse.log = log;
@@ -221,10 +217,10 @@ public ApprovalEventResponse call(Log log) {
221217
});
222218
}
223219

224-
public Observable<ApprovalEventResponse> approvalEventObservable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
220+
public Flowable<ApprovalEventResponse> approvalEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
225221
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
226222
filter.addSingleTopic(EventEncoder.encode(APPROVAL_EVENT));
227-
return approvalEventObservable(filter);
223+
return approvalEventFlowable(filter);
228224
}
229225

230226
@Deprecated

eips/src/main/java/org/web3j/eips/eip721/generated/ERC721.java contracts/src/main/java/org/web3j/contracts/eip721/generated/ERC721.java

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
package org.web3j.eips.eip721.generated;
1+
package org.web3j.contracts.eip721.generated;
22

3+
import io.reactivex.Flowable;
34
import java.math.BigInteger;
45
import java.util.ArrayList;
56
import java.util.Arrays;
@@ -23,16 +24,15 @@
2324
import org.web3j.tx.Contract;
2425
import org.web3j.tx.TransactionManager;
2526
import org.web3j.tx.gas.ContractGasProvider;
26-
import rx.Observable;
27-
import rx.functions.Func1;
2827

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

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

193-
public Observable<TransferEventResponse> transferEventObservable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
193+
public Flowable<TransferEventResponse> transferEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
194194
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
195195
filter.addSingleTopic(EventEncoder.encode(TRANSFER_EVENT));
196-
return transferEventObservable(filter);
196+
return transferEventFlowable(filter);
197197
}
198198

199199
public List<ApprovalEventResponse> getApprovalEvents(TransactionReceipt transactionReceipt) {
@@ -210,10 +210,10 @@ public List<ApprovalEventResponse> getApprovalEvents(TransactionReceipt transact
210210
return responses;
211211
}
212212

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

228-
public Observable<ApprovalEventResponse> approvalEventObservable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
228+
public Flowable<ApprovalEventResponse> approvalEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
229229
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
230230
filter.addSingleTopic(EventEncoder.encode(APPROVAL_EVENT));
231-
return approvalEventObservable(filter);
231+
return approvalEventFlowable(filter);
232232
}
233233

234234
public List<ApprovalForAllEventResponse> getApprovalForAllEvents(TransactionReceipt transactionReceipt) {
@@ -245,10 +245,10 @@ public List<ApprovalForAllEventResponse> getApprovalForAllEvents(TransactionRece
245245
return responses;
246246
}
247247

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

263-
public Observable<ApprovalForAllEventResponse> approvalForAllEventObservable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
263+
public Flowable<ApprovalForAllEventResponse> approvalForAllEventFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
264264
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
265265
filter.addSingleTopic(EventEncoder.encode(APPROVALFORALL_EVENT));
266-
return approvalForAllEventObservable(filter);
266+
return approvalForAllEventFlowable(filter);
267267
}
268268

269269
@Deprecated

eips/src/main/java/org/web3j/eips/eip721/generated/ERC721Enumerable.java contracts/src/main/java/org/web3j/contracts/eip721/generated/ERC721Enumerable.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.web3j.eips.eip721.generated;
1+
package org.web3j.contracts.eip721.generated;
22

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

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

eips/src/main/java/org/web3j/eips/eip721/generated/ERC721Metadata.java contracts/src/main/java/org/web3j/contracts/eip721/generated/ERC721Metadata.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.web3j.eips.eip721.generated;
1+
package org.web3j.contracts.eip721.generated;
22

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

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

docs/source/eips.rst docs/source/contracts.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
EIPs supported by web3j
1+
Contracts supported by web3j
22
=======================
33

44
EIP20

docs/source/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Contents:
9494
management_apis.rst
9595
infura.rst
9696
ens.rst
97-
eips.rst
97+
contracts.rst
9898
trouble.rst
9999
projects.rst
100100
companies.rst

docs/source/modules.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The below modules only depend on the core module.
2020
* geth - Geth specific JSON-RPC module
2121
* parity - Parity specific JSON-RPC module
2222
* infura - Infura specific HTTP header support
23-
* eips - Support for specific EIP's (Ethereum Improvement Proposals)
23+
* contracts - Support for specific EIP's (Ethereum Improvement Proposals)
2424

2525
For most use cases (interacting with the network and smart contracts) the *core* module should be
2626
all you need. The dependencies of the core module are very granular and only likely to be of use

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ include 'parity'
1212
include 'rlp'
1313
include 'tuples'
1414
include 'utils'
15-
include 'eips'
15+
include 'contracts'
1616
include 'pantheon'

0 commit comments

Comments
 (0)