moved to https://github.com/octopus-network/octopus-pallets/tree/main/appchain
A pallet for integrating Substrate-based blockchain as Octopus Appchain.
You can view the reference docs for this pallet by running:
cargo doc --open
FRAME pallet for joining the octopus network as an appchain.
License: Apache License 2.0
moved to https://github.com/octopus-network/octopus-pallets/tree/main/appchain
A pallet for integrating Substrate-based blockchain as Octopus Appchain.
You can view the reference docs for this pallet by running:
cargo doc --open
Use the same decimal as on the mainchain.
USDC: 6
OCT: 18
pallet-octopus-appchain/src/mainchain.rs
Line 65 in e018695
so different nodes can use different endpoints to access mainchain.
$ cargo test -p pallet-octopus-appchain
error[E0046]: not all trait items implemented, missing: `PalletId`, `Currency`
--> bin/node-template/pallets/octopus-appchain/src/mock.rs:187:1
|
187 | impl pallet_octopus_appchain::Config for Test {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `PalletId`, `Currency` in implementation
|
::: bin/node-template/pallets/octopus-appchain/src/lib.rs:244:9
|
244 | type PalletId: Get<PalletId>;
| ----------------------------- `PalletId` from trait
245 |
246 | type Currency: Currency<Self::AccountId>;
| ----------------------------------------- `Currency` from trait
error: aborting due to previous error
For more information about this error, try `rustc --explain E0046`.
error: could not compile `pallet-octopus-appchain`
pallet-octopus-appchain/src/lib.rs
Line 249 in 1ccea1c
FactSequence
currently tracks the current fact seq_num of appchain.
Changing its meaning to NextFactSequence
would greatly simplify the code.
And its type will change from Option<u64>
to 64
.
pallet-octopus-appchain/src/lib.rs
Line 223 in e018695
so we can switch an appchain to the dev testnet to test it.
refer to:
pallet-octopus-appchain/src/lib.rs
Line 237 in e018695
pallet-octopus-appchain/src/lib.rs
Line 657 in e018695
pallet-octopus-appchain/src/lib.rs
Line 672 in e018695
Currently, we fetch only one observation from mainchain and process it.
We should fetch multiple observations at a time, change observation
of payload to observations
, then make the corresponding changes to Call::submit_observation
see snowfork:
134 /// Submit message on the outbound channel
135 pub fn submit(who: &T::AccountId, target: H160, payload: &[u8]) -> DispatchResult {
140 ensure!(
141 MessageQueue::decode_len().unwrap_or(0) < T::MaxMessagesPerCommit::get(),
142 Error::<T>::QueueSizeLimitReached,
143 );
144 ensure!(
145 payload.len() <= T::MaxMessagePayloadSize::get(),
146 Error::<T>::PayloadTooLarge,
147 );
pallet-octopus-appchain/src/lib.rs
Line 560 in 1ccea1c
The name of the asset should be looked up before burn_from, return an error if the asset doesn't exist.
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.