-
Notifications
You must be signed in to change notification settings - Fork 7
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
Feat introduced icp nonces for context contract #1031
base: feat--add-near-calls-nonce
Are you sure you want to change the base?
Conversation
…ment, added tracking cycle spending in proxy tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can deduplicate the nonce increment, check the near impl
configs | ||
.contexts | ||
.get(&context_id) | ||
.and_then(|context| context.member_nonces.get(&member_id)) | ||
.copied() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for consistency, we should probably panic if the context does not exist
same as we have it above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but should we be panicking in ICP at all? how do they handle that? since the state is in-memory, do we lose data?
And.. migrations though there's no active deployment, so I guess we can get away with it |
|
||
// Execute the transfer with proper type annotations | ||
let transfer_result: Result<(Result<u64, TransferError>,), _> = | ||
ic_cdk::call(ledger_id, "transfer", (transfer_args,)).await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
icrc2
's transfer_from
? or does this work too
…ontract principal, removed static IDs of canisters
Introduced nonce logic for mutate requests in icp context contract.
Optimized context contract for less spending.
Optimized proxy contract for cross-contract calls that include deposit