Search in sources :

Example 1 with ImmutableDebugAccountAtResult

use of org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.ImmutableDebugAccountAtResult in project besu by hyperledger.

the class DebugAccountAtTest method testResult.

@Test
public void testResult() {
    final String codeString = "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063b27b880414610030575b";
    final Bytes code = Bytes.fromHexString(codeString);
    final String nonce = "0x1";
    final String balance = "0xffff";
    final String codeHash = "0xf5f334d41776ed2828fc910d488a05c57fe7c2352aab2d16e30539d7726e1562";
    ImmutableDebugAccountAtResult result = debugAccountAt.debugAccountAtResult(code, nonce, balance, codeHash);
    Assertions.assertThat(result.getBalance()).isEqualTo(balance);
    Assertions.assertThat(result.getNonce()).isEqualTo(nonce);
    Assertions.assertThat(result.getCode()).isEqualTo(codeString);
    Assertions.assertThat(result.getCodehash()).isEqualTo(codeHash);
}
Also used : Bytes(org.apache.tuweni.bytes.Bytes) ImmutableDebugAccountAtResult(org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.ImmutableDebugAccountAtResult) Test(org.junit.Test)

Aggregations

Bytes (org.apache.tuweni.bytes.Bytes)1 ImmutableDebugAccountAtResult (org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.ImmutableDebugAccountAtResult)1 Test (org.junit.Test)1