Skip to content
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

Add starknet auth #138

Merged
merged 10 commits into from
May 26, 2022
Merged

Add starknet auth #138

merged 10 commits into from
May 26, 2022

Conversation

pscott
Copy link
Contributor

@pscott pscott commented May 19, 2022

WIP

@pscott pscott mentioned this pull request May 19, 2022
2 tasks
@pscott
Copy link
Contributor Author

pscott commented May 23, 2022

Will be kind of blocked by OpenZeppelin/cairo-contracts#328 :(

(it's not a hard block, we can get away by passing the selector and not using the interface :))

@bonustrack
Copy link
Member

Did we considered to not use any authenticator for StarkNet tx? And use space contract directly, since we don't really need to authenticate anything with a StarkNet tx

@pscott
Copy link
Contributor Author

pscott commented May 23, 2022

Did we considered to not use any authenticator for StarkNet tx? And use space contract directly, since we don't really need to authenticate anything with a StarkNet tx

We still to verify that the caller is the same as proposer_address / voter_address, so we indeed need to go through an authenticator I believe :(

@pscott pscott marked this pull request as ready for review May 25, 2022 09:15
@pscott pscott mentioned this pull request May 25, 2022
5 tasks
@Orland0x Orland0x merged commit 418445a into develop May 26, 2022
Orland0x added a commit that referenced this pull request May 27, 2022
* 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>
Orland0x added a commit that referenced this pull request May 31, 2022
* 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

* couple of fixes

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: pscott <30843220+pscott@users.noreply.github.com>
Orland0x added a commit that referenced this pull request Jun 14, 2022
* 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>
@Orland0x Orland0x deleted the add_starknet_auth_2 branch September 12, 2022 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants