/*
 * 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, "");
  }
}
