Skip to content

Instantly share code, notes, and snippets.

Avatar

Xiliang Chen xlc

View GitHub Profile
View acala-types.json
{
"AccountId": "GenericAccountId",
"AccountIdOf": "AccountId",
"AccountIndex": "GenericAccountIndex",
"Address": "GenericAddress",
"AssetId": "u32",
"Balance": "u128",
"BalanceOf": "Balance",
"Block": "GenericBlock",
"BlockNumber": "u32",
View Parachain 众筹拍卖模块.md

Parachain 众筹拍卖模块

流程

  • 管理员创建众筹 crowdfund::create
    • 参数
      • orign: Origin
        • 要求 Signed ,任何账号都可以发起众筹
      • cap: Balance
        • 最多可以筹得的硬顶
View rust question.rs
// Complete this program to make it passes all the tests
// TODO: implement Traversable trait for TreeNode and make test pass
// Bonus points: Add more test cases to demonstrate your implementation is correct
// You may use Rust playground https://play.rust-lang.org to run and test the code
// Make sure you set the mode to `Test`, by clicking the menu button next to `Run`, and choose `Test`
// More details: https://en.wikipedia.org/wiki/Tree_traversal#Depth-first_search
#[derive(Copy, Clone)]
pub enum TraverseOrder {
PreOrder,
View metadata.json
{
"magicNumber": 1635018093,
"metadata": {
"MetadataV2": {
"modules": [
{
"name": "system",
"prefix": "System",
"storage": [
{
View metadata
RuntimeMetadataPrefixed(
1635018093,
V2(
RuntimeMetadataV2 {
modules: [
ModuleMetadata {
name: "system",
prefix: "System",
storage: Some(
[
View gist:3778f339afb9c1f4557ac9391cd14928
RuntimeMetadataPrefixed(
1635018093,
V2(
RuntimeMetadataV2 {
modules: [
ModuleMetadata {
name: "system",
prefix: "System",
storage: Some(
[
View metadata.js
native = ([70, 127, 1, 0, 20, 69, 118, 101, 110, 116, 52, 24, 115, 121, 115, 116, 101, 109, 8, 64, 69, 120, 116, 114, 105, 110, 115, 105, 99, 83, 117, 99, 99, 101, 115, 115, 0, 4, 148, 32, 65, 110, 32, 101, 120, 116, 114, 105, 110, 115, 105, 99, 32, 99, 111, 109, 112, 108, 101, 116, 101, 100, 32, 115, 117, 99, 99, 101, 115, 115, 102, 117, 108, 108, 121, 46, 60, 69, 120, 116, 114, 105, 110, 115, 105, 99, 70, 97, 105, 108, 101, 100, 0, 4, 84, 32, 65, 110, 32, 101, 120, 116, 114, 105, 110, 115, 105, 99, 32, 102, 97, 105, 108, 101, 100, 46, 28, 105, 110, 100, 105, 99, 101, 115, 4, 60, 78, 101, 119, 65, 99, 99, 111, 117, 110, 116, 73, 110, 100, 101, 120, 8, 36, 65, 99, 99, 111, 117, 110, 116, 73, 100, 48, 65, 99, 99, 111, 117, 110, 116, 73, 110, 100, 101, 120, 4, 108, 32, 65, 32, 110, 101, 119, 32, 97, 99, 99, 111, 117, 110, 116, 32, 119, 97, 115, 32, 99, 114, 101, 97, 116, 101, 100, 46, 32, 98, 97, 108, 97, 110, 99, 101, 115, 12, 40, 78, 101, 119, 65, 99, 99, 111, 117, 110, 116, 8, 36, 65, 99, 99, 111, 117, 110,
View index.js
const mh = require('multihashes')
const crypto = require('libp2p-crypto')
const secp256k1factory = require('libp2p-crypto-secp256k1')
const { Secp256k1PrivateKey } = secp256k1factory(crypto.keys.keysPBM, crypto.randomBytes)
const input = '0000000000000000000000000000000000000000000000000000000000000001'
const key = Buffer.from(input, 'hex')
const sk = new Secp256k1PrivateKey(key)
View substrate runtime metadata
This file has been truncated, but you can view the full file.
RuntimeMetadata {
outer_event: OuterEventMetadata {
name: "Event",
events: [
(
"system",
[
EventMetadata {
name: "ExtrinsicSuccess",
You can’t perform that action at this time.