Skip to content

Commit 7903b26

Browse files
authored
Merge pull request #129 from automata-network/cf/anydao
Support DAOPortal RPC in ContextFree and Changelog for v0.1.1
2 parents 58404e0 + 5246eb9 commit 7903b26

File tree

2 files changed

+32
-4
lines changed

2 files changed

+32
-4
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,20 @@
1212
#### Fixes
1313
- None
1414
#### Migrations
15+
- None
16+
17+
## [0.1.1] - 2022-04-07
18+
19+
### Automata 0.1.0
20+
| Chain | Runtime Spec Version |
21+
| :---------: | :------------------: |
22+
| Automata | 1000 |
23+
| ContextFree | 1005 |
24+
25+
### Change Log
26+
#### Updates
27+
- Integrate DAOPortal Pallet to ContextFree and Enable related RPC calls
28+
#### Fixes
29+
- None
30+
#### Migrations
1531
- None

rpc/src/lib.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ use automata_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Index};
1717
// };
1818
// #[cfg(feature = "contextfree")]
1919
// use contextfree_runtime::apis::TransferApi as TransferRuntimeApi;
20+
#[cfg(feature = "contextfree")]
21+
use contextfree_runtime::apis::DAOPortalApi as DAOPortalRuntimeApi;
2022
use fc_rpc::{OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override, StorageOverride};
2123
use fc_rpc_core::types::PendingTransactions;
2224
// #[cfg(feature = "finitestate")]
@@ -53,6 +55,9 @@ use std::sync::Arc;
5355
// #[cfg(feature = "automata")]
5456
// pub mod transfer;
5557

58+
#[cfg(feature = "contextfree")]
59+
pub mod daoportal;
60+
5661
#[cfg(feature = "finitestate")]
5762
pub mod daoportal;
5863

@@ -168,15 +173,22 @@ where
168173
C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,
169174
C::Api: sp_consensus_babe::BabeApi<Block>,
170175
C::Api: BlockBuilder<Block>,
176+
C::Api: DAOPortalRuntimeApi<Block>,
171177
P: TransactionPool<Block = Block> + 'static,
172178
B: sc_client_api::Backend<Block> + Send + Sync + 'static,
173179
B::State: sc_client_api::StateBackend<sp_runtime::traits::HashFor<Block>>,
174180
SC: sp_consensus::SelectChain<Block> + 'static,
175181
{
176-
Ok(create_full_base::<C, P, BE, B, SC>(
177-
deps,
178-
subscription_task_executor,
179-
))
182+
use daoportal::DAOPortalServer;
183+
184+
let _client = deps.client.clone();
185+
let mut io = create_full_base::<C, P, BE, B, SC>(deps, subscription_task_executor);
186+
187+
io.extend_with(DAOPortalServer::to_delegate(daoportal::DAOPortalApi::new(
188+
_client.clone(),
189+
)));
190+
191+
Ok(io)
180192
}
181193

182194
#[cfg(feature = "automata")]

0 commit comments

Comments
 (0)