Search in sources :

Example 11 with CallArguments

use of org.ethereum.rpc.CallArguments in project rskj by rsksmart.

the class CallArgumentsToByteArrayTest method getGasPriceWhenValueIsNull.

@Test
public void getGasPriceWhenValueIsNull() throws Exception {
    CallArguments args = new CallArguments();
    CallArgumentsToByteArray byteArrayArgs = new CallArgumentsToByteArray(args);
    Assert.assertArrayEquals(new byte[] { 0 }, byteArrayArgs.getGasPrice());
}
Also used : CallArguments(org.ethereum.rpc.CallArguments) Test(org.junit.Test)

Example 12 with CallArguments

use of org.ethereum.rpc.CallArguments in project rskj by rsksmart.

the class CallArgumentsToByteArrayTest method getGasPriceWhenValueIsEmpty.

@Test
public void getGasPriceWhenValueIsEmpty() throws Exception {
    CallArguments args = new CallArguments();
    args.setGasPrice("");
    CallArgumentsToByteArray byteArrayArgs = new CallArgumentsToByteArray(args);
    Assert.assertArrayEquals(new byte[] { 0 }, byteArrayArgs.getGasPrice());
}
Also used : CallArguments(org.ethereum.rpc.CallArguments) Test(org.junit.Test)

Example 13 with CallArguments

use of org.ethereum.rpc.CallArguments in project rskj by rsksmart.

the class CallArgumentsToByteArrayTest method getToAddressWhenValueIsNull.

@Test
public void getToAddressWhenValueIsNull() throws Exception {
    CallArguments args = new CallArguments();
    CallArgumentsToByteArray byteArrayArgs = new CallArgumentsToByteArray(args);
    Assert.assertNull(byteArrayArgs.getToAddress());
}
Also used : CallArguments(org.ethereum.rpc.CallArguments) Test(org.junit.Test)

Example 14 with CallArguments

use of org.ethereum.rpc.CallArguments in project rskj by rsksmart.

the class CallArgumentsToByteArrayTest method getDataWhenValueIsNull.

@Test
public void getDataWhenValueIsNull() throws Exception {
    CallArguments args = new CallArguments();
    CallArgumentsToByteArray byteArrayArgs = new CallArgumentsToByteArray(args);
    Assert.assertNull(byteArrayArgs.getData());
}
Also used : CallArguments(org.ethereum.rpc.CallArguments) Test(org.junit.Test)

Example 15 with CallArguments

use of org.ethereum.rpc.CallArguments in project rskj by rsksmart.

the class NestedContractsTest method buildArgs.

private CallArguments buildArgs(String toAddress, String data) {
    final CallArguments args = new CallArguments();
    args.setTo(toAddress);
    // call to contract
    args.setData("0x" + data);
    args.setValue("0");
    args.setNonce("1");
    args.setGas("10000000");
    return args;
}
Also used : CallArguments(org.ethereum.rpc.CallArguments)

Aggregations

CallArguments (org.ethereum.rpc.CallArguments)32 Test (org.junit.Test)30 Block (org.ethereum.core.Block)10 ProgramResult (org.ethereum.vm.program.ProgramResult)10 World (co.rsk.test.World)9 RskAddress (co.rsk.core.RskAddress)8 TransactionReceipt (org.ethereum.core.TransactionReceipt)8 EthModuleTestUtils (org.ethereum.util.EthModuleTestUtils)8 TestSystemProperties (co.rsk.config.TestSystemProperties)5 Wallet (co.rsk.core.Wallet)4 BigInteger (java.math.BigInteger)4 HashMapDB (org.ethereum.datasource.HashMapDB)4 RskJsonRpcRequestException (org.ethereum.rpc.exception.RskJsonRpcRequestException)4 GasCost (org.ethereum.vm.GasCost)4 Coin (co.rsk.core.Coin)3 ReversibleTransactionExecutor (co.rsk.core.ReversibleTransactionExecutor)3 BlockResult (co.rsk.core.bc.BlockResult)3 BridgeSupportFactory (co.rsk.peg.BridgeSupportFactory)3 ExecutionBlockRetriever (co.rsk.rpc.ExecutionBlockRetriever)3 DslProcessorException (co.rsk.test.dsl.DslProcessorException)3