-
Notifications
You must be signed in to change notification settings - Fork 136
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 #970 from o1-labs/fix/next-project
Fix for tutorial #4 (project files).
- Loading branch information
Showing
21 changed files
with
1,862 additions
and
2,128 deletions.
There are no files selected for viewing
26 changes: 14 additions & 12 deletions
26
examples/zkapps/04-zkapp-browser-ui/contracts/.github/workflows/ci.yml
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,13 +1,4 @@ | ||
{ | ||
"version": 1, | ||
"deployAliases": { | ||
"devnet": { | ||
"url": "https://api.minascan.io/node/devnet/v1/graphql", | ||
"keyPath": "keys/devnet.json", | ||
"feepayerKeyPath": "This is specific to each developer and can be generated with the zkApp CLI. Update with your feepayer keypath to run this tutorial example", | ||
"feepayerAlias": "dev", | ||
"fee": ".1", | ||
"smartContract": "Add" | ||
} | ||
} | ||
"deployAliases": {} | ||
} |
3,360 changes: 1,558 additions & 1,802 deletions
3,360
examples/zkapps/04-zkapp-browser-ui/contracts/package-lock.json
Large diffs are not rendered by default.
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
4 changes: 2 additions & 2 deletions
4
examples/zkapps/04-zkapp-browser-ui/contracts/src/Add.test.ts
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
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,25 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
import { readdirSync, readFileSync, writeFileSync } from 'fs'; | ||
import { dirname, extname, join } from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
|
||
// This script modifies the built CSS files and prepends the repo-name to the asset URLs | ||
// to be compatible with the GitHub pages deployments. | ||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = dirname(__filename); | ||
const cssDir = join(__dirname, '/out/_next/static/css'); | ||
|
||
// This script modifies the built CSS files and prepends the repo-name to the asset URLs. | ||
// to be compatible with GitHub Pages deployment. | ||
const cssDir = path.join(__dirname, '/out/_next/static/css'); | ||
// Update your repository name here if it is different from the project name. | ||
let repoURL = '04-zkapp-browser-ui'; | ||
const files = fs.readdirSync(cssDir); | ||
const files = readdirSync(cssDir); | ||
|
||
files.forEach((file) => { | ||
if (path.extname(file) === '.css') { | ||
const filePath = path.join(cssDir, file); | ||
|
||
const data = fs.readFileSync(filePath, 'utf8'); | ||
|
||
if (extname(file) === '.css') { | ||
const filePath = join(cssDir, file); | ||
const data = readFileSync(filePath, 'utf8'); | ||
const singleQuoteRegex = new RegExp(`url\\(\\s*'\\/(?!${repoURL})`, 'g'); | ||
const doubleQuoteRegex = new RegExp(`url\\(\\s*"\\/(?!${repoURL})`, 'g'); | ||
|
||
let result = data.replace(singleQuoteRegex, `url('/${repoURL}/`); | ||
result = result.replace(doubleQuoteRegex, `url("/${repoURL}/`); | ||
|
||
fs.writeFileSync(filePath, result, 'utf8'); | ||
writeFileSync(filePath, result, 'utf8'); | ||
} | ||
}); | ||
}); |
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.