-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* merged files * merged space from develop * updated tests * single slot test with slot key verif * formatting * fixed more tests * fixed more tests * single slot strategy added * merged quorum stuff * revamped create proposal * fixed create vote * updated eth tx auth * zodiac test fixes * zodiac test revamp * updates * zodiac updates * fixed single slot proof strat test * Update README.md * Update README.md * fixed controller test * fixed executor whitelist test * fixed whitelist voting strategytest * more merge fixes * fix l1 tests * Delete vanilla_space.ts * Delete vanilla_authenticator.ts * replaced hardcoded vals with random ones in tests * increased timeout * OZ naming convention * OZ naming convention * Delete vanilla.cairo * Delete whitelist.cairo * Delete vanilla.cairo * Delete vanilla.cairo * Delete test_words.cairo * Delete test_array2d.cairo * Delete space.cairo * Update README.md * Update README.md * removed excess imports * Delete contracts/starknet/authenticators directory * Delete contracts/starknet/interfaces directory * GA tests (#153) * Bump ethers from 5.6.7 to 5.6.8 (#147) Bumps [ethers](https://github.com/ethers-io/ethers.js/tree/HEAD/packages/ethers) from 5.6.7 to 5.6.8. - [Release notes](https://github.com/ethers-io/ethers.js/releases) - [Changelog](https://github.com/ethers-io/ethers.js/blob/master/CHANGELOG.md) - [Commits](https://github.com/ethers-io/ethers.js/commits/v5.6.8/packages/ethers) --- updated-dependencies: - dependency-name: ethers dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump typescript from 4.6.4 to 4.7.2 (#146) Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.4 to 4.7.2. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](microsoft/TypeScript@v4.6.4...v4.7.2) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add starknet auth (#138) * Update to 0.8.1 and devnet 0.2.1; Format * Add execute lib; Switch to authenticate method * Add felt_to_uint256; Add starknet_tx auth * Use felt instead of u256 * Add test for starknet tx auth * Add starknet_tx_auth and starknet_account_auth; blocked by compilation on starknet_account_auth * Remove starknet_account test; Rename starknet_account to starknet_sig * Add comment about hash * Update to 0.8.2 * Add voting_strategy_params_all to setup functions * Bump npm from 8.10.0 to 8.11.0 (#149) Bumps [npm](https://github.com/npm/cli) from 8.10.0 to 8.11.0. - [Release notes](https://github.com/npm/cli/releases) - [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md) - [Commits](npm/cli@v8.10.0...v8.11.0) --- updated-dependencies: - dependency-name: npm dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * renaming tests * renamed cairo contracts * fixed starknet tx auth test * formatting * updated starknet hardhat * fixed account import Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: pscott <30843220+pscott@users.noreply.github.com> * Update tests.yml * Delete contracts/starknet/authenticators directory * Delete starknet_sig.cairo * Delete starknet_tx.cairo * Delete eth_tx_auth.ts * Delete zodiac.ts * Delete executor_whitelist.ts * Delete starknet_tx_auth.ts * Delete vanilla_authenticator.ts * Delete test/starknet/shared directory * updated Stark Tx auth test * use lite mode for devnet * add timeout for array 2d test * increased timeouts * fixed zodiac test * fixed zodiac module test * fixed hex equivlance issue * Bump @types/node from 17.0.35 to 17.0.36 (#156) (#158) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.35 to 17.0.36. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * use general address type * updated starknet tx auth test * use felt to uint256 from cairo common * updated setup * deployment script * formatting * fixd vuln with execute import * added deployment script to package.json * updated readme * automatic formatting for deployments json * Update README.md Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: pscott <30843220+pscott@users.noreply.github.com>
- Loading branch information
1 parent
c42be8a
commit 5eccb74
Showing
29 changed files
with
472 additions
and
340 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
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
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
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 was deleted.
Oops, something went wrong.
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,4 @@ | ||
# Generalized type used to represent addresses in Snapshot X. Eg Ethereum, Starknet, etc. | ||
struct Address: | ||
member value : felt | ||
end |
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 |
---|---|---|
@@ -1,25 +1,20 @@ | ||
from starkware.cairo.common.cairo_builtins import BitwiseBuiltin | ||
from starkware.cairo.common.alloc import alloc | ||
from starkware.cairo.common.keccak import unsafe_keccak | ||
from starkware.cairo.common.uint256 import Uint256 | ||
from starknet.lib.felt_to_uint256 import felt_to_uint256 | ||
from starkware.cairo.common.math import split_felt | ||
|
||
# Returns the EVM slot key for mappings (key can be any value type) | ||
# For more information, refer to the following repo: | ||
# https://github.com/snapshot-labs/evm-slot-key-verification | ||
# UNSAFE: This is not safe to use in production code due to unsafe keccak - waiting for safe version | ||
func get_slot_key{bitwise_ptr : BitwiseBuiltin*, range_check_ptr}( | ||
slot_index : felt, mapping_key : felt | ||
) -> (slot_key : Uint256): | ||
func get_slot_key{range_check_ptr}(slot_index : felt, mapping_key : felt) -> (slot_key : Uint256): | ||
alloc_locals | ||
let (encoded_array : felt*) = alloc() | ||
let (slot_index_uint256) = felt_to_uint256(slot_index) | ||
let (mapping_key_uint256) = felt_to_uint256(mapping_key) | ||
encoded_array[0] = mapping_key_uint256.high | ||
encoded_array[1] = mapping_key_uint256.low | ||
encoded_array[2] = slot_index_uint256.high | ||
encoded_array[3] = slot_index_uint256.low | ||
let (low, high) = unsafe_keccak(encoded_array, 16 * 4) | ||
let (slot_index_high, slot_index_low) = split_felt(slot_index) | ||
let (mapping_key_high, mapping_key_low) = split_felt(mapping_key) | ||
encoded_array[0] = mapping_key_high | ||
encoded_array[1] = mapping_key_low | ||
encoded_array[2] = slot_index_high | ||
encoded_array[3] = slot_index_low | ||
let (low, high) = unsafe_keccak(encoded_array, 64) | ||
let slot_key = Uint256(low=low, high=high) | ||
return (slot_key) | ||
end |
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 was deleted.
Oops, something went wrong.
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,33 @@ | ||
{ | ||
"space": { | ||
"address": "0x56f0102b537fae4a9f94c362473d7f03025e92af246502074d9f204c027058b", | ||
"authenticators": { | ||
"StarkTx": "0x327d3a82cf938e7dcef065db5d3f4c40d2b495b27912e352817cf3da41643f9", | ||
"Vanilla": "0x28511c7039691e7298c92b753e28d79ebf8253acc0fa508bb159dd12adea0b6" | ||
}, | ||
"controller": "0x0070d911463b2cb48de8bfec826483631cdc492a6c5798917651297769fc9d68", | ||
"executionStrategies": { | ||
"Vanilla": "0x5d4a61e5ea572b1e956c19ca76678336c2e0472a7988b0b5979fa18719b5652", | ||
"zodiacRelayer": "0x5c512fbf7f4dc97bd2a68e7096968ce8ecd65d42583cbacaf3fdcc7a1800f80" | ||
}, | ||
"maxVotingDuration": "0x7d0", | ||
"minVotingDuration": "0x0", | ||
"name": "Test space", | ||
"proposalThreshold": "0x1", | ||
"quorum": "0x1", | ||
"votingStrategies": { | ||
"SingleSlotProof": { | ||
"address": "0x78f994cdf794bebd68027ef9e2ee0bf309983d87755efb4f5bded8d26980514", | ||
"parameters": [ | ||
"0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", | ||
"0x0" | ||
] | ||
}, | ||
"Vanilla": { | ||
"address": "0x61b900e2c3b8beb266e1fe9abe837a9b8276cac39509b3b25ad10a20767763a", | ||
"parameters": [ | ||
] | ||
} | ||
} | ||
} | ||
} |
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.