Skip to content

Commit 65750b8

Browse files
author
Liu Chuankai
committed
chore: 🤖 Remove unnecessary output and add comments
1 parent 65c3c62 commit 65750b8

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

‎examples/transfer_from_opentx.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ ckb-cli wallet transfer --from-account 0xc8328aabcd9b9e8e64fbc566c4385c3bdeb219d
5959
```
6060
output:
6161
```json
62-
pubkey:"038d3cfceea4f9c2e76c5c4f5e99aec74c26d6ac894648b5700a0b71f91f9b5c2a"
63-
pubkey:"048d3cfceea4f9c2e76c5c4f5e99aec74c26d6ac894648b5700a0b71f91f9b5c2a26b16aac1d5753e56849ea83bf795eb8b06f0b6f4e5ed7b8caca720595458039"
6462
{
6563
"lock-arg": "0x01cf2485c76aff1f2b4464edf04a1c8045068cf7e010",
6664
"lock-hash": "0x057dcd204f26621ef49346ed77d2bdbf3069b83a5ef0a2b52be5299a93507cf6",

‎examples/transfer_from_opentx.rs‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ use clap::{Args, Parser, Subcommand};
3535
use serde::{Deserialize, Serialize};
3636
use std::{collections::HashMap, error::Error as StdErr, fs, path::PathBuf};
3737

38+
// The transaction hash i deployed my omnilock script with open transaction function on my test environment.
39+
// You should not use this hash to find your open transaction code_hash at any circumstances,
40+
// or you will lost your CKB for ever, or not make the example work.
41+
// You should replace this hash with your own transaction hash or provide one with command line parameter for this example.
3842
const OPENTX_TX_HASH: &str = "d7697f6b3684d1451c42cc538b3789f13b01430007f65afe74834b6a28714a18";
3943
const OPENTX_TX_IDX: &str = "0";
4044

@@ -438,8 +442,8 @@ fn build_omnilock_addr(args: &BuildOmniLockAddrArgs) -> Result<(), Box<dyn StdEr
438442
} else if let Some(ethereum_receiver) = args.ethereum_receiver.as_ref() {
439443
let privkey = secp256k1::SecretKey::from_slice(ethereum_receiver.as_bytes()).unwrap();
440444
let pubkey = secp256k1::PublicKey::from_secret_key(&SECP256K1, &privkey);
441-
println!("pubkey:{:?}", hex_string(&pubkey.serialize()));
442-
println!("pubkey:{:?}", hex_string(&pubkey.serialize_uncompressed()));
445+
// println!("pubkey:{:?}", hex_string(&pubkey.serialize()));
446+
// println!("pubkey:{:?}", hex_string(&pubkey.serialize_uncompressed()));
443447
let addr = keccak160(Pubkey::from(pubkey).as_ref());
444448
OmniLockConfig::new_ethereum(addr)
445449
} else if !args.multis_args.sighash_address.is_empty() {

0 commit comments

Comments
 (0)