Go to file
DonDuala e2d34f924c
DAO Delegation Support (#1692)
Co-authored-by: Adrian Brzeziński <a.brzezinski94@gmail.com>
2023-06-28 20:35:51 +02:00
.github/workflows remove dependabot automation (#1328) 2023-01-04 22:32:09 +00:00
.husky Veto UI (#1295) 2022-12-13 17:36:19 +00:00
.vscode Fix/duplicated account keys (#1221) 2022-11-16 23:35:15 +01:00
@types [no-impact] ts-prune (re-merge) (#1623) 2023-05-15 00:08:36 +02:00
GatewayPlugin [no-impact] ts-prune (re-merge) (#1623) 2023-05-15 00:08:36 +02:00
HeliumVotePlugin refactor (away) useWalletStore and others (#1643) 2023-05-30 20:26:24 -04:00
NftVotePlugin refactor (away) useWalletStore and others (#1643) 2023-05-30 20:26:24 -04:00
Strategies refactor (away) useWalletStore and others (#1643) 2023-05-30 20:26:24 -04:00
SwitchboardVotePlugin [no-impact] ts-prune (re-merge) (#1623) 2023-05-15 00:08:36 +02:00
VoteStakeRegistry refactor token stats a small amount + bugfix (#1660) 2023-06-06 05:33:45 -04:00
actions fix proposal budget increase (#1645) 2023-05-30 20:56:07 -04:00
cli Feature/create proposal cli (#1519) 2023-04-04 18:09:14 +02:00
components DAO Delegation Support (#1692) 2023-06-28 20:35:51 +02:00
constants refactor (away) useWalletStore and others (#1643) 2023-05-30 20:26:24 -04:00
hooks DAO Delegation Support (#1692) 2023-06-28 20:35:51 +02:00
hub refactor/bugfix: new wallet form being wrong about mint supply (#1667) 2023-06-07 20:17:14 -04:00
idls add nft-voter idl 2023-04-24 17:36:13 -04:00
models refactor (away) useWalletStore and others (#1643) 2023-05-30 20:26:24 -04:00
pages DAO Delegation Support (#1692) 2023-06-28 20:35:51 +02:00
public Update VIEWSDAO (#1679) 2023-06-15 14:39:36 +01:00
scripts [no-impact] ts-prune (re-merge) (#1623) 2023-05-15 00:08:36 +02:00
stores fix devnet program loading (#1697) 2023-06-27 19:23:25 +02:00
styles markdown render fixes (#1454) 2023-03-08 19:59:54 +01:00
test Fix compile and test bugs in main (#1391) 2023-02-09 12:30:57 +00:00
tools [no-impact] ts-prune (re-merge) (#1623) 2023-05-15 00:08:36 +02:00
utils DAO Delegation Support (#1692) 2023-06-28 20:35:51 +02:00
verify-wallet dynamic footer date for /verify-wallet/components/footer.tsx (#1428) 2023-02-25 13:32:34 +00:00
.babelrc Setup jest to run API/notification tests in isolation (#146) 2021-12-23 01:58:02 +00:00
.env.sample Revert "update env to include helius rpc" 2023-04-07 14:53:12 -04:00
.eslintignore Add docs (#191) 2021-12-29 00:07:18 +00:00
.eslintrc.json remove delegates from useMembersStore (#1659) 2023-06-05 21:01:24 -04:00
.gitignore upgrade spl-gov + fix big bg img (#1290) 2022-12-12 19:25:10 +01:00
.nvmrc nvmrc gallium 2023-03-17 11:40:40 -05:00
.prettierignore enable css processing 2021-04-25 19:15:06 +03:00
.prettierrc Initial commit from Create Next App 2021-04-24 23:47:02 +03:00
.yarnrc fix lock packages (#1450) 2023-03-07 14:05:14 +01:00
.yarnrc.yml add allow-scripts: improve supply chain security (#1326) 2023-01-04 22:05:08 +00:00
0.png LavaDAO (#1577) 2023-04-25 09:44:34 +01:00
Procfile notifier for governance proposals just open for voting (#2) 2021-08-22 15:48:46 +02:00
README.md Update anchor dependency to use @coral-xyz/anchor 0.26.0. (#1380) 2023-02-07 19:29:32 +00:00
jest.config.js fix realms fetch performance (#1157) 2022-10-31 02:29:39 +01:00
netlify.toml update netlify toml to use yarn 2021-07-05 15:09:54 +02:00
next-env.d.ts add Synthetify to mainnet-beta.json (#424) 2022-03-09 16:21:31 +00:00
next.config.js verify openbook market (#1686) 2023-06-21 14:24:01 +02:00
package.json fund oracle instruction (#1672) 2023-06-11 22:45:52 +02:00
postcss.config.js enable css processing 2021-04-25 19:15:06 +03:00
sentry.client.config.js Log errors using Sentry (#655) 2022-05-05 23:44:44 +01:00
sentry.properties Log errors using Sentry (#655) 2022-05-05 23:44:44 +01:00
sentry.server.config.js Log errors using Sentry (#655) 2022-05-05 23:44:44 +01:00
tailwind.config.js Add a form to edit wallet rules (#1345) 2023-02-07 11:18:22 -05:00
tsconfig.json [config only] enable sourcemapping in production (#1666) 2023-06-06 20:35:48 -04:00
yarn.lock fund oracle instruction (#1672) 2023-06-11 22:45:52 +02:00

README.md

Switchboard Add-in Support

To set this up for development with Switchboard, the first step is to get this to work.

  • Install Anchor if you don't currently have it installed.
  • navigate to the switchboard_v2 directory within switchboard-core and run anchor test. This will build switchboardv2 and run the addin-tests.ts script, which will set up a realm, governance, queue, oracles, permissions, and proposal.
  • you will need to make sure the pubkeys of the governance program and switchboard program throughout the codebase are pointed to your local pubkeys of those programs:
  • you can determine the pubkeys of the localnet switchboardv2 and governance programs by navigating to switchboard-core/switchboard_v2/target/deploy and running solana-keygen pubkey switchboard_v2-keypair.json and solana-keygen pubkey spl_governance-keypair.json respectively
  • You'll need to set the declare_id!(...) in Switchboardv2's lib.rs to point at your localnet switchboard program's pubkey, and you'll need to set Switchboardv2's lib.rs GOVERNANCE_PID variable to the spl_governance pubkey.
  • you'll also need to ensure that sbv2.ts variable GOVERNANCE_PID points at the correct pubkey for your localnet governance program
  • when you want to run the UI, start a local validator by running solana-test-validator. This will created a directory called test-ledger in the location you run the command.
  • run the addin test suite, anchor test
  • start the governance-ui by running yarn dev

Working on governance-ui

  • most of the work is in hooks/useRealm.ts and hooks/useVotingPlugins.ts in the governance-ui. The UI work is in components/TokenBalance

Changing dependencies

Whenever you change dependencies (adding, removing, or updating, either in package.json or yarn.lock), there are various files that must be kept up-to-date.

yarn.lock:

  • Run yarn again after your changes to ensure yarn.lock has been properly updated.
  • Run yarn deduplicate to remove duplicate dependencies from the lockfile.

The allow-scripts configuration in package.json:

  • Run yarn allow-scripts auto to update the allow-scripts configuration automatically. This config determines whether the package's install/postinstall scripts are allowed to run.
  • Alternatively update the allow-scripts section manually.
  • Review each new package to determine whether the install script needs to run or not, testing if necessary.
  • Use npx can-i-ignore-scripts to help assessing whether scripts are needed

NextJS Typescript Boilerplate

Bootstrap a developer-friendly NextJS app configured with:

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Execute create-next-app with npm or Yarn to bootstrap the example:

npx create-next-app --example with-typescript-eslint-jest with-typescript-eslint-jest-app
# or
yarn create next-app --example with-typescript-eslint-jest with-typescript-eslint-jest-app

Deploy it to the cloud with Vercel (Documentation).