Skip to content

Commit

Permalink
Merge pull request #2075 from rsksmart/add-input-support
Browse files Browse the repository at this point in the history
Add input to CallArguments class
  • Loading branch information
Vovchyk authored Aug 29, 2023
2 parents 30daadc + cbe551f commit e5b5f18
Show file tree
Hide file tree
Showing 3 changed files with 378 additions and 1 deletion.
10 changes: 9 additions & 1 deletion rskj-core/src/main/java/org/ethereum/rpc/CallArguments.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void setValue(String value) {
}

public String getData() {
return data;
return this.data;
}

public void setData(String data) {
Expand Down Expand Up @@ -117,6 +117,14 @@ public void setType(String type) {
this.type = type;
}

public String getInput() {
return this.data;
}

public void setInput(String input) {
this.data = input;
}

@Override
public String toString() {
return "CallArguments{" +
Expand Down
9 changes: 9 additions & 0 deletions rskj-core/src/test/java/co/rsk/rpc/Web3RskImplTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,13 @@ void web3_FilterRequest_toString() {

assertEquals("FilterRequest{fromBlock='1', toBlock='2', address=0x0000000001, topics=[2], blockHash='0x5fe7f977e71dba2ea1a68e21057beebb9be2ac30c6410aa38d4f3fbe41dcffd2'}", filterRequest.toString());
}

@Test
void whenSetInput_DataAndInputAreEquals() {
CallArguments callArguments = new CallArguments();

callArguments.setInput("data");

assertEquals(callArguments.getData(), callArguments.getInput());
}
}
Loading

0 comments on commit e5b5f18

Please sign in to comment.