Comments (12)
Itβs probable that the value of anchor integrations could be unlocked by a simple cpi library that simplifies interacting with mango similar to how serum is integrated
from mango-v3.
I agree scrolling across all these lines is a bit cumbersome. At this point I just have to use ctrl f for everything. But one advantage of current setup is simplicity and logic. Every instruction has an equivalent function in processor.rs. A refactor that would continue to be simple and logical would be nice if you can think of one.
Do you know all the drawbacks of going to Anchor? It would be useful to even just see the difference in execution speed
Tests were started by another dev who didn't see it all the way through. I think we ultimately moved on to testing in devnet because it takes just as much time and seems more realistic. If you could clean up the tests we could start using it again. By clean up I mean removing unnecessary files and making sure all instructions are hit and it's relatively fast to run the tests.
from mango-v3.
Something I just came across was that some function signatures involving AccountInfo
(like pub fn init_vals(..., open_orders_ais: &[AccountInfo; MAX_PAIRS])
in HealthCache
) make mango logic unnecessarily hard to reuse externally.
The reason is that AccountInfos contain mut references and can sometimes be impossible to create without extra copies. Refactoring to parse these accounts outside and then only feeding in the results would simplify that a lot. I'll probably do that directly since it makes my current project easier.
from mango-v3.
@ckamm Interesting point. I believe it's the way it is right now because a lot of those AccountInfo objects are actually of the zero key. The new way of passing these in is to use Option<&OpenOrders> or a Vec of the same. But older code required users to just pass in all the open orders accounts in a big array and leave zero key for the ones not in margin basket. Just something to keep in mind when refactoring.
from mango-v3.
todo: cleanup branches which have been abandoned, not-relevant anymore
from mango-v3.
todo: some of the instructions dont have a corresponding helper instruction, useful for programs composing on top of mango, double check, and add missing ones
from mango-v3.
todo: something like anchor debug would be nice while developing tests, so that we dont have to manually print all the keys
from mango-v3.
ckamm: another thing for a cleanup/refactoring: passing these as arguments is error prone. It'd be nice if ChangeSpotMarketParams was a struct that could just be passed onwards to the executor function
from mango-v3.
dark green highlights are instructions which dont have a correponding test atm
from mango-v3.
whatever we do should take into account timeline for next protocol re-write, could be potential waste of effort
from mango-v3.
the problem with using one of the accounts not from parameters but from import confuses api users, unless one enables full debug logging its hard to know that the token program also has to be sent as a account info while cpi'ing
from mango-v3.
nice sdk like https://github.com/zetamarkets/fuze or spl-token sdk
from mango-v3.
Related Issues (16)
- add asset is missing something
- Add ChangeSpotMarket Instruction
- script, document, and setup a proper devnet setup
- v3.3.5 is missing a release (only has a tag)
- MangoGroup should say writeable in docs not read
- Invalid Price Cache HOT 9
- Unable to close accounts owned by a PDA HOT 2
- place_spot_order2 settles funds
- add_asset is wrong
- Add stop loss to spot trade HOT 1
- should we replace serum with openbook now? HOT 1
- token holder compensation HOT 1
- Using crate or version HOT 3
- anchor_mango_v3 HOT 4
- Can't built main on M1 HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mango-v3.