Phala-Network / phat-offchain-rollup

Phat Contract Offchain Rollup implementation
Apache License 2.0
18 stars 13 forks source link

Export rollup session #9

Closed tolak closed 1 year ago

tolak commented 1 year ago

Currently, session in SubstrateRollupClient is not exported, we can not use it directly in our code like following way while it is a common feature requirement when we want to access rollup storage like a KV storage.

let client = SubstrateRollupClient(...);
client.session.get(b"pending_tasks".to_vec()).unwrap();
client.session.put(b"free_accounts".to_vec(), free_accounts);
client.session.put(b"pending_tasks".to_vec(), pending_tasks);