Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Direct buy failing with auctionHouse().buy( ... ). #1069

Open
pranav3714 opened this issue Apr 21, 2023 · 2 comments
Open

[Bug]: Direct buy failing with auctionHouse().buy( ... ). #1069

pranav3714 opened this issue Apr 21, 2023 · 2 comments
Labels

Comments

@pranav3714
Copy link

Which package is this bug report for?

auction-house

Which Type of Package is this bug report for?

Rust Contract

Issue description

I tried to do the following:

  1. Created a listing with @metaplex-foundation/js 0.18.3:
const { receipt } = await minterplex.auctionHouse().list({
    auctionHouse,
    price: sol(0.0001),
    mintAccount: nft.mint.address,
    tokenAccount: nft.token.address,

}, {
    commitment: "finalized"
})
  1. And tried to buy the item by getting listing using the receipt id and passed it to .buy() mthod:
const directBuy = await metaplex.auctionHouse().buy({
    auctionHouse,
    listing,
    price: sol(0.0001),
    buyer: wallet
}, {
    commitment: "finalized",
    payer: wallet
})

Which is giving the the following error:

Relevant log output

file:///D:/vegavid/r&d/solana/metaplex/starter/node_modules/@metaplex-foundation/js/dist/esm/plugins/rpcModule/RpcClient.mjs:196
      return new FailedToSendTransactionError(error);
             ^

FailedToSendTransactionError: The transaction could not be sent successfully to the network. Please check the underlying error below for more details.

Source: RPC

Caused By: Error: failed to send transaction: Transaction simulation failed: Transaction results in an account (4) without insufficient funds for rent

