Skip to content

chore: rename to remove sol#77

Open
Arrowana wants to merge 2 commits intosolana-program:mainfrom
Arrowana:chore/rename-to-remove-sol
Open

chore: rename to remove sol#77
Arrowana wants to merge 2 commits intosolana-program:mainfrom
Arrowana:chore/rename-to-remove-sol

Conversation

@Arrowana
Copy link
Copy Markdown
Contributor

@Arrowana Arrowana commented Apr 22, 2026

The field like in the system processor lamports was self explanatory, using transferSol and amount is not

@Arrowana Arrowana force-pushed the chore/rename-to-remove-sol branch from 6577f80 to 1b35b44 Compare April 22, 2026 01:59
@joncinque joncinque requested a review from lorisleiva April 22, 2026 11:49
@joncinque
Copy link
Copy Markdown
Contributor

Makes sense to me! Lamports are the actual amount being transferred, and not SOL. We'll see what @lorisleiva thinks

@lorisleiva
Copy link
Copy Markdown
Member

The idea was that you would use amount: lamports(1_500_000_000n) and could use amount: sol("1.5") in the near future (when I implement @solana/fixed-points) but I suppose lamports: sol("1.5") isn't the end of the world and works better when you provide direct numbers.

The issue is this is a pretty big breaking change and some of our documentation / examples refer to this instruction a lot. I personally think transferSol/amount is not a bad API versus transfer/lamports but I'm happy to merge this and deal with the breaking changes if we think it's worth it.

@joncinque
Copy link
Copy Markdown
Contributor

Ah I see, that sounds pretty slick actually -- I'll let @Arrowana give his opinion though.

Since the program defines it as transfer and not transferSol I would lean towards the consistency myself.

To avoid a lot of breaking, is it possible to have a transferSol function that just forwards to transfer?

@lorisleiva
Copy link
Copy Markdown
Member

Yes good shout, we could add some manually written aliases with a @deprecated tag on the JS side.

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

Successfully merging this pull request may close these issues.

3 participants