You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Britt Cyr 7803f1dc9d Fix warning when running tests 1 week ago
.github CI: Fix verifiable build workflow 4 weeks ago
3rdparty Update anchor to v0.27.0, stop using submodule (#582) 4 weeks ago
anchor-tests Update package.json build steps and move js scripts out of src folder (#470) 4 months ago
bin manage dependencies in workspace (#588) 3 weeks ago
cd Add prometheus metrics to crank (#517) 2 months ago
docs Add doc generation job (#450) 4 months ago
lib manage dependencies in workspace (#588) 3 weeks ago
migrations Update package.json build steps and move js scripts out of src folder (#470) 4 months ago
programs Fix warning when running tests 1 week ago
py rename 1 year ago
ts/client Bump version to 0.17.0, changelog updates, idl update 2 weeks ago
.dockerignore Add fly deploy scripts (#490) 3 months ago
.env.sample add dotenv for client config vars 6 months ago
.eslintignore add eslint config and fix errors 10 months ago
.eslintrc.json ts client improvement (#254) 8 months ago
.gitignore update 2 months ago
.gitmodules Update anchor to v0.27.0, stop using submodule (#582) 4 weeks ago
.mocharc.json Fix mocha runner 4 months ago
.prettierignore run prettier and add prettierignore 10 months ago
Anchor.toml Don't compile the margin-trade fixture all the time 6 months ago
Audit_OtterSec_Mango_v0.7.0.pdf Add OtterSec audit document (#560) 2 months ago
CHANGELOG.md Bump version to 0.17.0, changelog updates, idl update 2 weeks ago
Cargo.lock Bump version to 0.17.0, changelog updates, idl update 2 weeks ago
Cargo.toml manage dependencies in workspace (#588) 3 weeks ago
DEVELOPING.md Enable self-trading protection (#533) 4 weeks ago
Dockerfile Use ghcr.io container registry (#549) 2 months ago
HOW-TO-RELEASE.md update 11 months ago
LICENSE License: Mark instructions GPLv3 and everything else MIT (#454) 4 months ago
Procfile Spot based token rebalancer (#541) 2 months ago
Program ts: Additional serum3 support (#196) 9 months ago
README.md Update anchor to v0.27.0, stop using submodule (#582) 4 weeks ago
RELEASING.md Update anchor to v0.27.0, stop using submodule (#582) 4 weeks ago
SECURITY.md add security policy and on-chain metadata (#361) 5 months ago
fix-npm-tag.sh add script to rename tag added by npm 4 months ago
fly.toml quote less 3 months ago
idl-fixup.sh idl deploy workaround, reduce size by cutting largest fields i.e. docs (#334) 6 months ago
mango_v4.json Bump version to 0.17.0, changelog updates, idl update 2 weeks ago
package.json merge deploy changes to dev (#586) 4 weeks ago
release-to-devnet.sh Update anchor to v0.27.0, stop using submodule (#582) 4 weeks ago
run-anchor-tests.sh Update anchor to v0.27.0, stop using submodule (#582) 4 weeks ago
rust-toolchain.toml Make clippy happy (#580) 1 month ago
tsconfig.cjs.json Ts keeper (backup for rust keeper) (#546) 2 months ago
tsconfig.esm.json make consistent 3 months ago
tsconfig.json make consistent 3 months ago
tsconfig.types.json v0.9.1 3 months ago
update-local-idl.sh Update anchor to v0.27.0, stop using submodule (#582) 4 weeks ago
yarn.lock Risk notification bot (#565) 4 weeks ago

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
  • anchor-cli 0.27.0
  • 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

For program deployment, see RELEASING.md.

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