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

attribute not found: Account."transfer_lamports". #26

Open
l33tblock opened this issue Jan 19, 2025 · 0 comments
Open

attribute not found: Account."transfer_lamports". #26

l33tblock opened this issue Jan 19, 2025 · 0 comments

Comments

@l33tblock
Copy link

I created a solana wallet(lets call it deposit_wallet) and assigned the ownership of this wallet to my program 59JNYpGZ5sMoQzuUzMmCfqMzQncYc9Xjo6wgGgnZvcHw using SystemProgram.assign.

Now I want to implement an instruction in my contract to transfer lamports from this wallet owned by my program to another of my wallet receiver_wallet.

Here is the code I am trying

from seahorse.prelude import *


declare_id("59JNYpGZ5sMoQzuUzMmCfqMzQncYc9Xjo6wgGgnZvcHw")


@instruction
def process_payment(
    authority: Signer,
    deposit_wallet: Account,
    receiver_wallet: Account,
):
    deposit_wallet.transfer_lamports(receiver_wallet, 100000000)

The error I get:

❯ seahorse build
✗ Compiling payments...
Error: attribute not found: Account."transfer_lamports".
72 |     deposit_wallet.transfer_lamports(receiver_wallet, 100000000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant