Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View function poc - do not merge #153

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

shaunxw
Copy link

@shaunxw shaunxw commented Jan 20, 2023

No description provided.

Copy link
Member

@xlc xlc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to think about how to deal with next key and prefix keys

@@ -101,6 +102,8 @@ pub async fn run_task(task: TaskCall, js: crate::JsCallback) -> Result<TaskRespo
.unwrap();
let mut ret: Result<Vec<u8>, String> = Ok(Vec::new());

let mut keys: Vec<HexString> = Vec::new();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to deupe this


const api = await ApiPromise.create({ provider: context.api.provider })
const unsub = await api.rpc.state.subscribeStorage(accessedStorageKeys, async (_changes) => {
const nonce = await getNonce();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to resub the new storages just in case it is accessing something else

mockSignatureHost: false,
allowUnresolvedImports: false,
},
taskHandler(parent)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not correct. this need to be head

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be context.chain.head.call('AccountNonceApi_account_nonce', accountId)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants