-
Notifications
You must be signed in to change notification settings - Fork 3
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
Bridge zkApp implementation #79
base: compatible
Are you sure you want to change the base?
Conversation
1d5fd52
to
b14038b
Compare
/* | ||
const transactionJSON = await workerClient!.createBridgeTransaction({ | ||
amount, | ||
direction, | ||
sender, | ||
target, | ||
}); | ||
|
||
const { hash } = await window.mina!.sendTransaction({ | ||
transaction: transactionJSON, | ||
feePayer: { | ||
fee: transactionFee, | ||
memo: "", | ||
}, | ||
}); | ||
|
||
const transactionLink = `https://berkeley.minaexplorer.com/transaction/${hash}`; | ||
console.log(`View transaction at ${transactionLink}`); | ||
*/ | ||
await timeout(5); |
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.
Just leaving a comment here to note which parts need to be filled in later
import { PublicKey } from "o1js"; | ||
import { useAppStore } from "../configs/store"; | ||
|
||
const KNOWN_ERROR_CODES: number[] = [20005, 1002]; |
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.
Where do these come from? Magic numbers are not great, so at the very least we should have a comment
sender: account.publicKey, | ||
target: targetAddress, | ||
}); | ||
// todo: mechanism that is waiting for tx confirmation and will edit stored txn status via editStoredTransaction |
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.
Just taking notes of which functions we need to fill in later
c7580aa
to
ba8e58e
Compare
Pretty much everything is prepared for when the sequencer is ready to be used for transaction generation.