call_anchor.sol 573 B

12345678910111213141516
  1. import "bobcat.sol";
  2. import "solana";
  3. contract example {
  4. function test(address a, address b) public {
  5. // The list of accounts to pass into the Anchor program must be passed
  6. // as an array of AccountMeta with the correct writable/signer flags set
  7. AccountMeta[2] am = [
  8. AccountMeta({pubkey: a, is_writable: true, is_signer: false}),
  9. AccountMeta({pubkey: b, is_writable: false, is_signer: false})
  10. ];
  11. // Any return values are decoded automatically
  12. int64 res = bobcat.pounce{accounts: am}();
  13. }
  14. }