-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade Gummyroll SDK to Solita #164
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great Sam! Keep up the momentum.
Can you attempt to replace the .getProvider()
call with a manually created provider in the gummyroll test? Would hate to accidentally run something on testnet given our current infra setup.
Otherwise this is great. Good design naming proof
convenience ix names. Getting this right really helps out in the long run.
Once you make the changes I requested, go ahead and merge.
@@ -24,7 +24,7 @@ | |||
"@project-serum/anchor": "0.24.2", | |||
"@solana/spl-token": "^0.1.8", | |||
"@solana/web3.js": "^1.50.1", | |||
"@sorend-solana/gummyroll": "^0.0.5", | |||
"@sorend-solana/gummyroll": "^0.0.6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes, the beginning of package administration h#ll
const generatedSDKDir = path.join(__dirname, 'src', 'generated'); | ||
|
||
async function main() { | ||
const anchorExecutable = realpathSync("../../../deps/anchor/target/debug/anchor"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add to list of todos: switch to normal anchor since it builds to solana 1.10 now
export function createInitGummyrollWithRootWithProofInstruction( | ||
accts: InitGummyrollWithRootInstructionAccounts, | ||
args: InitGummyrollWithRootInstructionArgs, | ||
proof: Buffer[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐
@@ -3,19 +3,24 @@ | |||
# plz update this script so all devs can easily get setup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add
set -e
to the top which will exit the script if any line throws an error
); | ||
} | ||
let txId = await execute(Gummyroll.provider, ixs, [ | ||
let txId = await execute(anchor.getProvider(), ixs, [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer using a provider
object created at the top of the file, alongside connection
, if possible
// @ts-ignore | ||
let Gummyroll; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💪 one step at a time, we will remove these types
This PR upgrades the Gummyroll SDK to use Solita. Creating instructions is now facilitated by Solita ix generators, with some wrappers for convenience. The main "manual" piece of code which remains is a deserializer for merkle roll accounts, since Solita will not generate a beet which we can use for that purpose (since its mainly free-form bytes other than the header).
The latest SDK changes are published here: https://www.npmjs.com/package/@sorend-solana/gummyroll.
All services in this repo have been upgraded to work with the new release.
Follow up work: