-
Notifications
You must be signed in to change notification settings - Fork 72
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
few updates #159
Merged
Merged
few updates #159
Changes from all commits
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
73fce2f
merged files
Orland0x 487d963
merged space from develop
Orland0x 1e826de
updated tests
Orland0x ccc1515
single slot test with slot key verif
Orland0x dcd9914
formatting
Orland0x 0170b1e
fixed more tests
Orland0x 7441f0f
fixed more tests
Orland0x 59d2ca0
single slot strategy added
Orland0x cc91a0d
merged quorum stuff
Orland0x 51784ac
merged quorum stuff
Orland0x 94d8501
revamped create proposal
Orland0x dd68dfb
fixed create vote
Orland0x 7f02c23
updated eth tx auth
Orland0x d4400dc
zodiac test fixes
Orland0x 63fb02b
zodiac test revamp
Orland0x 1106d7d
updates
Orland0x 37301d8
zodiac updates
Orland0x eaa6cde
fixed single slot proof strat test
Orland0x 3443d3c
Update README.md
Orland0x 300ed55
Update README.md
Orland0x 27d9beb
fixed controller test
Orland0x a8760d1
fixed executor whitelist test
Orland0x af5c532
fixed whitelist voting strategytest
Orland0x 8b02961
fixed merge conflicts
Orland0x b45a11b
more merge fixes
Orland0x 6400a1b
fix l1 tests
Orland0x 23f4108
Delete vanilla_space.ts
Orland0x a02c3bd
Delete vanilla_authenticator.ts
Orland0x d9b8619
replaced hardcoded vals with random ones in tests
Orland0x ed6f8a5
Merge branch 'revamp_tests' of https://github.com/snapshot-labs/sx-co…
Orland0x 7421f19
increased timeout
Orland0x 8d5fb73
OZ naming convention
Orland0x 1352c11
OZ naming convention
Orland0x 7c77e22
Delete vanilla.cairo
Orland0x e792671
Delete whitelist.cairo
Orland0x 21a6098
Delete vanilla.cairo
Orland0x ad38925
Delete vanilla.cairo
Orland0x 4b05e99
Delete test_words.cairo
Orland0x 02bc63d
Delete test_array2d.cairo
Orland0x e5c2b97
Delete space.cairo
Orland0x 5fa8803
Update README.md
Orland0x 488a863
Update README.md
Orland0x 3f9635e
removed excess imports
Orland0x e524317
Delete contracts/starknet/authenticators directory
Orland0x 06de52c
Delete contracts/starknet/interfaces directory
Orland0x d856f47
GA tests (#153)
Orland0x 9dac04b
merge
Orland0x a408138
Update tests.yml
Orland0x ab4e117
Delete contracts/starknet/authenticators directory
Orland0x a105e5e
Delete starknet_sig.cairo
Orland0x 37d5f3a
Delete starknet_tx.cairo
Orland0x 3998273
Delete eth_tx_auth.ts
Orland0x e52e9e0
Delete zodiac.ts
Orland0x d6c8d30
Delete executor_whitelist.ts
Orland0x 6ce9682
Delete starknet_tx_auth.ts
Orland0x 89e16b8
Delete vanilla_authenticator.ts
Orland0x 7df1c96
Delete test/starknet/shared directory
Orland0x 8a98927
updated Stark Tx auth test
Orland0x 6dfa4a3
use lite mode for devnet
Orland0x ad682bb
add timeout for array 2d test
Orland0x f131271
increased timeouts
Orland0x 952f349
fixed zodiac test
Orland0x d71c8c7
fixed zodiac module test
Orland0x f55d724
fixed hex equivlance issue
Orland0x ba863a0
Bump @types/node from 17.0.35 to 17.0.36 (#156) (#158)
Orland0x 99637d0
use general address type
Orland0x d1332a4
Merge branch 'generalize_addresses' of https://github.com/snapshot-la…
Orland0x f9a3617
updated starknet tx auth test
Orland0x 7bfc12c
use felt to uint256 from cairo common
Orland0x cfad2a3
updated setup
Orland0x c33da68
deployment script
Orland0x a70396b
fixed merge conflicts
Orland0x efd1010
formatting
Orland0x 70a1836
fixd vuln with execute import
Orland0x fff98d7
added deployment script to package.json
Orland0x 21227d2
updated readme
Orland0x 468f9ef
automatic formatting for deployments json
Orland0x 5aa0281
Merge branch 'develop' into generalize_addresses
Orland0x 79bada3
Update README.md
Orland0x File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should this be called
lib/address
? I find it odd to have a filename begeneral_address
and the actual object beAddress
?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.
hmm yeah its not ideal, just thought that people would assume its a Starknet address if its called
address.cairo