Skip to content

Commit

Permalink
chore: 🤖 Remove unnecessary output and add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Liu Chuankai committed Nov 21, 2022
1 parent 65c3c62 commit 65750b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 0 additions & 2 deletions examples/transfer_from_opentx.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ ckb-cli wallet transfer --from-account 0xc8328aabcd9b9e8e64fbc566c4385c3bdeb219d
```
output:
```json
pubkey:"038d3cfceea4f9c2e76c5c4f5e99aec74c26d6ac894648b5700a0b71f91f9b5c2a"
pubkey:"048d3cfceea4f9c2e76c5c4f5e99aec74c26d6ac894648b5700a0b71f91f9b5c2a26b16aac1d5753e56849ea83bf795eb8b06f0b6f4e5ed7b8caca720595458039"
{
"lock-arg": "0x01cf2485c76aff1f2b4464edf04a1c8045068cf7e010",
"lock-hash": "0x057dcd204f26621ef49346ed77d2bdbf3069b83a5ef0a2b52be5299a93507cf6",
Expand Down
8 changes: 6 additions & 2 deletions examples/transfer_from_opentx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ use clap::{Args, Parser, Subcommand};
use serde::{Deserialize, Serialize};
use std::{collections::HashMap, error::Error as StdErr, fs, path::PathBuf};

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

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

0 comments on commit 65750b8

Please sign in to comment.