From cff7296fd4fb90ee7111215a4ae0f645880bc376 Mon Sep 17 00:00:00 2001 From: Luiz Date: Mon, 19 Aug 2024 15:27:17 -0300 Subject: [PATCH 1/9] adding yarn.lock to .gitignore --- client/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/client/.gitignore b/client/.gitignore index e3fbd98..0e19549 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -1,2 +1,3 @@ build node_modules +yarn.lock From d08b88ef91637988b364b57696acc9f63ee8c199 Mon Sep 17 00:00:00 2001 From: Luiz Date: Mon, 19 Aug 2024 15:28:50 -0300 Subject: [PATCH 2/9] remove yarn.lock from .gitignore --- client/.gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/.gitignore b/client/.gitignore index 0e19549..48912d2 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -1,3 +1,2 @@ build -node_modules -yarn.lock +node_modules \ No newline at end of file From 986d42106f92acfe8f110bb6055e1e3e0f100023 Mon Sep 17 00:00:00 2001 From: Luiz Date: Mon, 19 Aug 2024 17:08:38 -0300 Subject: [PATCH 3/9] setting up CI --- .github/workflows/client.yml | 29 ++++++++++++++++++++++++++ .github/workflows/contracts.yml | 36 +++++++++++++++++++++++++++++++++ .github/workflows/extension.yml | 29 ++++++++++++++++++++++++++ .github/workflows/website.yml | 29 ++++++++++++++++++++++++++ 4 files changed, 123 insertions(+) create mode 100644 .github/workflows/client.yml create mode 100644 .github/workflows/contracts.yml create mode 100644 .github/workflows/extension.yml create mode 100644 .github/workflows/website.yml diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml new file mode 100644 index 0000000..76b0938 --- /dev/null +++ b/.github/workflows/client.yml @@ -0,0 +1,29 @@ +name: Client + +on: [push, pull_request] + +permissions: read-all + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '18' + + - name: Install dependencies + run: npm install + working-directory: client + + - name: Build the project + run: npm run build + working-directory: client + + - name: Run linting + run: npm run lint + working-directory: client \ No newline at end of file diff --git a/.github/workflows/contracts.yml b/.github/workflows/contracts.yml new file mode 100644 index 0000000..9b572d0 --- /dev/null +++ b/.github/workflows/contracts.yml @@ -0,0 +1,36 @@ +name: Cairo Contracts + +on: [push, pull_request] + +permissions: read-all + +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Scarb + uses: software-mansion/setup-scarb@v1 + + - name: Check cairo format + run: scarb fmt --check + working-directory: contracts + + - name: Build cairo contracts + run: scarb build + working-directory: contracts + + tests: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Scarb + uses: software-mansion/setup-scarb@v1 + + - name: Run cairo tests + run: scarb test + working-directory: contracts \ No newline at end of file diff --git a/.github/workflows/extension.yml b/.github/workflows/extension.yml new file mode 100644 index 0000000..7290882 --- /dev/null +++ b/.github/workflows/extension.yml @@ -0,0 +1,29 @@ +name: extension + +on: [push, pull_request] + +permissions: read-all + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '18' + + - name: Install dependencies + run: npm install + working-directory: extension + + - name: Build the project + run: npm run build + working-directory: extension + + - name: Run linting + run: npm run lint + working-directory: extension \ No newline at end of file diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml new file mode 100644 index 0000000..037f2b7 --- /dev/null +++ b/.github/workflows/website.yml @@ -0,0 +1,29 @@ +name: Website + +on: [push, pull_request] + +permissions: read-all + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '18' + + - name: Install dependencies + run: npm install + working-directory: website + + - name: Build the project + run: npm run build + working-directory: website + + - name: Run linting + run: npm run lint + working-directory: website \ No newline at end of file From a3bab5f5dc169443cdbe32ee2a3f3a968af6b539 Mon Sep 17 00:00:00 2001 From: Luiz Date: Mon, 19 Aug 2024 17:12:17 -0300 Subject: [PATCH 4/9] changing npm to yarn --- .github/workflows/client.yml | 6 +++--- .github/workflows/extension.yml | 6 +++--- .github/workflows/website.yml | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml index 76b0938..6a67766 100644 --- a/.github/workflows/client.yml +++ b/.github/workflows/client.yml @@ -17,13 +17,13 @@ jobs: node-version: '18' - name: Install dependencies - run: npm install + run: yarn install working-directory: client - name: Build the project - run: npm run build + run: yarn build working-directory: client - name: Run linting - run: npm run lint + run: yarn lint working-directory: client \ No newline at end of file diff --git a/.github/workflows/extension.yml b/.github/workflows/extension.yml index 7290882..406392a 100644 --- a/.github/workflows/extension.yml +++ b/.github/workflows/extension.yml @@ -17,13 +17,13 @@ jobs: node-version: '18' - name: Install dependencies - run: npm install + run: yarn install working-directory: extension - name: Build the project - run: npm run build + run: yarn build working-directory: extension - name: Run linting - run: npm run lint + run: yarn lint working-directory: extension \ No newline at end of file diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 037f2b7..94ed8eb 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -17,13 +17,13 @@ jobs: node-version: '18' - name: Install dependencies - run: npm install + run: yarn install working-directory: website - name: Build the project - run: npm run build + run: yarn build working-directory: website - name: Run linting - run: npm run lint + run: yarn lint working-directory: website \ No newline at end of file From 12a6489777ab521ed2795e2e774b5329ef962f27 Mon Sep 17 00:00:00 2001 From: Luiz Date: Mon, 19 Aug 2024 17:23:12 -0300 Subject: [PATCH 5/9] adding build folder to .eslintignore --- client/.eslintignore | 1 + website/.eslintignore | 1 + 2 files changed, 2 insertions(+) diff --git a/client/.eslintignore b/client/.eslintignore index 0833411..ef08aab 100644 --- a/client/.eslintignore +++ b/client/.eslintignore @@ -1,2 +1,3 @@ .eslintrc.js node_modules +build diff --git a/website/.eslintignore b/website/.eslintignore index 0833411..ef08aab 100644 --- a/website/.eslintignore +++ b/website/.eslintignore @@ -1,2 +1,3 @@ .eslintrc.js node_modules +build From b1c90faec03513e8e23c997e14d7ffe6e5bdfc06 Mon Sep 17 00:00:00 2001 From: Luiz Date: Mon, 19 Aug 2024 18:00:09 -0300 Subject: [PATCH 6/9] adding build do eslintignore --- extension/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/extension/.eslintignore b/extension/.eslintignore index 0833411..c22e9f2 100644 --- a/extension/.eslintignore +++ b/extension/.eslintignore @@ -1,2 +1,3 @@ .eslintrc.js node_modules +build \ No newline at end of file From 89a595473e9c165bb51fae44739e588ea732618f Mon Sep 17 00:00:00 2001 From: Lana Ivina Date: Wed, 21 Aug 2024 13:31:48 +0200 Subject: [PATCH 7/9] minor fix for scarb format --- contracts/src/components/registry/registry.cairo | 2 +- contracts/src/components/registry/registry_mock.cairo | 3 +-- contracts/src/components/registry/registry_test.cairo | 6 ++++-- contracts/src/lib.cairo | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/contracts/src/components/registry/registry.cairo b/contracts/src/components/registry/registry.cairo index d3b301e..760acd2 100644 --- a/contracts/src/components/registry/registry.cairo +++ b/contracts/src/components/registry/registry.cairo @@ -68,7 +68,7 @@ pub mod RegistryComponent { self.Registry_registrations.write((caller, offchain_id.clone()), true); // emit registration event - self.emit(RegistrationEvent { caller : caller, offchain_id : offchain_id }); + self.emit(RegistrationEvent { caller: caller, offchain_id: offchain_id }); } } } diff --git a/contracts/src/components/registry/registry_mock.cairo b/contracts/src/components/registry/registry_mock.cairo index b5beece..cf8d231 100644 --- a/contracts/src/components/registry/registry_mock.cairo +++ b/contracts/src/components/registry/registry_mock.cairo @@ -39,8 +39,7 @@ pub mod RegistryMock { // #[constructor] - fn constructor(ref self: ContractState) { - // Nothing to be done + fn constructor(ref self: ContractState) {// Nothing to be done } } diff --git a/contracts/src/components/registry/registry_test.cairo b/contracts/src/components/registry/registry_test.cairo index adfda4d..f241cd5 100644 --- a/contracts/src/components/registry/registry_test.cairo +++ b/contracts/src/components/registry/registry_test.cairo @@ -1,12 +1,14 @@ use zkramp::components::registry::interface::{IRegistryDispatcher, IRegistryDispatcherTrait}; use zkramp::components::registry::registry_mock::RegistryMock; -use zkramp::tests::utils; use zkramp::tests::constants; +use zkramp::tests::utils; /// Deploys the registry mock contract. fn setup_contracts() -> IRegistryDispatcher { // deploy registry - let registry_contract_address = utils::deploy(RegistryMock::TEST_CLASS_HASH, calldata: array![]); + let registry_contract_address = utils::deploy( + RegistryMock::TEST_CLASS_HASH, calldata: array![] + ); IRegistryDispatcher { contract_address: registry_contract_address } } diff --git a/contracts/src/lib.cairo b/contracts/src/lib.cairo index c89034e..386364e 100644 --- a/contracts/src/lib.cairo +++ b/contracts/src/lib.cairo @@ -1,6 +1,6 @@ pub mod components; pub mod contracts; -pub mod utils; #[cfg(test)] pub mod tests; +pub mod utils; From fa03d988c23e338c9377b8e83f19f064cea5e252 Mon Sep 17 00:00:00 2001 From: Lana Ivina Date: Wed, 21 Aug 2024 13:40:21 +0200 Subject: [PATCH 8/9] minor fix --- contracts/src/components/registry/registry_mock.cairo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/src/components/registry/registry_mock.cairo b/contracts/src/components/registry/registry_mock.cairo index cf8d231..bda9897 100644 --- a/contracts/src/components/registry/registry_mock.cairo +++ b/contracts/src/components/registry/registry_mock.cairo @@ -39,7 +39,7 @@ pub mod RegistryMock { // #[constructor] - fn constructor(ref self: ContractState) {// Nothing to be done + fn constructor(ref self: ContractState) { // Nothing to be done } } From 953bbd588300c5ed58eeff0785e066029ca0cbdf Mon Sep 17 00:00:00 2001 From: Lana Ivina Date: Wed, 21 Aug 2024 13:49:13 +0200 Subject: [PATCH 9/9] minor fix for extension lint --- extension/src/components/Flex/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/extension/src/components/Flex/index.tsx b/extension/src/components/Flex/index.tsx index 1cdc963..3b068c3 100644 --- a/extension/src/components/Flex/index.tsx +++ b/extension/src/components/Flex/index.tsx @@ -13,6 +13,7 @@ export const Row = styled.div<{ align-items: ${({ alignItems = 'center' }) => alignItems}; ` +// eslint-disable-next-line import/no-unused-modules export const Column = styled.div<{ gap?: number justify?: 'stretch' | 'center' | 'start' | 'end' | 'flex-start' | 'flex-end' | 'space-between' | 'space-around'