findoranetwork / abcf Goto Github PK
View Code? Open in Web Editor NEWApplication Blockchain Framework.
Application Blockchain Framework.
Currently, we need some work.
Complete storage layer bs3.
Complete function of abcf
.
entry
)
manager
)
minicbor
to ciborium
@malefooo 1day.wasm
module.https://www.notion.so/findora/Modularization-in-Design-263050607c5d4db2b93d0bf8e9109541
Add optimizations for abcf.
Call
in macros.Define new trait named Module
pub trait Context {
type Store: bs3::Store;
type Digest: digest::Digest;
// Trigger event;
fn emmit(&mut self, event: impl Event);
// Spwan a new async work.
fn spwan<R>(&mut self, handler: impl core::future::Future<Output = R>) -> R;
// Get block info.
fn block(&self) -> &Block;
// Get Consensus info.
fn consensus(&self) -> &Consensus;
// Get Governance info.
fn governance(&self) -> &Governance;
}
pub trait ContextMut: Context {
fn consensus_mut(&mut self) -> &mut Consensus;
fn governance_mut(&mut self) -> &mut Governance;
}
When you declare a module:
#[abcf::module]
pub struct MockModule<C: Context> {
ctx: C,
#[metadata(
name = "mock",
version = 0,
impl_version,
target_height = 0,
)]
metadata: abcf::Metadata,
#[storage(merkle="AppendOnlyMerkle")]
storage_value: Value<u32, C>,
#[dependence]
utxo: UtxoModule<C>,
}
When you create a module, please use code like this:
let backend = SledBackend::open_db("target/data/mock");
let mut mock = MockModule::new::<_, Sha3_256>(&backend);
mock.genesis_storage_value(Value::new(123));
let mockv1 = MockModuleV1::new<_, Sha3_256>(&backend);
Convert the ABCI
interface result in Result
. And use Result
to generate the error log.
Due to the ABCI application will process data in any type, so we need to remove JSON dependence in ABCI.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.