Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096| use std::str; | |
| fn main() { | |
| // -- FROM: vec of chars -- | |
| let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}']; | |
| // to String | |
| let string1: String = src1.iter().collect::<String>(); | |
| // to str | |
| let str1: &str = &src1.iter().collect::<String>(); | |
| // to vec of byte |
| Hey, I'm jimmychu0807-898091 and I have contributed to the Semaphore V4 Ceremony. | |
| The following are my contribution signatures: | |
| Circuit # 1 (semaphorev4-1) | |
| Contributor # 136 | |
| Contribution Hash: | |
| 02b0bc08 ee92a2a8 c030b5fb c2059263 | |
| 36c4f5c9 210366d3 044c958d 64fea3f9 | |
| 88a4debe a73b7ee5 03e8c38a 1c2bc722 | |
| 42b93baa 956c6ca4 e148becf 30491f59 |
| useEffect(() => { | |
| let unsubscribe; | |
| api.query.templateModule.something(newValue => { | |
| // The storage value is an Option<u32> | |
| // So we have to check whether it is None first | |
| // There is also unwrapOr | |
| if (newValue.isNone) { | |
| setCurrentValue('<None>'); | |
| } else { | |
| setCurrentValue(newValue.unwrap().toNumber()); |
| # -- ๅฎ่ฃ NodeJS v12 (https://nodejs.org/en/download/), | |
| # ๅ yarn ๅทฅๅ ท (https://classic.yarnpkg.com/en/docs/install) | |
| # -- ไธ่ผ Substrate ๅ็ซฏๆจก็ไธฆ่ท่ตทไพ | |
| cd .. | |
| git clone https://github.com/substrate-developer-hub/substrate-front-end-template front-end-template | |
| cd front-end-template | |
| yarn install | |
| yarn start |
| api.tx.my_pallet.dispatch_call(params).signAndSend(accountPair, ๅ่ชฟๅฝๆธ) |
| { | |
| "PROVIDER_SOCKET": "ws://<ไฝ ็ ws/wss ๅฐๅ>" | |
| } |
| let unsubscribe; | |
| api.query.templateModule.something(function(val) { | |
| // ๅ่ชฟๅฝๆธ | |
| // ๅจ้่ฃก่จญ็ฝฎ UI ้ไฝฟ็จ็่ฎ้ใ | |
| }).then(unsub => { | |
| //ๅๆถ่จ้ฑๅฝๆธ | |
| unsubscribe = unsub; | |
| }) |
| import { useSubstrate } from './substrate-lib'; | |
| import { TxButton } from './substrate-lib/components'; | |
| //... | |
| function main (props) { | |
| //... | |
| return ( | |
| <Grid.Column> | |
| <h1>Template Module</h1> |
| { | |
| //ๅค้จไบคๆๅฝๆธ | |
| // ้ๅๅ็ๅ `pallet/template/src/lib.rs` ็ๅๅญ | |
| tx: api.tx.<ๆจกๅกๅๅญ>.<extrinsic ๅๅญ> | |
| //ๅค้จไบคๆๅฝๆธ็่ผธๅ ฅๅๆธๆธ็ต | |
| params: [...] | |
| } |