Skip to main content
added 5 characters in body; added 142 characters in body
Source Link
Jonas H.
  • 7.2k
  • 1
  • 7
  • 26

The code you posted would not work out of the box.

The fromKeypair is paying for the new account to be created, and would need to have enough SOL to create a new account.

ByThe default, accounts system account on Solana aresolana is 136 bytes and costcosts 0.00178176 SOL to be rent exempt.

So the system program will create this account when you do the transfer. Using the CLI it would actually ask you if you want to fund that account.

The fromKeypair is the one that is paying for the new account and the toKeypair is the address where the new account will be created.

The code you posted would not work out of the box.

The fromKeypair is paying for the new account to be created, and would need to have enough SOL to create a new account.

By default, accounts on Solana are 136 bytes and cost 0.00178176 SOL to be rent exempt.

So the system program will create this account when you do the transfer. Using the CLI it would actually ask you if you want to fund that account.

The code you posted would not work out of the box.

The fromKeypair is paying for the new account to be created, and would need to have enough SOL to create a new account.

The default system account on solana is 136 bytes and costs 0.00178176 SOL to be rent exempt.

So the system program will create this account when you do the transfer. Using the CLI it would actually ask you if you want to fund that account.

The fromKeypair is the one that is paying for the new account and the toKeypair is the address where the new account will be created.

added 52 characters in body
Source Link

The code you posted would not work out of the box.

The fromKeypairfromKeypair is paying for the new account to be created, and would need to have enough solSOL to create a new account.

TheBy default account, accounts on solana isSolana are 136 bytes and costscost 0.00178176 SOL to be rent exempt.

So the system program will create this account when you do the transfer. Using the CLI it would actually ask you if you want to fund that account.

The code you posted would not work out of the box.

The fromKeypair would need to have enough sol to create a new account.

The default account on solana is 136 bytes and costs 0.00178176 SOL to be rent exempt.

So the system program will create this account when you do the transfer. Using the CLI it would actually ask you if you want to fund that account.

The code you posted would not work out of the box.

The fromKeypair is paying for the new account to be created, and would need to have enough SOL to create a new account.

By default, accounts on Solana are 136 bytes and cost 0.00178176 SOL to be rent exempt.

So the system program will create this account when you do the transfer. Using the CLI it would actually ask you if you want to fund that account.

Source Link
Jonas H.
  • 7.2k
  • 1
  • 7
  • 26

The code you posted would not work out of the box.

The fromKeypair would need to have enough sol to create a new account.

The default account on solana is 136 bytes and costs 0.00178176 SOL to be rent exempt.

So the system program will create this account when you do the transfer. Using the CLI it would actually ask you if you want to fund that account.