{ "version": "0.0.0", "name": "add_decimals", "instructions": [ { "name": "initializeWrapper", "accounts": [ { "name": "wrapper", "isMut": true, "isSigner": false }, { "name": "wrapperUnderlyingTokens", "isMut": false, "isSigner": false }, { "name": "underlyingMint", "isMut": false, "isSigner": false }, { "name": "wrapperMint", "isMut": false, "isSigner": false }, { "name": "payer", "isMut": false, "isSigner": true }, { "name": "rent", "isMut": false, "isSigner": false }, { "name": "systemProgram", "isMut": false, "isSigner": false } ], "args": [ { "name": "nonce", "type": "u8" } ] }, { "name": "deposit", "accounts": [ { "name": "wrapper", "isMut": false, "isSigner": false }, { "name": "wrapperMint", "isMut": true, "isSigner": false }, { "name": "wrapperUnderlyingTokens", "isMut": true, "isSigner": false }, { "name": "owner", "isMut": false, "isSigner": true }, { "name": "userUnderlyingTokens", "isMut": true, "isSigner": false }, { "name": "userWrappedTokens", "isMut": true, "isSigner": false }, { "name": "tokenProgram", "isMut": false, "isSigner": false } ], "args": [ { "name": "depositAmount", "type": "u64" } ] }, { "name": "withdraw", "accounts": [ { "name": "wrapper", "isMut": false, "isSigner": false }, { "name": "wrapperMint", "isMut": true, "isSigner": false }, { "name": "wrapperUnderlyingTokens", "isMut": true, "isSigner": false }, { "name": "owner", "isMut": false, "isSigner": true }, { "name": "userUnderlyingTokens", "isMut": true, "isSigner": false }, { "name": "userWrappedTokens", "isMut": true, "isSigner": false }, { "name": "tokenProgram", "isMut": false, "isSigner": false } ], "args": [ { "name": "maxBurnAmount", "type": "u64" } ] } ], "accounts": [ { "name": "WrappedToken", "type": { "kind": "struct", "fields": [ { "name": "decimals", "type": "u8" }, { "name": "multiplier", "type": "u64" }, { "name": "wrapperUnderlyingMint", "type": "publicKey" }, { "name": "wrapperUnderlyingTokens", "type": "publicKey" }, { "name": "wrapperMint", "type": "publicKey" } ] } } ], "events": [ { "name": "InitEvent", "fields": [ { "name": "payer", "type": "publicKey", "index": false }, { "name": "decimals", "type": "u8", "index": false }, { "name": "multiplier", "type": "u64", "index": false }, { "name": "wrapperUnderlyingMint", "type": "publicKey", "index": false }, { "name": "wrapperUnderlyingTokens", "type": "publicKey", "index": false }, { "name": "wrapperMint", "type": "publicKey", "index": false } ] }, { "name": "DepositEvent", "fields": [ { "name": "owner", "type": "publicKey", "index": false }, { "name": "underlyingMint", "type": "publicKey", "index": false }, { "name": "wrappedMint", "type": "publicKey", "index": false }, { "name": "depositAmount", "type": "u64", "index": false }, { "name": "mintAmount", "type": "u64", "index": false } ] }, { "name": "WithdrawEvent", "fields": [ { "name": "owner", "type": "publicKey", "index": false }, { "name": "underlyingMint", "type": "publicKey", "index": false }, { "name": "wrappedMint", "type": "publicKey", "index": false }, { "name": "withdrawAmount", "type": "u64", "index": false }, { "name": "burnAmount", "type": "u64", "index": false }, { "name": "dustAmount", "type": "u64", "index": false } ] } ], "errors": [ { "code": 300, "name": "InitNonEmptyAccount", "msg": "Wrapper underlying tokens account must be empty." }, { "code": 301, "name": "InitWrapperSupplyNonZero", "msg": "Supply of the wrapper mint is non-zero" }, { "code": 302, "name": "InitWrapperUnderlyingOwnerMismatch", "msg": "Owner of the wrapper underlying tokens account must be the wrapper" }, { "code": 303, "name": "InitWrapperUnderlyingMintMismatch", "msg": "Underlying mint does not match underlying tokens account mint" }, { "code": 304, "name": "InitMintAuthorityMismatch", "msg": "Mint authority mismatch" }, { "code": 305, "name": "InitMultiplierOverflow", "msg": "Initial decimals too high" }, { "code": 306, "name": "InitWrapperDecimalsTooLow", "msg": "The number of target decimals must be greater than or equal to the underlying asset's decimals." }, { "code": 307, "name": "MintAmountOverflow", "msg": "Mint amount overflow. This error happens when the token cannot support this many decimals added to the token." }, { "code": 308, "name": "InvalidBurnAmount", "msg": "Failed to convert burn amount from withdraw amount." }, { "code": 309, "name": "InvalidWithdrawAmount", "msg": "Failed to convert withdraw amount from wrapped amount." }, { "code": 310, "name": "InsufficientUnderlyingBalance", "msg": "User does not have enough underlying tokens" }, { "code": 311, "name": "InsufficientWrappedBalance", "msg": "User does not have enough wrapped tokens" }, { "code": 312, "name": "ZeroAmount", "msg": "Cannot send zero tokens" }, { "code": 313, "name": "UnknownAction", "msg": "Unknown router action" }, { "code": 314, "name": "InitFreezeAuthorityMismatch", "msg": "Freeze authority mismatch" } ], "metadata": { "address": "Gwuw9jkL6cXwR2eKZqt6G2g4XVPqrzJhB4g6FmfzFQ5f" } }