Created
August 23, 2024 18:40
-
-
Save cloakd/59ddb02dcac08896a638f6b4c4ce40cd to your computer and use it in GitHub Desktop.
Flux wSOL wrapping contract
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": "0.1.0", | |
| "name": "sol_wrapping_contract", | |
| "instructions": [ | |
| { | |
| "name": "wrap", | |
| "accounts": [ | |
| { | |
| "name": "owner", | |
| "isMut": true, | |
| "isSigner": true | |
| }, | |
| { | |
| "name": "wsolAccount", | |
| "isMut": true, | |
| "isSigner": false | |
| }, | |
| { | |
| "name": "nativeMint", | |
| "isMut": false, | |
| "isSigner": false | |
| }, | |
| { | |
| "name": "associatedTokenProgram", | |
| "isMut": false, | |
| "isSigner": false | |
| }, | |
| { | |
| "name": "tokenProgram", | |
| "isMut": false, | |
| "isSigner": false | |
| }, | |
| { | |
| "name": "systemProgram", | |
| "isMut": false, | |
| "isSigner": false | |
| } | |
| ], | |
| "args": [ | |
| { | |
| "name": "amount", | |
| "type": "u64" | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "unwrap", | |
| "accounts": [ | |
| { | |
| "name": "owner", | |
| "isMut": true, | |
| "isSigner": true | |
| }, | |
| { | |
| "name": "wsolAccount", | |
| "isMut": true, | |
| "isSigner": false | |
| }, | |
| { | |
| "name": "mint", | |
| "isMut": false, | |
| "isSigner": false | |
| }, | |
| { | |
| "name": "tokenProgram", | |
| "isMut": false, | |
| "isSigner": false | |
| } | |
| ], | |
| "args": [] | |
| } | |
| ], | |
| "errors": [ | |
| { | |
| "code": 6000, | |
| "name": "InsufficientBalance", | |
| "msg": "Not enough SOL to wrap" | |
| }, | |
| { | |
| "code": 6001, | |
| "name": "UnauthorizedAccess", | |
| "msg": "Not authorized for this transaction" | |
| } | |
| ], | |
| "metadata": { | |
| "address": "WSoLLq6BnLpJ2WTvwkKC7JkgbZQueTGjTq1GuvM1KCe" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment