Skip to content

Instantly share code, notes, and snippets.

Parachain 众筹拍卖模块

流程

  • 管理员创建众筹 crowdfund::create
    • 参数
      • orign: Origin
        • 要求 Signed ,任何账号都可以发起众筹
      • cap: Balance
  • 最多可以筹得的硬顶
# Theory
[White Paper](https://darwinia.network/ChainRelay_Technical_Paper(Preview)_EN.pdf)
[Darwinia-Ethereum Bridge](https://docs.google.com/document/d/1NVDSk6KZXV5CjE20cNPA8Swmmd89IYeWyN0T9lRBOEM)
# Projects Navigation
## [Darwinia Bridge SPV Module](https://github.com/darwinia-network/darwinia-common/tree/master/frame/bridge)
package main
import (
"fmt"
"reflect"
"strings"
)
type Human struct {
Head string `json:"a1" xml:"x1"`
@yrong
yrong / reflection.go
Created December 29, 2020 13:54 — forked from drewolson/reflection.go
Golang Reflection Example
package main
import (
"fmt"
"reflect"
)
type Foo struct {
FirstName string `tag_name:"tag 1"`
LastName string `tag_name:"tag 2"`
package main
// https://blog.kowalczyk.info/article/wOYk/advanced-command-execution-in-go-with-osexec.html
import (
"fmt"
"io"
"log"
"os"
"os/exec"
//
// Companion code to https://medium.com/statuscode/pipeline-patterns-in-go-a37bb3a7e61d
//
// To run:
// go get github.com/pkg/errors
// go run -race pipeline_demo.go
//
package main
@yrong
yrong / mysql-conf.sh
Created November 9, 2020 00:50 — forked from lesstif/mysql-conf.sh
MySQL Server configuration file for docker.
#!/bin/bash
export MYSQL_CNF=$(cat <<CNF
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package context_test
import (
"context"
"fmt"
"time"
[dynamic component](https://codesandbox.io/s/floral-water-i1ik1)
[single file component](https://codesandbox.io/s/simple-todo-app-with-vue-z2gjs)
@yrong
yrong / customEdge.html
Created November 12, 2019 13:33 — forked from davidjgraph/customEdge.html
Custom edge example for mxGraph
<!--
$Id: markers.html,v 1.4 2013/10/28 08:44:55 gaudenz Exp $
Copyright (c) 2006-2014, JGraph Ltd
Demonstrates creating a custom edge in mxGraph
-->
<html>
<head>
<title>Custom edge example for mxGraph</title>