mschneider / solcpp

A fast Solana and Mango Markets C++ SDK
Other
40 stars 13 forks source link

MangoAccount create from AccountInfo #26

Closed bdhobare closed 2 years ago

bdhobare commented 2 years ago

// option 2 : Use prefetched AccountInfo const auto& mangoAccountInfo = connection.getAccountInfo(pubKey); const auto& mangoAccount = mango_v3::MangoAccount(mangoAccountInfo);

bdhobare commented 2 years ago

@mschneider Simplified MangoAccount to a struct that will have the other methods added. Also replaced the explicit initialization methods with normal constructors. Updated the tests to validate the accountInfo instead of the type.

mschneider commented 2 years ago

included in https://github.com/mschneider/solcpp/pull/27/files