Go to file
riordanp 757a3ee0cc
Use ghcr.io container registry (#549)
* Use ghcr.io container registry

* Update base image urls
2023-04-17 16:57:51 +01:00
.github Use ghcr.io container registry (#549) 2023-04-17 16:57:51 +01:00
3rdparty Downgrade the `fixed` crate to v1.11.0 (#500) 2023-03-12 08:50:42 +01:00
anchor-tests Update package.json build steps and move js scripts out of src folder (#470) 2023-02-22 08:36:59 +01:00
bin Use ghcr.io container registry (#549) 2023-04-17 16:57:51 +01:00
cd Add prometheus metrics to crank (#517) 2023-03-29 15:51:32 +01:00
docs Add doc generation job (#450) 2023-02-13 08:29:50 +01:00
lib Fix bug where if no insurance fund position was present, ix would err… (#522) 2023-04-17 11:30:27 +02:00
migrations Update package.json build steps and move js scripts out of src folder (#470) 2023-02-22 08:36:59 +01:00
programs bump version for next release 2023-04-14 16:59:02 +02:00
py rename 2022-03-01 20:55:10 +01:00
ts/client Fix bug where if no insurance fund position was present, ix would err… (#522) 2023-04-17 11:30:27 +02:00
.dockerignore Add fly deploy scripts (#490) 2023-03-20 14:59:43 +01:00
.env.sample add dotenv for client config vars 2022-12-05 14:48:06 -05:00
.eslintignore add eslint config and fix errors 2022-08-04 13:42:41 -04:00
.eslintrc.json ts client improvement (#254) 2022-09-29 15:51:09 +02:00
.gitignore update 2023-03-31 12:37:16 +02:00
.gitmodules Use the overflow-checks=true equivalent with the fixed crate (#476) 2023-02-24 11:56:33 +01:00
.mocharc.json Fix mocha runner 2023-02-22 11:19:03 +01:00
.prettierignore run prettier and add prettierignore 2022-08-04 14:13:46 -04:00
Anchor.toml Don't compile the margin-trade fixture all the time 2022-12-08 20:48:44 +01:00
CHANGELOG.md Changelog for program v0.13.0 (#543) 2023-04-14 16:20:26 +02:00
Cargo.lock Bump program version to v0.13.0 and update idl 2023-04-13 09:53:15 +02:00
Cargo.toml Organize paths, rename crates (#466) 2023-02-20 14:08:38 +01:00
DEVELOPING.md Update DEVELOPING.md 2023-02-17 09:48:28 +01:00
Dockerfile Use ghcr.io container registry (#549) 2023-04-17 16:57:51 +01:00
HOW-TO-RELEASE.md update 2022-07-14 10:14:23 +02:00
LICENSE License: Mark instructions GPLv3 and everything else MIT (#454) 2023-02-15 08:42:07 +01:00
Procfile Fix extraction of amount for token account and mm Procfile 2023-02-22 15:08:13 +01:00
Program ts: Additional serum3 support (#196) 2022-08-31 11:36:44 +02:00
README.md Readme: Try to add a licensing summary. (#456) 2023-02-15 19:03:29 +09:00
RELEASING.md Add notes on how to release (#537) 2023-04-13 12:57:58 +02:00
SECURITY.md add security policy and on-chain metadata (#361) 2023-01-04 18:13:29 +00:00
fix-npm-tag.sh add script to rename tag added by npm 2023-02-01 13:49:31 +01:00
fly.toml quote less 2023-03-20 19:23:47 +01:00
idl-fixup.sh idl deploy workaround, reduce size by cutting largest fields i.e. docs (#334) 2022-12-14 09:55:25 +01:00
mango_v4.json FlashLoan: Don't deduce vault_len, add more checks (#542) 2023-04-14 15:18:02 +02:00
package.json merge ts-client to dev (#538) 2023-04-17 11:19:47 +02:00
release-to-devnet.sh License: Mark instructions GPLv3 and everything else MIT (#454) 2023-02-15 08:42:07 +01:00
run-anchor-tests.sh License: Mark instructions GPLv3 and everything else MIT (#454) 2023-02-15 08:42:07 +01:00
tsconfig.cjs.json make consistent 2023-03-14 13:14:45 +01:00
tsconfig.esm.json make consistent 2023-03-14 13:14:45 +01:00
tsconfig.json make consistent 2023-03-14 13:14:45 +01:00
tsconfig.types.json v0.9.1 2023-03-13 14:29:47 -04:00
update-local-idl.sh add idl to repo (#494) 2023-03-07 09:18:19 +01:00
yarn.lock v0.9.1 2023-03-13 14:29:47 -04:00

README.md

work in progress

License

See the LICENSE file.

The majority of this repo is MIT licensed, but some parts needed for compiling the solana program are under GPL.

All GPL code is gated behind the enable-gpl feature. If you use the mango-v4 crate as a dependency with the client or cpi features, you use only MIT parts of it.

The intention is for you to be able to depend on the mango-v4 crate for building closed-source tools and integrations, including other solana programs that call into the mango program.

But deriving a solana program with similar functionality to the mango program from this codebase would require the changes and improvements to stay publicly available under GPL.

Development

See DEVELOPING.md

Dependencies

  • rust version 1.65.0
  • solana-cli 1.14.9
  • npm 8.1.2
  • node v16.13.1

Submodules

After cloning this repo you'll need to init and update its git submodules. Consider setting the git option submodule.recurse=true.

Deployments

  • devnet: 4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg
  • mainnet-beta: 4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg
  • primary mango group on mainnet-beta: 78b8f4cGCwmZ9ysPFMWLaLTkkaYnUjwMJYStWe5RTSSX

Release

Here are steps followed while performing a program deployment to mainnet-beta

  • review diff of last deployed tag to mainnet-beta, e.g. https://github.com/blockworks-foundation/mango-v4/compare/program-v0.4.0..dev, pay special attention to account layout changes, backward compatibility of newly introduced account fields, etc.
  • deploy to mainnet-beta
  • update changelog with deploy timestamp and tx
  • add a git tag e.g. program-v0.0.1, should match the version the program has
  • reset main to currently deployed tag
  • notify other contributors for bringing in changes from new release by merging main into their branch, e.g. ts-client and deploy-mm
  • notify other contributors for appropriately handling offchain services e.g. scrapers, market makers, etc.
  • bump program version in Cargo.toml on dev branch for next release

Here are steps followed while performing a npm package release note: the UI currently uses code directly from github, pointing to the ts-client branch

  • use yarn publish to release a new package, ensure compatibility with program release to mainnet-beta
  • fix the tag auto added by yarn to match our internal convention, see script fix-npm-tag.sh, tags should look like this e.g.npm-v0.0.1, note: the npm package version/tag should not necessarily match the latest program deployment