Skip to content

Commit

Permalink
Merge pull request #660 from blckngm/fix-readme-builder-example
Browse files Browse the repository at this point in the history
chore: fix README transaction builder example
  • Loading branch information
quake committed Aug 1, 2023
2 parents 25dde25 + c590c08 commit d05f5e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ Here is an example to build a CKB transfer transaction with the help of transact
String sender = "ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsq2qf8keemy2p5uu0g0gn8cd4ju23s5269qk8rg4r";
String receiver = "ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqg958atl2zdh8jn3ch8lc72nt0cf864ecqdxm9zf";
Iterator<TransactionInput> iterator = new InputIterator(sender);
TransactionWithScriptGroups txWithGroups = new CkbTransactionBuilder(iterator, Network.TESTNET)
TransactionBuilderConfiguration configuration = new TransactionBuilderConfiguration(Network.TESTNET);
configuration.setFeeRate(1000);
TransactionWithScriptGroups txWithGroups = new CkbTransactionBuilder(configuration, iterator)
.addOutput(receiver, 50100000000L)
.setFeeRate(1000)
.setChangeOutput(sender)
.build();
```
Expand Down
1 change: 1 addition & 0 deletions ckb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies {
implementation project(":serialization")

implementation "com.google.code.gson:gson:$gsonVersion"
implementation "com.google.guava:guava:$guavaVersion"
}

apply plugin: 'com.github.johnrengelman.shadow'

0 comments on commit d05f5e6

Please sign in to comment.