{ "version": "0.1.0", "name": "anchor_escrow_2023_timed", "instructions": [ { "name": "make", "accounts": [ { "name": "maker", "isMut": true, "isSigner": true }, { "name": "makerAta", "isMut": true, "isSigner": false }, { "name": "makerToken", "isMut": false, "isSigner": false }, { "name": "takerToken", "isMut": false, "isSigner": false }, { "name": "auth", "isMut": false, "isSigner": false, "pda": { "seeds": [ { "kind": "const", "type": "string", "value": "auth" } ] } }, { "name": "vault", "isMut": true, "isSigner": false, "pda": { "seeds": [ { "kind": "const", "type": "string", "value": "vault" }, { "kind": "account", "type": "publicKey", "account": "Escrow", "path": "escrow" } ] } }, { "name": "escrow", "isMut": true, "isSigner": false, "pda": { "seeds": [ { "kind": "const", "type": "string", "value": "escrow" }, { "kind": "account", "type": "publicKey", "path": "maker" }, { "kind": "arg", "type": "u64", "path": "seed" } ] } }, { "name": "tokenProgram", "isMut": false, "isSigner": false }, { "name": "associatedTokenProgram", "isMut": false, "isSigner": false }, { "name": "systemProgram", "isMut": false, "isSigner": false } ], "args": [ { "name": "seed", "type": "u64" }, { "name": "depositAmount", "type": "u64" }, { "name": "offerAmount", "type": "u64" }, { "name": "expiry", "type": "u64" } ] }, { "name": "refund", "accounts": [ { "name": "maker", "isMut": true, "isSigner": true }, { "name": "makerAta", "isMut": true, "isSigner": false }, { "name": "makerToken", "isMut": false, "isSigner": false }, { "name": "auth", "isMut": false, "isSigner": false, "pda": { "seeds": [ { "kind": "const", "type": "string", "value": "auth" } ] } }, { "name": "vault", "isMut": true, "isSigner": false, "pda": { "seeds": [ { "kind": "const", "type": "string", "value": "vault" }, { "kind": "account", "type": "publicKey", "account": "Escrow", "path": "escrow" } ] } }, { "name": "escrow", "isMut": true, "isSigner": false, "pda": { "seeds": [ { "kind": "const", "type": "string", "value": "escrow" }, { "kind": "account", "type": "publicKey", "path": "maker" }, { "kind": "account", "type": "u64", "account": "Escrow", "path": "escrow.seed" } ] }, "relations": [ "maker", "maker_token" ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false }, { "name": "associatedTokenProgram", "isMut": false, "isSigner": false }, { "name": "systemProgram", "isMut": false, "isSigner": false } ], "args": [] }, { "name": "update", "accounts": [ { "name": "maker", "isMut": true, "isSigner": true }, { "name": "newTakerToken", "isMut": false, "isSigner": false }, { "name": "escrow", "isMut": true, "isSigner": false, "pda": { "seeds": [ { "kind": "const", "type": "string", "value": "escrow" }, { "kind": "account", "type": "publicKey", "path": "maker" }, { "kind": "account", "type": "u64", "account": "Escrow", "path": "escrow.seed" } ] }, "relations": [ "maker" ] }, { "name": "systemProgram", "isMut": false, "isSigner": false } ], "args": [ { "name": "offerAmount", "type": "u64" }, { "name": "expiry", "type": "u64" } ] }, { "name": "take", "accounts": [ { "name": "maker", "isMut": true, "isSigner": false }, { "name": "makerReceiveAta", "isMut": true, "isSigner": false }, { "name": "makerToken", "isMut": false, "isSigner": false }, { "name": "taker", "isMut": true, "isSigner": true }, { "name": "takerAta", "isMut": true, "isSigner": false }, { "name": "takerReceiveAta", "isMut": true, "isSigner": false }, { "name": "takerToken", "isMut": false, "isSigner": false }, { "name": "auth", "isMut": false, "isSigner": false, "pda": { "seeds": [ { "kind": "const", "type": "string", "value": "auth" } ] } }, { "name": "vault", "isMut": true, "isSigner": false, "pda": { "seeds": [ { "kind": "const", "type": "string", "value": "vault" }, { "kind": "account", "type": "publicKey", "account": "Escrow", "path": "escrow" } ] } }, { "name": "escrow", "isMut": true, "isSigner": false, "pda": { "seeds": [ { "kind": "const", "type": "string", "value": "escrow" }, { "kind": "account", "type": "publicKey", "path": "maker" }, { "kind": "account", "type": "u64", "account": "Escrow", "path": "escrow.seed" } ] }, "relations": [ "maker", "taker_token", "maker_token" ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false }, { "name": "associatedTokenProgram", "isMut": false, "isSigner": false }, { "name": "systemProgram", "isMut": false, "isSigner": false } ], "args": [] } ], "accounts": [ { "name": "Escrow", "type": { "kind": "struct", "fields": [ { "name": "maker", "type": "publicKey" }, { "name": "makerToken", "type": "publicKey" }, { "name": "takerToken", "type": "publicKey" }, { "name": "offerAmount", "type": "u64" }, { "name": "seed", "type": "u64" }, { "name": "expiry", "type": "u64" }, { "name": "authBump", "type": "u8" }, { "name": "vaultBump", "type": "u8" }, { "name": "escrowBump", "type": "u8" } ] } } ], "errors": [ { "code": 6000, "name": "AuthBumpError", "msg": "Unable to get auth bump" }, { "code": 6001, "name": "VaultBumpError", "msg": "Unable to get vault bump" }, { "code": 6002, "name": "EscrowBumpError", "msg": "Unable to get escrow bump" }, { "code": 6003, "name": "MaxExpiryExceeded", "msg": "Your expiration is too far into the future" }, { "code": 6004, "name": "Expired", "msg": "Escrow has expired" } ] }