在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:wighawag/jolly-roger开源软件地址:https://github.com/wighawag/jolly-roger开源编程语言:TypeScript 40.9%开源软件介绍:Jolly RogerThis is a template to build a decentralised applicaiton using ethereum, hardhat, svelte and thegraph to make an app out of it, execute the following
There also more templates available in branches: App Setuprequirements :This app requires node.js (tested on v12+) pnpmThis repo use npx pnpm add -g pnpm
docker and docker-compose
If you prefer (or do not have access to docker/docker-compose) you can run them independently. intall dependencies :pnpm boot This will set the app name (and change the files to reflect that) and then call You can also manually set the name yourself : pnpm set-name [<new name>] && pnpm install DevelopmentThe following command will start everything up. pnpm start This will run each processes in their own terminal window/tab. Note that you might need configuration based on your system. On linux it uses On windows it use If you need some other terminal to execute the separate processes, you can configure it in This command will bring 5 shells up
Once docker-compose is running, you can stop the other shells and restart them if needed via pnpm dev Alternatively you can call the following first : this will setup the external services only (ipfs, ethereum and graph nodes) pnpm externals and then run You can also always run them individually full list of commandsHere is the list of npm scripts you can execute: Some of them relies on ./_scripts.js to allow parameterizing it via command line argument (have a look inside if you need modifications)
As a standard lifecycle npm script, it is executed automatically upon install. It generate various config file for you, including vscode files.
this will update name of the project (by default "jolly-roger") to be the name of the folder (See
This will replace every instance of
This will compile the common-library and watch for changes.
This will compile the common library and terminate
This will deploy the contract on localhost and watch for changes and recompile/redeploy when so.
This will deploy the contract on the network specified. If network is a live network, a mnemonic and url will be required. the following env need to be set:
This will execute the contracts/scripts/seed.ts on the network specified
This will setup and deploy the subgraph on localhost and watch for changes.
This will deploy subgraph on the network specified. If network is a live network, the following env beed to be set:
This will spawn a vite dev server for the webapp, connected to the specified network
This will build a static version of the web app for the specified network. If no network are specified it will fetch from the env variable
This will serve the static file as if on an ipfs gateway.
this both build and serve the web app.
This build and deploy the web app on ipfs for the network specified. You ll need the following env variables setup :
This will deploy all (contracts, subgraph and web app). See below for more details. If no network are specified it will fetch from the env variable
This will deploy all (contracts, subgraph) except web app. See below for more details. If no network are specified it will fetch from the env variable
This stop the docker services running
env variables required for full deploymentYou need to gather the following environment variables :
Note that pinata is currently the default ipfs provider setup but ipfs-deploy, the tool used to deploy to ipfs support other providers, see : https://github.com/ipfs-shipyard/ipfs-deploy For production and staging, you would need to set MENMONIC too in the respective You can remove the env if you want to use the same as the one in You'll also need to update the following for staging and production :
you then need to ensure you have a subgraph already created on thegraph.com with that name: https://thegraph.com/explorer/dashboard Furthermore, you need to ensure the values in web/application.json are to your liking. Similar for the the web/public/preview.png image that is used for open graph metadata. The application.json is also where you setup the ens name if any. fleek github integrationFor The only thing needed is setting up the environment variables. You can either set them in fleek dashboard or set them in Note though that no environment variables might be needed, if you branch name is equal to the expected network name and you have got VITE_THE_GRAPH_HTTP set in the Here are the env variable and their default:
other git integrationsVercal can be easily setup like fleek above. THe only thing needed currently is to set the following install command:
And like fleek you ll need to setup |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论