@@ -41,7 +41,7 @@ By defining a Smart Contract interface in Kotlin / Java: (see: [Smart Contract I
4141interface Greeter {
4242 @Throws(IOException ::class )
4343 @Send
44- fun newGreeting (greeting : String ): TransactionReceipt
44+ fun newGreeting (greeting : String ): TransactionHash
4545
4646 @Throws(IOException ::class )
4747 @Call
@@ -53,7 +53,7 @@ interface Greeter {
5353// Java
5454public interface Greeter {
5555 @Send
56- TransactionReceipt newGreeting (String greeting ) throws IOException ;
56+ TransactionHash newGreeting (String greeting ) throws IOException ;
5757
5858 @Call
5959 String greet () throws IOException ;
@@ -72,7 +72,9 @@ val etherSpace = EtherSpace.build {
7272}
7373var greeter = etherSpace.create(SMART_CONTRACT_ADDRESS , Greeter ::class .java)
7474
75- val receipt = greeter.newGreeting(" Hello World" )
75+ val hash = greeter.newGreeting(" Hello World" )
76+ val receipt = hash.requestTransactionReceipt<TransactionReceipt >()
77+
7678println (greeter.greet()) // Should be "Hello World"
7779```
7880
@@ -84,7 +86,9 @@ EtherSpace etherSpace = new EtherSpace.Builder()
8486 .build();
8587Greeter greeter = etherSpace. create(SMART_CONTRACT_ADDRESS , Greeter . class);
8688
87- TransactionReceipt receipt = greeter. newGreeting(" Hello World" );
89+ TransactionHash hash = greeter. newGreeting(" Hello World" );
90+ TransactionReceipt receipt = hash. requestTransactionReceipt();
91+
8892System . out. println(greeter. greet()); // Should be "Hello World"
8993
9094```
0 commit comments