## Parachain 众筹拍卖模块 ### 流程 - 管理员创建众筹 [crowdfund::create](https://github.com/paritytech/polkadot/blob/45db6e15d2a3832ee7edd44bfb17bc2a8e283872/runtime/src/crowdfund.rs#L194) - 参数 - `orign: Origin` - 要求 Signed ,任何账号都可以发起众筹 - `cap: Balance` - 最多可以筹得的硬顶 - `first_slot: T::BlockNumber` - 竞拍的第一个租赁周期编号 - `last_slot: T::BlockNumber` - 竞拍的最后一个租赁周期编号 - `end: T::BlockNumber` - 众筹结束时间。一次众筹可以参与多次拍卖,但如果直到这个时间众筹还未成功,参与者就可以赎回资金 - 事件 - [Created(FundIndex)](https://github.com/paritytech/polkadot/blob/45db6e15d2a3832ee7edd44bfb17bc2a8e283872/runtime/src/crowdfund.rs#L178) - 众筹编号 - 发起众筹需要先预存一定数量的资金 - 参与者贡献资金 [crowdfund::contribute](https://github.com/paritytech/polkadot/blob/45db6e15d2a3832ee7edd44bfb17bc2a8e283872/runtime/src/crowdfund.rs#L241) - 参数 - `orign: Origin` - 要求 Signed ,任何账号都可以参与众筹 - `index: FundIndex` - 参与的众筹编号 - `value: Balance` - 贡献额度,必须比系统预设的最低额度要多。这部分资金会转移给众筹模块。如果现在在拍卖的结束阶段,会在区块结束时执行竞拍 - 众筹成功,参与者可以生成参与众筹的证据,在平行链上认取相对应的奖励。 - 众筹成功,租赁时间到并且没有续约,参与者可以赎回参与资金 - 众筹失败,参与者可以赎回参与资金