{"version":"0.1.2","name":"save_token","instructions":[{"name":"createSave","accounts":[{"name":"saveMint","isMut":false,"isSigner":false},{"name":"save","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"SAVE"},{"kind":"account","type":"publicKey","account":"Mint","path":"save_mint"}]}},{"name":"yi","isMut":false,"isSigner":false},{"name":"yiMint","isMut":false,"isSigner":false},{"name":"yiTokens","isMut":false,"isSigner":false},{"name":"locker","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"minLockDuration","type":"u64"}]},{"name":"lock","accounts":[{"name":"save","isMut":false,"isSigner":false},{"name":"saveMint","isMut":true,"isSigner":false},{"name":"saveYiTokens","isMut":true,"isSigner":false},{"name":"userSaveTokens","isMut":true,"isSigner":false},{"name":"userUnderlyingTokens","isMut":true,"isSigner":false},{"name":"lock","accounts":[{"name":"locker","isMut":true,"isSigner":false},{"name":"escrow","isMut":true,"isSigner":false},{"name":"escrowTokens","isMut":true,"isSigner":false}]},{"name":"yi","accounts":[{"name":"yiToken","isMut":false,"isSigner":false},{"name":"yiMint","isMut":true,"isSigner":false},{"name":"yiUnderlyingTokens","isMut":true,"isSigner":false}]},{"name":"userAuthority","isMut":false,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"yiTokenProgram","isMut":false,"isSigner":false},{"name":"lockedVoterProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"},{"name":"duration","type":"u64"}]},{"name":"mintFromYi","accounts":[{"name":"common","accounts":[{"name":"save","isMut":false,"isSigner":false},{"name":"saveMint","isMut":true,"isSigner":false},{"name":"saveYiTokens","isMut":true,"isSigner":false},{"name":"to","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}]},{"name":"sourceYiTokens","isMut":true,"isSigner":false},{"name":"sourceAuthority","isMut":false,"isSigner":true}],"args":[{"name":"yiAmount","type":"u64"}]},{"name":"mintFromUnderlying","accounts":[{"name":"common","accounts":[{"name":"save","isMut":false,"isSigner":false},{"name":"saveMint","isMut":true,"isSigner":false},{"name":"saveYiTokens","isMut":true,"isSigner":false},{"name":"to","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}]},{"name":"yi","isMut":true,"isSigner":false},{"name":"yiMint","isMut":true,"isSigner":false},{"name":"yiUnderlyingTokens","isMut":true,"isSigner":false},{"name":"sourceUnderlyingTokens","isMut":true,"isSigner":false},{"name":"sourceAuthority","isMut":false,"isSigner":true},{"name":"yiProgram","isMut":false,"isSigner":false}],"args":[{"name":"underlyingAmount","type":"u64"}]}],"accounts":[{"name":"Save","type":{"kind":"struct","fields":[{"name":"mint","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"padding","type":{"array":["u8",7]}},{"name":"minLockDuration","type":"u64"},{"name":"underlyingMint","type":"publicKey"},{"name":"yiMint","type":"publicKey"},{"name":"yi","type":"publicKey"},{"name":"yiTokens","type":"publicKey"},{"name":"locker","type":"publicKey"}]}}],"errors":[{"code":6000,"name":"DurationExceeded","msg":"SAVE minimum duration not met."},{"code":6001,"name":"LockerMismatch","msg":"Tokens may only be locked in the SAVE's specified locker."}]}