mirror of https://github.com/hyperledger/besu
Use web3j gradle plugin for acceptance tests (#2872)
Automatically generate wrappers for all contracts in acceptance-tests/tests/contracts Signed-off-by: Antony Denyer <git@antonydenyer.co.uk> Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>pull/2896/head
parent
bfd4aa3c32
commit
90fca1c55e
@ -1 +0,0 @@ |
||||
[{"constant":false,"inputs":[{"name":"crossAddress","type":"address"}],"name":"remoteDestroy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"crossAddress","type":"address"}],"name":"deployRemote","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"deploy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"destroy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"emitter_address","type":"address"}],"name":"read","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"increment","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"crossAddress","type":"address"}],"name":"incrementRemote","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"contractAddress","type":"address"}],"name":"NewEventEmitter","type":"event"}] |
@ -1 +0,0 @@ |
||||
608060405234801561001057600080fd5b506104b7806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806383197ef01161005b57806383197ef0146100d8578063a087a87e146100e0578063d09de08a14610118578063e689ef8a146101205761007d565b8063305155f9146100825780635374ded2146100aa578063775c300c146100d0575b600080fd5b6100a86004803603602081101561009857600080fd5b50356001600160a01b0316610146565b005b6100a8600480360360208110156100c057600080fd5b50356001600160a01b03166101a2565b6100a86101e2565b6100a8610250565b610106600480360360208110156100f657600080fd5b50356001600160a01b0316610253565b60408051918252519081900360200190f35b6100a86102c5565b6100a86004803603602081101561013657600080fd5b50356001600160a01b03166102d0565b6000819050806001600160a01b03166383197ef06040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561018657600080fd5b505af115801561019a573d6000803e3d6000fd5b505050505050565b6000819050806001600160a01b031663775c300c6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561018657600080fd5b60006040516101f090610310565b604051809103906000f08015801561020c573d6000803e3d6000fd5b50604080516001600160a01b038316815290519192507f9ac6876e0aa40667ffeaa9b359b5ed924f4cdd0e029eb6e9c369e78c68f711fb919081900360200190a150565b33ff5b600080829050806001600160a01b0316633fa4f2456040518163ffffffff1660e01b815260040160206040518083038186803b15801561029257600080fd5b505afa1580156102a6573d6000803e3d6000fd5b505050506040513d60208110156102bc57600080fd5b50519392505050565b600080546001019055565b6000819050806001600160a01b031663d09de08a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561018657600080fd5b6101658061031e8339019056fe608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610133806100326000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c80633fa4f2451460415780636057361d14605957806367e404ce146075575b600080fd5b60476097565b60408051918252519081900360200190f35b607360048036036020811015606d57600080fd5b5035609d565b005b607b60ef565b604080516001600160a01b039092168252519081900360200190f35b60025490565b604080513381526020810183905281517fc9db20adedc6cf2b5d25252b101ab03e124902a73fcb12b753f3d1aaa2d8f9f5929181900390910190a1600255600180546001600160a01b03191633179055565b6001546001600160a01b03169056fea265627a7a72305820dc1ce4d08260105d146ec5efa5274950ee9e66f81ff18994d44a40fbd33e45c064736f6c634300050a0032a265627a7a72305820d71e5a225a48fdeb043aaba4264138353b3443a28658bacec7570e108659ad2864736f6c634300050a0032 |
@ -1,284 +0,0 @@ |
||||
/* |
||||
* Copyright ConsenSys AG. |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on |
||||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
||||
* specific language governing permissions and limitations under the License. |
||||
* |
||||
* SPDX-License-Identifier: Apache-2.0 |
||||
*/ |
||||
package org.hyperledger.besu.tests.web3j.generated; |
||||
|
||||
import java.math.BigInteger; |
||||
import java.util.ArrayList; |
||||
import java.util.Arrays; |
||||
import java.util.Collections; |
||||
import java.util.List; |
||||
|
||||
import io.reactivex.Flowable; |
||||
import org.web3j.abi.EventEncoder; |
||||
import org.web3j.abi.TypeReference; |
||||
import org.web3j.abi.datatypes.Address; |
||||
import org.web3j.abi.datatypes.Event; |
||||
import org.web3j.abi.datatypes.Function; |
||||
import org.web3j.abi.datatypes.Type; |
||||
import org.web3j.abi.datatypes.generated.Uint256; |
||||
import org.web3j.crypto.Credentials; |
||||
import org.web3j.protocol.Web3j; |
||||
import org.web3j.protocol.core.DefaultBlockParameter; |
||||
import org.web3j.protocol.core.RemoteCall; |
||||
import org.web3j.protocol.core.RemoteFunctionCall; |
||||
import org.web3j.protocol.core.methods.request.EthFilter; |
||||
import org.web3j.protocol.core.methods.response.BaseEventResponse; |
||||
import org.web3j.protocol.core.methods.response.Log; |
||||
import org.web3j.protocol.core.methods.response.TransactionReceipt; |
||||
import org.web3j.tx.Contract; |
||||
import org.web3j.tx.TransactionManager; |
||||
import org.web3j.tx.gas.ContractGasProvider; |
||||
|
||||
/** |
||||
* Auto generated code. |
||||
* |
||||
* <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.5.0. |
||||
*/ |
||||
@SuppressWarnings("rawtypes") |
||||
public class CrossContractReader extends Contract { |
||||
private static final String BINARY = |
||||
"608060405234801561001057600080fd5b506104b7806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806383197ef01161005b57806383197ef0146100d8578063a087a87e146100e0578063d09de08a14610118578063e689ef8a146101205761007d565b8063305155f9146100825780635374ded2146100aa578063775c300c146100d0575b600080fd5b6100a86004803603602081101561009857600080fd5b50356001600160a01b0316610146565b005b6100a8600480360360208110156100c057600080fd5b50356001600160a01b03166101a2565b6100a86101e2565b6100a8610250565b610106600480360360208110156100f657600080fd5b50356001600160a01b0316610253565b60408051918252519081900360200190f35b6100a86102c5565b6100a86004803603602081101561013657600080fd5b50356001600160a01b03166102d0565b6000819050806001600160a01b03166383197ef06040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561018657600080fd5b505af115801561019a573d6000803e3d6000fd5b505050505050565b6000819050806001600160a01b031663775c300c6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561018657600080fd5b60006040516101f090610310565b604051809103906000f08015801561020c573d6000803e3d6000fd5b50604080516001600160a01b038316815290519192507f9ac6876e0aa40667ffeaa9b359b5ed924f4cdd0e029eb6e9c369e78c68f711fb919081900360200190a150565b33ff5b600080829050806001600160a01b0316633fa4f2456040518163ffffffff1660e01b815260040160206040518083038186803b15801561029257600080fd5b505afa1580156102a6573d6000803e3d6000fd5b505050506040513d60208110156102bc57600080fd5b50519392505050565b600080546001019055565b6000819050806001600160a01b031663d09de08a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561018657600080fd5b6101658061031e8339019056fe608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610133806100326000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c80633fa4f2451460415780636057361d14605957806367e404ce146075575b600080fd5b60476097565b60408051918252519081900360200190f35b607360048036036020811015606d57600080fd5b5035609d565b005b607b60ef565b604080516001600160a01b039092168252519081900360200190f35b60025490565b604080513381526020810183905281517fc9db20adedc6cf2b5d25252b101ab03e124902a73fcb12b753f3d1aaa2d8f9f5929181900390910190a1600255600180546001600160a01b03191633179055565b6001546001600160a01b03169056fea265627a7a72305820dc1ce4d08260105d146ec5efa5274950ee9e66f81ff18994d44a40fbd33e45c064736f6c634300050a0032a265627a7a72305820d71e5a225a48fdeb043aaba4264138353b3443a28658bacec7570e108659ad2864736f6c634300050a0032"; |
||||
|
||||
public static final String FUNC_REMOTEDESTROY = "remoteDestroy"; |
||||
|
||||
public static final String FUNC_DEPLOYREMOTE = "deployRemote"; |
||||
|
||||
public static final String FUNC_DESTROY = "destroy"; |
||||
|
||||
public static final String FUNC_READ = "read"; |
||||
|
||||
public static final String FUNC_INCREMENT = "increment"; |
||||
|
||||
public static final String FUNC_INCREMENTREMOTE = "incrementRemote"; |
||||
|
||||
public static final Event NEWEVENTEMITTER_EVENT = |
||||
new Event( |
||||
"NewEventEmitter", Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {})); |
||||
|
||||
@Deprecated |
||||
protected CrossContractReader( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit); |
||||
} |
||||
|
||||
protected CrossContractReader( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final ContractGasProvider contractGasProvider) { |
||||
super(BINARY, contractAddress, web3j, credentials, contractGasProvider); |
||||
} |
||||
|
||||
@Deprecated |
||||
protected CrossContractReader( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit); |
||||
} |
||||
|
||||
protected CrossContractReader( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final ContractGasProvider contractGasProvider) { |
||||
super(BINARY, contractAddress, web3j, transactionManager, contractGasProvider); |
||||
} |
||||
|
||||
public RemoteFunctionCall<TransactionReceipt> remoteDestroy(final String crossAddress) { |
||||
final Function function = |
||||
new Function( |
||||
FUNC_REMOTEDESTROY, |
||||
Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(160, crossAddress)), |
||||
Collections.<TypeReference<?>>emptyList()); |
||||
return executeRemoteCallTransaction(function); |
||||
} |
||||
|
||||
public RemoteFunctionCall<TransactionReceipt> deployRemote(final String crossAddress) { |
||||
final Function function = |
||||
new Function( |
||||
FUNC_DEPLOYREMOTE, |
||||
Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(160, crossAddress)), |
||||
Collections.<TypeReference<?>>emptyList()); |
||||
return executeRemoteCallTransaction(function); |
||||
} |
||||
|
||||
public RemoteFunctionCall<TransactionReceipt> deploy() { |
||||
final Function function = |
||||
new Function(FUNC_DEPLOY, Arrays.<Type>asList(), Collections.<TypeReference<?>>emptyList()); |
||||
return executeRemoteCallTransaction(function); |
||||
} |
||||
|
||||
public RemoteFunctionCall<TransactionReceipt> destroy() { |
||||
final Function function = |
||||
new Function( |
||||
FUNC_DESTROY, Arrays.<Type>asList(), Collections.<TypeReference<?>>emptyList()); |
||||
return executeRemoteCallTransaction(function); |
||||
} |
||||
|
||||
public RemoteFunctionCall<BigInteger> read(final String emitter_address) { |
||||
final Function function = |
||||
new Function( |
||||
FUNC_READ, |
||||
Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(160, emitter_address)), |
||||
Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {})); |
||||
return executeRemoteCallSingleValueReturn(function, BigInteger.class); |
||||
} |
||||
|
||||
public RemoteFunctionCall<TransactionReceipt> increment() { |
||||
final Function function = |
||||
new Function( |
||||
FUNC_INCREMENT, Arrays.<Type>asList(), Collections.<TypeReference<?>>emptyList()); |
||||
return executeRemoteCallTransaction(function); |
||||
} |
||||
|
||||
public RemoteFunctionCall<TransactionReceipt> incrementRemote(final String crossAddress) { |
||||
final Function function = |
||||
new Function( |
||||
FUNC_INCREMENTREMOTE, |
||||
Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(160, crossAddress)), |
||||
Collections.<TypeReference<?>>emptyList()); |
||||
return executeRemoteCallTransaction(function); |
||||
} |
||||
|
||||
public List<NewEventEmitterEventResponse> getNewEventEmitterEvents( |
||||
final TransactionReceipt transactionReceipt) { |
||||
List<Contract.EventValuesWithLog> valueList = |
||||
extractEventParametersWithLog(NEWEVENTEMITTER_EVENT, transactionReceipt); |
||||
ArrayList<NewEventEmitterEventResponse> responses = |
||||
new ArrayList<NewEventEmitterEventResponse>(valueList.size()); |
||||
for (Contract.EventValuesWithLog eventValues : valueList) { |
||||
NewEventEmitterEventResponse typedResponse = new NewEventEmitterEventResponse(); |
||||
typedResponse.log = eventValues.getLog(); |
||||
typedResponse.contractAddress = (String) eventValues.getNonIndexedValues().get(0).getValue(); |
||||
responses.add(typedResponse); |
||||
} |
||||
return responses; |
||||
} |
||||
|
||||
public Flowable<NewEventEmitterEventResponse> newEventEmitterEventFlowable( |
||||
final EthFilter filter) { |
||||
return web3j |
||||
.ethLogFlowable(filter) |
||||
.map( |
||||
new io.reactivex.functions.Function<Log, NewEventEmitterEventResponse>() { |
||||
@Override |
||||
public NewEventEmitterEventResponse apply(final Log log) { |
||||
Contract.EventValuesWithLog eventValues = |
||||
extractEventParametersWithLog(NEWEVENTEMITTER_EVENT, log); |
||||
NewEventEmitterEventResponse typedResponse = new NewEventEmitterEventResponse(); |
||||
typedResponse.log = log; |
||||
typedResponse.contractAddress = |
||||
(String) eventValues.getNonIndexedValues().get(0).getValue(); |
||||
return typedResponse; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
public Flowable<NewEventEmitterEventResponse> newEventEmitterEventFlowable( |
||||
final DefaultBlockParameter startBlock, final DefaultBlockParameter endBlock) { |
||||
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress()); |
||||
filter.addSingleTopic(EventEncoder.encode(NEWEVENTEMITTER_EVENT)); |
||||
return newEventEmitterEventFlowable(filter); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static CrossContractReader load( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
return new CrossContractReader(contractAddress, web3j, credentials, gasPrice, gasLimit); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static CrossContractReader load( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
return new CrossContractReader(contractAddress, web3j, transactionManager, gasPrice, gasLimit); |
||||
} |
||||
|
||||
public static CrossContractReader load( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final ContractGasProvider contractGasProvider) { |
||||
return new CrossContractReader(contractAddress, web3j, credentials, contractGasProvider); |
||||
} |
||||
|
||||
public static CrossContractReader load( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final ContractGasProvider contractGasProvider) { |
||||
return new CrossContractReader(contractAddress, web3j, transactionManager, contractGasProvider); |
||||
} |
||||
|
||||
public static RemoteCall<CrossContractReader> deploy( |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final ContractGasProvider contractGasProvider) { |
||||
return deployRemoteCall( |
||||
CrossContractReader.class, web3j, credentials, contractGasProvider, BINARY, ""); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static RemoteCall<CrossContractReader> deploy( |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
return deployRemoteCall( |
||||
CrossContractReader.class, web3j, credentials, gasPrice, gasLimit, BINARY, ""); |
||||
} |
||||
|
||||
public static RemoteCall<CrossContractReader> deploy( |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final ContractGasProvider contractGasProvider) { |
||||
return deployRemoteCall( |
||||
CrossContractReader.class, web3j, transactionManager, contractGasProvider, BINARY, ""); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static RemoteCall<CrossContractReader> deploy( |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
return deployRemoteCall( |
||||
CrossContractReader.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, ""); |
||||
} |
||||
|
||||
public static class NewEventEmitterEventResponse extends BaseEventResponse { |
||||
public String contractAddress; |
||||
} |
||||
} |
@ -1 +0,0 @@ |
||||
[{"constant":true,"inputs":[],"name":"value","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"store","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"sender","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_to","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"stored","type":"event"}] |
@ -1 +0,0 @@ |
||||
608060405234801561001057600080fd5b5060008054600160a060020a03191633179055610199806100326000396000f3fe6080604052600436106100565763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f245811461005b5780636057361d1461008257806367e404ce146100ae575b600080fd5b34801561006757600080fd5b506100706100ec565b60408051918252519081900360200190f35b34801561008e57600080fd5b506100ac600480360360208110156100a557600080fd5b50356100f2565b005b3480156100ba57600080fd5b506100c3610151565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60025490565b604080513381526020810183905281517fc9db20adedc6cf2b5d25252b101ab03e124902a73fcb12b753f3d1aaa2d8f9f5929181900390910190a16002556001805473ffffffffffffffffffffffffffffffffffffffff191633179055565b60015473ffffffffffffffffffffffffffffffffffffffff169056fea165627a7a72305820c7f729cb24e05c221f5aa913700793994656f233fe2ce3b9fd9a505ea17e8d8a0029 |
@ -1,251 +0,0 @@ |
||||
/* |
||||
* Copyright ConsenSys AG. |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on |
||||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
||||
* specific language governing permissions and limitations under the License. |
||||
* |
||||
* SPDX-License-Identifier: Apache-2.0 |
||||
*/ |
||||
package org.hyperledger.besu.tests.web3j.generated; |
||||
|
||||
import java.math.BigInteger; |
||||
import java.util.ArrayList; |
||||
import java.util.Arrays; |
||||
import java.util.Collections; |
||||
import java.util.List; |
||||
|
||||
import io.reactivex.Flowable; |
||||
import org.web3j.abi.EventEncoder; |
||||
import org.web3j.abi.TypeReference; |
||||
import org.web3j.abi.datatypes.Address; |
||||
import org.web3j.abi.datatypes.Event; |
||||
import org.web3j.abi.datatypes.Function; |
||||
import org.web3j.abi.datatypes.Type; |
||||
import org.web3j.abi.datatypes.generated.Uint256; |
||||
import org.web3j.crypto.Credentials; |
||||
import org.web3j.protocol.Web3j; |
||||
import org.web3j.protocol.core.DefaultBlockParameter; |
||||
import org.web3j.protocol.core.RemoteCall; |
||||
import org.web3j.protocol.core.RemoteFunctionCall; |
||||
import org.web3j.protocol.core.methods.request.EthFilter; |
||||
import org.web3j.protocol.core.methods.response.BaseEventResponse; |
||||
import org.web3j.protocol.core.methods.response.Log; |
||||
import org.web3j.protocol.core.methods.response.TransactionReceipt; |
||||
import org.web3j.tx.Contract; |
||||
import org.web3j.tx.TransactionManager; |
||||
import org.web3j.tx.gas.ContractGasProvider; |
||||
|
||||
/** |
||||
* Auto generated code. |
||||
* |
||||
* <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.4.1. |
||||
*/ |
||||
@SuppressWarnings("rawtypes") |
||||
public class EventEmitter extends Contract { |
||||
public static final String BINARY = |
||||
"608060405234801561001057600080fd5b5060008054600160a060020a03191633179055610199806100326000396000f3fe6080604052600436106100565763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f245811461005b5780636057361d1461008257806367e404ce146100ae575b600080fd5b34801561006757600080fd5b506100706100ec565b60408051918252519081900360200190f35b34801561008e57600080fd5b506100ac600480360360208110156100a557600080fd5b50356100f2565b005b3480156100ba57600080fd5b506100c3610151565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60025490565b604080513381526020810183905281517fc9db20adedc6cf2b5d25252b101ab03e124902a73fcb12b753f3d1aaa2d8f9f5929181900390910190a16002556001805473ffffffffffffffffffffffffffffffffffffffff191633179055565b60015473ffffffffffffffffffffffffffffffffffffffff169056fea165627a7a72305820c7f729cb24e05c221f5aa913700793994656f233fe2ce3b9fd9a505ea17e8d8a0029"; |
||||
|
||||
public static final String FUNC_VALUE = "value"; |
||||
|
||||
public static final String FUNC_STORE = "store"; |
||||
|
||||
public static final String FUNC_SENDER = "sender"; |
||||
|
||||
public static final Event STORED_EVENT = |
||||
new Event( |
||||
"stored", |
||||
Arrays.<TypeReference<?>>asList( |
||||
new TypeReference<Address>() {}, new TypeReference<Uint256>() {})); |
||||
|
||||
@Deprecated |
||||
protected EventEmitter( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit); |
||||
} |
||||
|
||||
protected EventEmitter( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final ContractGasProvider contractGasProvider) { |
||||
super(BINARY, contractAddress, web3j, credentials, contractGasProvider); |
||||
} |
||||
|
||||
@Deprecated |
||||
protected EventEmitter( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit); |
||||
} |
||||
|
||||
protected EventEmitter( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final ContractGasProvider contractGasProvider) { |
||||
super(BINARY, contractAddress, web3j, transactionManager, contractGasProvider); |
||||
} |
||||
|
||||
public RemoteFunctionCall<BigInteger> value() { |
||||
final Function function = |
||||
new Function( |
||||
FUNC_VALUE, |
||||
Arrays.<Type>asList(), |
||||
Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {})); |
||||
return executeRemoteCallSingleValueReturn(function, BigInteger.class); |
||||
} |
||||
|
||||
public RemoteFunctionCall<TransactionReceipt> store(final BigInteger _amount) { |
||||
final Function function = |
||||
new Function( |
||||
FUNC_STORE, |
||||
Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(_amount)), |
||||
Collections.<TypeReference<?>>emptyList()); |
||||
return executeRemoteCallTransaction(function); |
||||
} |
||||
|
||||
public RemoteFunctionCall<String> sender() { |
||||
final Function function = |
||||
new Function( |
||||
FUNC_SENDER, |
||||
Arrays.<Type>asList(), |
||||
Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {})); |
||||
return executeRemoteCallSingleValueReturn(function, String.class); |
||||
} |
||||
|
||||
public List<StoredEventResponse> getStoredEvents(final TransactionReceipt transactionReceipt) { |
||||
List<Contract.EventValuesWithLog> valueList = |
||||
extractEventParametersWithLog(STORED_EVENT, transactionReceipt); |
||||
ArrayList<StoredEventResponse> responses = new ArrayList<StoredEventResponse>(valueList.size()); |
||||
for (Contract.EventValuesWithLog eventValues : valueList) { |
||||
StoredEventResponse typedResponse = new StoredEventResponse(); |
||||
typedResponse.log = eventValues.getLog(); |
||||
typedResponse._to = (String) eventValues.getNonIndexedValues().get(0).getValue(); |
||||
typedResponse._amount = (BigInteger) eventValues.getNonIndexedValues().get(1).getValue(); |
||||
responses.add(typedResponse); |
||||
} |
||||
return responses; |
||||
} |
||||
|
||||
public Flowable<StoredEventResponse> storedEventFlowable(final EthFilter filter) { |
||||
return web3j |
||||
.ethLogFlowable(filter) |
||||
.map( |
||||
new io.reactivex.functions.Function<Log, StoredEventResponse>() { |
||||
@Override |
||||
public StoredEventResponse apply(final Log log) { |
||||
Contract.EventValuesWithLog eventValues = |
||||
extractEventParametersWithLog(STORED_EVENT, log); |
||||
StoredEventResponse typedResponse = new StoredEventResponse(); |
||||
typedResponse.log = log; |
||||
typedResponse._to = (String) eventValues.getNonIndexedValues().get(0).getValue(); |
||||
typedResponse._amount = |
||||
(BigInteger) eventValues.getNonIndexedValues().get(1).getValue(); |
||||
return typedResponse; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
public Flowable<StoredEventResponse> storedEventFlowable( |
||||
final DefaultBlockParameter startBlock, final DefaultBlockParameter endBlock) { |
||||
EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress()); |
||||
filter.addSingleTopic(EventEncoder.encode(STORED_EVENT)); |
||||
return storedEventFlowable(filter); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static EventEmitter load( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
return new EventEmitter(contractAddress, web3j, credentials, gasPrice, gasLimit); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static EventEmitter load( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
return new EventEmitter(contractAddress, web3j, transactionManager, gasPrice, gasLimit); |
||||
} |
||||
|
||||
public static EventEmitter load( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final ContractGasProvider contractGasProvider) { |
||||
return new EventEmitter(contractAddress, web3j, credentials, contractGasProvider); |
||||
} |
||||
|
||||
public static EventEmitter load( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final ContractGasProvider contractGasProvider) { |
||||
return new EventEmitter(contractAddress, web3j, transactionManager, contractGasProvider); |
||||
} |
||||
|
||||
public static RemoteCall<EventEmitter> deploy( |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final ContractGasProvider contractGasProvider) { |
||||
return deployRemoteCall( |
||||
EventEmitter.class, web3j, credentials, contractGasProvider, BINARY, ""); |
||||
} |
||||
|
||||
public static RemoteCall<EventEmitter> deploy( |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final ContractGasProvider contractGasProvider) { |
||||
return deployRemoteCall( |
||||
EventEmitter.class, web3j, transactionManager, contractGasProvider, BINARY, ""); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static RemoteCall<EventEmitter> deploy( |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
return deployRemoteCall(EventEmitter.class, web3j, credentials, gasPrice, gasLimit, BINARY, ""); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static RemoteCall<EventEmitter> deploy( |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
return deployRemoteCall( |
||||
EventEmitter.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, ""); |
||||
} |
||||
|
||||
public static class StoredEventResponse extends BaseEventResponse { |
||||
public String _to; |
||||
|
||||
public BigInteger _amount; |
||||
} |
||||
} |
@ -1,196 +0,0 @@ |
||||
/* |
||||
* Copyright contributors to Hyperledger Besu |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on |
||||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
||||
* specific language governing permissions and limitations under the License. |
||||
* |
||||
* SPDX-License-Identifier: Apache-2.0 |
||||
*/ |
||||
|
||||
package org.hyperledger.besu.tests.web3j.generated; |
||||
|
||||
import java.math.BigInteger; |
||||
import java.util.Arrays; |
||||
import java.util.Collections; |
||||
|
||||
import org.web3j.abi.TypeReference; |
||||
import org.web3j.abi.datatypes.Address; |
||||
import org.web3j.abi.datatypes.Function; |
||||
import org.web3j.abi.datatypes.Type; |
||||
import org.web3j.abi.datatypes.generated.Uint256; |
||||
import org.web3j.crypto.Credentials; |
||||
import org.web3j.protocol.Web3j; |
||||
import org.web3j.protocol.core.RemoteCall; |
||||
import org.web3j.protocol.core.RemoteFunctionCall; |
||||
import org.web3j.protocol.core.methods.response.TransactionReceipt; |
||||
import org.web3j.tx.Contract; |
||||
import org.web3j.tx.TransactionManager; |
||||
import org.web3j.tx.gas.ContractGasProvider; |
||||
|
||||
/** |
||||
* Auto generated code. |
||||
* |
||||
* <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.5.0. |
||||
*/ |
||||
@SuppressWarnings("rawtypes") |
||||
public class RemoteSimpleStorage extends Contract { |
||||
private static final String BINARY = |
||||
"608060405234801561001057600080fd5b5061034c806100206000396000f3fe608060405234801561001057600080fd5b5060043610610069576000357c01000000000000000000000000000000000000000000000000000000009004806360fe47b11461006e5780636be0d6bf1461009c5780636d4ce63c146100e6578063f1efe24c14610104575b600080fd5b61009a6004803603602081101561008457600080fd5b8101908080359060200190929190505050610148565b005b6100a46101f3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100ee610218565b6040518082815260200191505060405180910390f35b6101466004803603602081101561011a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506102dd565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166360fe47b1826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156101d857600080fd5b505af11580156101ec573d6000803e3d6000fd5b5050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636d4ce63c6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b15801561029d57600080fd5b505afa1580156102b1573d6000803e3d6000fd5b505050506040513d60208110156102c757600080fd5b8101908080519060200190929190505050905090565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fea165627a7a723058209de47b3e814c56fb80861a580d360af8738753c53cc6e71163f687ed3eed570f0029"; |
||||
|
||||
public static final String FUNC_SET = "set"; |
||||
|
||||
public static final String FUNC_SIMPLESTORAGE = "simpleStorage"; |
||||
|
||||
public static final String FUNC_GET = "get"; |
||||
|
||||
public static final String FUNC_SETREMOTE = "setRemote"; |
||||
|
||||
@Deprecated |
||||
protected RemoteSimpleStorage( |
||||
String contractAddress, |
||||
Web3j web3j, |
||||
Credentials credentials, |
||||
BigInteger gasPrice, |
||||
BigInteger gasLimit) { |
||||
super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit); |
||||
} |
||||
|
||||
protected RemoteSimpleStorage( |
||||
String contractAddress, |
||||
Web3j web3j, |
||||
Credentials credentials, |
||||
ContractGasProvider contractGasProvider) { |
||||
super(BINARY, contractAddress, web3j, credentials, contractGasProvider); |
||||
} |
||||
|
||||
@Deprecated |
||||
protected RemoteSimpleStorage( |
||||
String contractAddress, |
||||
Web3j web3j, |
||||
TransactionManager transactionManager, |
||||
BigInteger gasPrice, |
||||
BigInteger gasLimit) { |
||||
super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit); |
||||
} |
||||
|
||||
protected RemoteSimpleStorage( |
||||
String contractAddress, |
||||
Web3j web3j, |
||||
TransactionManager transactionManager, |
||||
ContractGasProvider contractGasProvider) { |
||||
super(BINARY, contractAddress, web3j, transactionManager, contractGasProvider); |
||||
} |
||||
|
||||
public RemoteFunctionCall<TransactionReceipt> set(BigInteger value) { |
||||
final Function function = |
||||
new Function( |
||||
FUNC_SET, |
||||
Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(value)), |
||||
Collections.<TypeReference<?>>emptyList()); |
||||
return executeRemoteCallTransaction(function); |
||||
} |
||||
|
||||
public RemoteFunctionCall<String> simpleStorage() { |
||||
final Function function = |
||||
new Function( |
||||
FUNC_SIMPLESTORAGE, |
||||
Arrays.<Type>asList(), |
||||
Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {})); |
||||
return executeRemoteCallSingleValueReturn(function, String.class); |
||||
} |
||||
|
||||
public RemoteFunctionCall<BigInteger> get() { |
||||
final Function function = |
||||
new Function( |
||||
FUNC_GET, |
||||
Arrays.<Type>asList(), |
||||
Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {})); |
||||
return executeRemoteCallSingleValueReturn(function, BigInteger.class); |
||||
} |
||||
|
||||
public RemoteFunctionCall<TransactionReceipt> setRemote(String _simpleStorage) { |
||||
final Function function = |
||||
new Function( |
||||
FUNC_SETREMOTE, |
||||
Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(160, _simpleStorage)), |
||||
Collections.<TypeReference<?>>emptyList()); |
||||
return executeRemoteCallTransaction(function); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static RemoteSimpleStorage load( |
||||
String contractAddress, |
||||
Web3j web3j, |
||||
Credentials credentials, |
||||
BigInteger gasPrice, |
||||
BigInteger gasLimit) { |
||||
return new RemoteSimpleStorage(contractAddress, web3j, credentials, gasPrice, gasLimit); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static RemoteSimpleStorage load( |
||||
String contractAddress, |
||||
Web3j web3j, |
||||
TransactionManager transactionManager, |
||||
BigInteger gasPrice, |
||||
BigInteger gasLimit) { |
||||
return new RemoteSimpleStorage(contractAddress, web3j, transactionManager, gasPrice, gasLimit); |
||||
} |
||||
|
||||
public static RemoteSimpleStorage load( |
||||
String contractAddress, |
||||
Web3j web3j, |
||||
Credentials credentials, |
||||
ContractGasProvider contractGasProvider) { |
||||
return new RemoteSimpleStorage(contractAddress, web3j, credentials, contractGasProvider); |
||||
} |
||||
|
||||
public static RemoteSimpleStorage load( |
||||
String contractAddress, |
||||
Web3j web3j, |
||||
TransactionManager transactionManager, |
||||
ContractGasProvider contractGasProvider) { |
||||
return new RemoteSimpleStorage(contractAddress, web3j, transactionManager, contractGasProvider); |
||||
} |
||||
|
||||
public static RemoteCall<RemoteSimpleStorage> deploy( |
||||
Web3j web3j, Credentials credentials, ContractGasProvider contractGasProvider) { |
||||
return deployRemoteCall( |
||||
RemoteSimpleStorage.class, web3j, credentials, contractGasProvider, BINARY, ""); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static RemoteCall<RemoteSimpleStorage> deploy( |
||||
Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { |
||||
return deployRemoteCall( |
||||
RemoteSimpleStorage.class, web3j, credentials, gasPrice, gasLimit, BINARY, ""); |
||||
} |
||||
|
||||
public static RemoteCall<RemoteSimpleStorage> deploy( |
||||
Web3j web3j, TransactionManager transactionManager, ContractGasProvider contractGasProvider) { |
||||
return deployRemoteCall( |
||||
RemoteSimpleStorage.class, web3j, transactionManager, contractGasProvider, BINARY, ""); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static RemoteCall<RemoteSimpleStorage> deploy( |
||||
Web3j web3j, |
||||
TransactionManager transactionManager, |
||||
BigInteger gasPrice, |
||||
BigInteger gasLimit) { |
||||
return deployRemoteCall( |
||||
RemoteSimpleStorage.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, ""); |
||||
} |
||||
} |
@ -1 +0,0 @@ |
||||
[{"constant":true,"inputs":[],"name":"revertWithRevertReason","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"revertWithoutRevertReason","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"}] |
@ -1 +0,0 @@ |
||||
608060405234801561001057600080fd5b5060d18061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c806311f95f6f146037578063ff489d31146051575b600080fd5b603d6057565b604080519115158252519081900360200190f35b603d6095565b6040805162461bcd60e51b815260206004820152600c60248201526b2932bb32b93a2932b0b9b7b760a11b6044820152905160009181900360640190fd5b6000806000fdfea265627a7a723058202dd24b599e57aa54899e1beceec3fb4a5001fccb4be994e8d18aa03cc123708764736f6c634300050a0032 |
@ -1,175 +0,0 @@ |
||||
/* |
||||
* Copyright ConsenSys AG. |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on |
||||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
||||
* specific language governing permissions and limitations under the License. |
||||
* |
||||
* SPDX-License-Identifier: Apache-2.0 |
||||
*/ |
||||
package org.hyperledger.besu.tests.web3j.generated; |
||||
|
||||
import java.math.BigInteger; |
||||
import java.util.Arrays; |
||||
|
||||
import org.web3j.abi.TypeReference; |
||||
import org.web3j.abi.datatypes.Bool; |
||||
import org.web3j.abi.datatypes.Function; |
||||
import org.web3j.abi.datatypes.Type; |
||||
import org.web3j.crypto.Credentials; |
||||
import org.web3j.protocol.Web3j; |
||||
import org.web3j.protocol.core.RemoteCall; |
||||
import org.web3j.tx.Contract; |
||||
import org.web3j.tx.TransactionManager; |
||||
import org.web3j.tx.gas.ContractGasProvider; |
||||
|
||||
/** |
||||
* Auto generated code. |
||||
* |
||||
* <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.3.0. |
||||
*/ |
||||
@SuppressWarnings("rawtypes") |
||||
public class RevertReason extends Contract { |
||||
private static final String BINARY = |
||||
"608060405234801561001057600080fd5b5060d18061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c806311f95f6f146037578063ff489d31146051575b600080fd5b603d6057565b604080519115158252519081900360200190f35b603d6095565b6040805162461bcd60e51b815260206004820152600c60248201526b2932bb32b93a2932b0b9b7b760a11b6044820152905160009181900360640190fd5b6000806000fdfea265627a7a723058202dd24b599e57aa54899e1beceec3fb4a5001fccb4be994e8d18aa03cc123708764736f6c634300050a0032"; |
||||
|
||||
public static final String FUNC_REVERTWITHREVERTREASON = "revertWithRevertReason"; |
||||
|
||||
public static final String FUNC_REVERTWITHOUTREVERTREASON = "revertWithoutRevertReason"; |
||||
|
||||
@Deprecated |
||||
protected RevertReason( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit); |
||||
} |
||||
|
||||
protected RevertReason( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final ContractGasProvider contractGasProvider) { |
||||
super(BINARY, contractAddress, web3j, credentials, contractGasProvider); |
||||
} |
||||
|
||||
@Deprecated |
||||
protected RevertReason( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit); |
||||
} |
||||
|
||||
protected RevertReason( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final ContractGasProvider contractGasProvider) { |
||||
super(BINARY, contractAddress, web3j, transactionManager, contractGasProvider); |
||||
} |
||||
|
||||
public RemoteCall<Boolean> revertWithRevertReason() { |
||||
final Function function = |
||||
new Function( |
||||
FUNC_REVERTWITHREVERTREASON, |
||||
Arrays.<Type>asList(), |
||||
Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {})); |
||||
return executeRemoteCallSingleValueReturn(function, Boolean.class); |
||||
} |
||||
|
||||
public RemoteCall<Boolean> revertWithoutRevertReason() { |
||||
final Function function = |
||||
new Function( |
||||
FUNC_REVERTWITHOUTREVERTREASON, |
||||
Arrays.<Type>asList(), |
||||
Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {})); |
||||
return executeRemoteCallSingleValueReturn(function, Boolean.class); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static RevertReason load( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
return new RevertReason(contractAddress, web3j, credentials, gasPrice, gasLimit); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static RevertReason load( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
return new RevertReason(contractAddress, web3j, transactionManager, gasPrice, gasLimit); |
||||
} |
||||
|
||||
public static RevertReason load( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final ContractGasProvider contractGasProvider) { |
||||
return new RevertReason(contractAddress, web3j, credentials, contractGasProvider); |
||||
} |
||||
|
||||
public static RevertReason load( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final ContractGasProvider contractGasProvider) { |
||||
return new RevertReason(contractAddress, web3j, transactionManager, contractGasProvider); |
||||
} |
||||
|
||||
public static RemoteCall<RevertReason> deploy( |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final ContractGasProvider contractGasProvider) { |
||||
return deployRemoteCall( |
||||
RevertReason.class, web3j, credentials, contractGasProvider, BINARY, ""); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static RemoteCall<RevertReason> deploy( |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
return deployRemoteCall(RevertReason.class, web3j, credentials, gasPrice, gasLimit, BINARY, ""); |
||||
} |
||||
|
||||
public static RemoteCall<RevertReason> deploy( |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final ContractGasProvider contractGasProvider) { |
||||
return deployRemoteCall( |
||||
RevertReason.class, web3j, transactionManager, contractGasProvider, BINARY, ""); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static RemoteCall<RevertReason> deploy( |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
return deployRemoteCall( |
||||
RevertReason.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, ""); |
||||
} |
||||
} |
@ -1 +0,0 @@ |
||||
[{"constant":false,"inputs":[{"name":"value","type":"uint256"}],"name":"set","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}] |
@ -1 +0,0 @@ |
||||
608060405234801561001057600080fd5b5060d08061001f6000396000f3fe60806040526004361060485763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166360fe47b18114604d5780636d4ce63c146075575b600080fd5b348015605857600080fd5b50607360048036036020811015606d57600080fd5b50356099565b005b348015608057600080fd5b506087609e565b60408051918252519081900360200190f35b600055565b6000549056fea165627a7a72305820cb1d0935d14b589300b12fcd0ab849a7e9019c81da24d6daa4f6b2f003d1b0180029 |
@ -1,178 +0,0 @@ |
||||
/* |
||||
* Copyright ConsenSys AG. |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on |
||||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
||||
* specific language governing permissions and limitations under the License. |
||||
* |
||||
* SPDX-License-Identifier: Apache-2.0 |
||||
*/ |
||||
package org.hyperledger.besu.tests.web3j.generated; |
||||
|
||||
import java.math.BigInteger; |
||||
import java.util.Arrays; |
||||
import java.util.Collections; |
||||
|
||||
import org.web3j.abi.TypeReference; |
||||
import org.web3j.abi.datatypes.Function; |
||||
import org.web3j.abi.datatypes.Type; |
||||
import org.web3j.abi.datatypes.generated.Uint256; |
||||
import org.web3j.crypto.Credentials; |
||||
import org.web3j.protocol.Web3j; |
||||
import org.web3j.protocol.core.RemoteCall; |
||||
import org.web3j.protocol.core.methods.response.TransactionReceipt; |
||||
import org.web3j.tx.Contract; |
||||
import org.web3j.tx.TransactionManager; |
||||
import org.web3j.tx.gas.ContractGasProvider; |
||||
|
||||
/** |
||||
* Auto generated code. |
||||
* |
||||
* <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.1. |
||||
*/ |
||||
@SuppressWarnings("rawtypes") |
||||
public class SimpleStorage extends Contract { |
||||
private static final String BINARY = |
||||
"608060405234801561001057600080fd5b5060d08061001f6000396000f3fe60806040526004361060485763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166360fe47b18114604d5780636d4ce63c146075575b600080fd5b348015605857600080fd5b50607360048036036020811015606d57600080fd5b50356099565b005b348015608057600080fd5b506087609e565b60408051918252519081900360200190f35b600055565b6000549056fea165627a7a72305820cb1d0935d14b589300b12fcd0ab849a7e9019c81da24d6daa4f6b2f003d1b0180029"; |
||||
|
||||
public static final String FUNC_SET = "set"; |
||||
|
||||
public static final String FUNC_GET = "get"; |
||||
|
||||
@Deprecated |
||||
protected SimpleStorage( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit); |
||||
} |
||||
|
||||
protected SimpleStorage( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final ContractGasProvider contractGasProvider) { |
||||
super(BINARY, contractAddress, web3j, credentials, contractGasProvider); |
||||
} |
||||
|
||||
@Deprecated |
||||
protected SimpleStorage( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit); |
||||
} |
||||
|
||||
protected SimpleStorage( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final ContractGasProvider contractGasProvider) { |
||||
super(BINARY, contractAddress, web3j, transactionManager, contractGasProvider); |
||||
} |
||||
|
||||
public RemoteCall<TransactionReceipt> set(final BigInteger value) { |
||||
final Function function = |
||||
new Function( |
||||
FUNC_SET, |
||||
Arrays.<Type>asList(new org.web3j.abi.datatypes.generated.Uint256(value)), |
||||
Collections.<TypeReference<?>>emptyList()); |
||||
return executeRemoteCallTransaction(function); |
||||
} |
||||
|
||||
public RemoteCall<BigInteger> get() { |
||||
final Function function = |
||||
new Function( |
||||
FUNC_GET, |
||||
Arrays.<Type>asList(), |
||||
Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {})); |
||||
return executeRemoteCallSingleValueReturn(function, BigInteger.class); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static SimpleStorage load( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
return new SimpleStorage(contractAddress, web3j, credentials, gasPrice, gasLimit); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static SimpleStorage load( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
return new SimpleStorage(contractAddress, web3j, transactionManager, gasPrice, gasLimit); |
||||
} |
||||
|
||||
public static SimpleStorage load( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final ContractGasProvider contractGasProvider) { |
||||
return new SimpleStorage(contractAddress, web3j, credentials, contractGasProvider); |
||||
} |
||||
|
||||
public static SimpleStorage load( |
||||
final String contractAddress, |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final ContractGasProvider contractGasProvider) { |
||||
return new SimpleStorage(contractAddress, web3j, transactionManager, contractGasProvider); |
||||
} |
||||
|
||||
public static RemoteCall<SimpleStorage> deploy( |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final ContractGasProvider contractGasProvider) { |
||||
return deployRemoteCall( |
||||
SimpleStorage.class, web3j, credentials, contractGasProvider, BINARY, ""); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static RemoteCall<SimpleStorage> deploy( |
||||
final Web3j web3j, |
||||
final Credentials credentials, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
return deployRemoteCall( |
||||
SimpleStorage.class, web3j, credentials, gasPrice, gasLimit, BINARY, ""); |
||||
} |
||||
|
||||
public static RemoteCall<SimpleStorage> deploy( |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final ContractGasProvider contractGasProvider) { |
||||
return deployRemoteCall( |
||||
SimpleStorage.class, web3j, transactionManager, contractGasProvider, BINARY, ""); |
||||
} |
||||
|
||||
@Deprecated |
||||
public static RemoteCall<SimpleStorage> deploy( |
||||
final Web3j web3j, |
||||
final TransactionManager transactionManager, |
||||
final BigInteger gasPrice, |
||||
final BigInteger gasLimit) { |
||||
return deployRemoteCall( |
||||
SimpleStorage.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, ""); |
||||
} |
||||
} |
Loading…
Reference in new issue