Program Logs:
| Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk invoke [1]
| Program log: Instruction: Buy
| Program 11111111111111111111111111111111 invoke [2]
| Program 11111111111111111111111111111111 success
| Program log: Transfer 897840 lamports to the new account
| Program 11111111111111111111111111111111 invoke [2]
| Program 11111111111111111111111111111111 success
| Program log: Allocate space for the account 34XKtXrTW72gochfsdqDTKaTnEuj6xEeHh5pjdohR5nc
| Program 11111111111111111111111111111111 invoke [2]
| Program 11111111111111111111111111111111 success
| Program log: Assign the account to the owning program
| Program 11111111111111111111111111111111 invoke [2]
| Program 11111111111111111111111111111111 success
| Program log: Completed assignation!
| Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk consumed 80358 of 800000 compute units
| Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk success
| Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk invoke [1]
| Program log: Instruction: PrintBidReceipt
| Program log: Transfer 2763120 lamports to the new account
| Program 11111111111111111111111111111111 invoke [2]
| Program 11111111111111111111111111111111 success
| Program log: Allocate space for the account 4A69x4NSaXpY14Y76hEJzP4D6dVg6Pi9ug3yvBXXU2Ze
| Program 11111111111111111111111111111111 invoke [2]
| Program 11111111111111111111111111111111 success
| Program log: Assign the account to the owning program
| Program 11111111111111111111111111111111 invoke [2]
| Program 11111111111111111111111111111111 success
| Program log: Completed assignation!
| Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk consumed 40606 of 719642 compute units
| Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk success
| Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk invoke [1]
| Program log: Instruction: ExecuteSale
| Program log: cannot pay creator wdRDU179tJA4BbGuUphiVMMYLxs7mNgMzCrhiB8vVTt 0 lamports since balance violates rent exempt minimum
| Program 11111111111111111111111111111111 invoke [2]
| Program 11111111111111111111111111111111 success
| Program 11111111111111111111111111111111 invoke [2]
| Program 11111111111111111111111111111111 success
| Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL invoke [2]
| Program log: Create
| Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]
| Program log: Instruction: GetAccountDataSize
| Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 1622 of 574059 compute units
| Program return: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA pQAAAAAAAAA=
| Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success
| Program 11111111111111111111111111111111 invoke [3]
| Program 11111111111111111111111111111111 success
| Program log: Initialize the associated token account
| Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]
| Program log: Instruction: InitializeImmutableOwner
| Program log: Please upgrade to SPL Token 2022 for immutable owner support
| Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 1405 of 567569 compute units
| Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success
| Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]
| Program log: Instruction: InitializeAccount3
| Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4241 of 563687 compute units
| Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success
| Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL consumed 21793 of 580956 compute units
| Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL success
| Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]
| Program log: Instruction: Transfer
| Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4735 of 554109 compute units
| Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success
| Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk consumed 135663 of 679036 compute units
| Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk success
| Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk invoke [1]
| Program log: Instruction: PrintPurchaseReceipt
| Program log: Transfer 2234160 lamports to the new account
| Program 11111111111111111111111111111111 invoke [2]
| Program 11111111111111111111111111111111 success
| Program log: Allocate space for the account G1uj4htG8GvUaJRZvzPGeosxaUVxBuE8v1ombWqFYuVK
| Program 11111111111111111111111111111111 invoke [2]
| Program 11111111111111111111111111111111 success
| Program log: Assign the account to the owning program
| Program 11111111111111111111111111111111 invoke [2]
| Program 11111111111111111111111111111111 success
| Program log: Completed assignation!
| Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk consumed 56638 of 543373 compute units
| Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk success

    at RpcClient.parseProgramError (file:///D:/vegavid/r&d/solana/metaplex/starter/node_modules/@metaplex-foundation/js/dist/esm/plugins/rpcModule/RpcClient.mjs:196:14)
    at RpcClient.sendTransaction (file:///D:/vegavid/r&d/solana/metaplex/starter/node_modules/@metaplex-foundation/js/dist/esm/plugins/rpcModule/RpcClient.mjs:66:18)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RpcClient.sendAndConfirmTransaction (file:///D:/vegavid/r&d/solana/metaplex/starter/node_modules/@metaplex-foundation/js/dist/esm/plugins/rpcModule/RpcClient.mjs:91:23)
    ... 2 lines matching cause stack trace ...
    at async file:///D:/vegavid/r&d/solana/metaplex/starter/candy-machine.js:121:19 {
  source: 'rpc',
  sourceDetails: undefined,
  cause: SendTransactionError: failed to send transaction: Transaction simulation failed: Transaction results in an account (4) without insufficient funds for rent
      at Connection.sendEncodedTransaction (D:\vegavid\r&d\solana\metaplex\starter\node_modules\@solana\web3.js\lib\index.cjs.js:9113:13)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async Connection.sendRawTransaction (D:\vegavid\r&d\solana\metaplex\starter\node_modules\@solana\web3.js\lib\index.cjs.js:9079:20)
      at async RpcClient.sendTransaction (file:///D:/vegavid/r&d/solana/metaplex/starter/node_modules/@metaplex-foundation/js/dist/esm/plugins/rpcModule/RpcClient.mjs:64:14)
      at async RpcClient.sendAndConfirmTransaction (file:///D:/vegavid/r&d/solana/metaplex/starter/node_modules/@metaplex-foundation/js/dist/esm/plugins/rpcModule/RpcClient.mjs:91:23)
      at async TransactionBuilder.sendAndConfirm (file:///D:/vegavid/r&d/solana/metaplex/starter/node_modules/@metaplex-foundation/js/dist/esm/utils/TransactionBuilder.mjs:111:22)
      at async Disposable.run (file:///D:/vegavid/r&d/solana/metaplex/starter/node_modules/@metaplex-foundation/js/dist/esm/utils/Disposable.mjs:18:14)
      at async file:///D:/vegavid/r&d/solana/metaplex/starter/candy-machine.js:121:19 {
    logs: [
      'Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk invoke [1]',
      'Program log: Instruction: Buy',
      'Program 11111111111111111111111111111111 invoke [2]',
      'Program 11111111111111111111111111111111 success',
      'Program log: Transfer 897840 lamports to the new account',
      'Program 11111111111111111111111111111111 invoke [2]',
      'Program 11111111111111111111111111111111 success',
      'Program log: Allocate space for the account 34XKtXrTW72gochfsdqDTKaTnEuj6xEeHh5pjdohR5nc',
      'Program 11111111111111111111111111111111 invoke [2]',
      'Program 11111111111111111111111111111111 success',
      'Program log: Assign the account to the owning program',
      'Program 11111111111111111111111111111111 invoke [2]',
      'Program 11111111111111111111111111111111 success',
      'Program log: Completed assignation!',
      'Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk consumed 80358 of 800000 compute units',
      'Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk success',
      'Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk invoke [1]',
      'Program log: Instruction: PrintBidReceipt',
      'Program log: Transfer 2763120 lamports to the new account',
      'Program 11111111111111111111111111111111 invoke [2]',
      'Program 11111111111111111111111111111111 success',
      'Program log: Allocate space for the account 4A69x4NSaXpY14Y76hEJzP4D6dVg6Pi9ug3yvBXXU2Ze',
      'Program 11111111111111111111111111111111 invoke [2]',
      'Program 11111111111111111111111111111111 success',
      'Program log: Assign the account to the owning program',
      'Program 11111111111111111111111111111111 invoke [2]',
      'Program 11111111111111111111111111111111 success',
      'Program log: Completed assignation!',
      'Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk consumed 40606 of 719642 compute units',
      'Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk success',
      'Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk invoke [1]',
      'Program log: Instruction: ExecuteSale',
      'Program log: cannot pay creator wdRDU179tJA4BbGuUphiVMMYLxs7mNgMzCrhiB8vVTt 0 lamports since balance violates rent exempt minimum',
      'Program 11111111111111111111111111111111 invoke [2]',
      'Program 11111111111111111111111111111111 success',
      'Program 11111111111111111111111111111111 invoke [2]',
      'Program 11111111111111111111111111111111 success',
      'Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL invoke [2]',
      'Program log: Create',
      'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]',
      'Program log: Instruction: GetAccountDataSize',
      'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 1622 of 574059 compute units',
      'Program return: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA pQAAAAAAAAA=',
      'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success',
      'Program 11111111111111111111111111111111 invoke [3]',
      'Program 11111111111111111111111111111111 success',
      'Program log: Initialize the associated token account',
      'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]',
      'Program log: Instruction: InitializeImmutableOwner',
      'Program log: Please upgrade to SPL Token 2022 for immutable owner support',
      'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 1405 of 567569 compute units',
      'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success',
      'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]',
      'Program log: Instruction: InitializeAccount3',
      'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4241 of 563687 compute units',
      'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success',
      'Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL consumed 21793 of 580956 compute units',
      'Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL success',
      'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]',
      'Program log: Instruction: Transfer',
      'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 4735 of 554109 compute units',
      'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success',
      'Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk consumed 135663 of 679036 compute units',
      'Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk success',
      'Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk invoke [1]',
      'Program log: Instruction: PrintPurchaseReceipt',
      'Program log: Transfer 2234160 lamports to the new account',
      'Program 11111111111111111111111111111111 invoke [2]',
      'Program 11111111111111111111111111111111 success',
      'Program log: Allocate space for the account G1uj4htG8GvUaJRZvzPGeosxaUVxBuE8v1ombWqFYuVK',
      'Program 11111111111111111111111111111111 invoke [2]',
      'Program 11111111111111111111111111111111 success',
      'Program log: Assign the account to the owning program',
      'Program 11111111111111111111111111111111 invoke [2]',
      'Program 11111111111111111111111111111111 success',
      'Program log: Completed assignation!',
      'Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk consumed 56638 of 543373 compute units',
      'Program hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk success'
    ]
  }
}

Priority this issue should have

Low (slightly annoying)

@pranav3714 pranav3714 added the bug label Apr 21, 2023
@pranav3714
Copy link
Author

pranav3714 commented Apr 21, 2023

I doubt that,
Program log: cannot pay creator wdRDU179tJA4BbGuUphiVMMYLxs7mNgMzCrhiB8vVTt 0 lamports since balance violates rent exempt minimum
This is the exact error the "wdRDU179tJA4BbGuUphiVMMYLxs7mNgMzCrhiB8vVTt" address here is automatically attached to the creators with 0% share when using the mint method don't know why tough, could someone explain please.

@KartikSoneji
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants