-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1784 from o1-labs/multi-actions-order
Correcting order for actions occuring within the same block for the same account
- Loading branch information
Showing
13 changed files
with
539 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export { | ||
DEFAULT_LIGHTNET_CONFIG | ||
} | ||
|
||
const DEFAULT_LIGHTNET_CONFIG = { | ||
mina: 'http://localhost:8080/graphql', | ||
archive: 'http://localhost:8282', | ||
lightnetAccountManager: 'http://localhost:8181', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { PrivateKey, PublicKey } from 'o1js'; | ||
|
||
export { | ||
randomAccounts | ||
} | ||
|
||
/** | ||
* Predefined accounts keys, labeled by the input strings. Useful for testing/debugging with consistent keys. | ||
*/ | ||
function randomAccounts<K extends string>( | ||
...names: [K, ...K[]] | ||
): { keys: Record<K, PrivateKey>; addresses: Record<K, PublicKey> } { | ||
let base58Keys = Array(names.length) | ||
.fill('') | ||
.map(() => PrivateKey.random().toBase58()); | ||
let keys = Object.fromEntries( | ||
names.map((name, idx) => [name, PrivateKey.fromBase58(base58Keys[idx])]) | ||
) as Record<K, PrivateKey>; | ||
let addresses = Object.fromEntries( | ||
names.map((name) => [name, keys[name].toPublicKey()]) | ||
) as Record<K, PublicKey>; | ||
return { keys, addresses }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.