add Address Lookup Table program and support for version 0 transactions
Hello,
Since transactions can now use address lookup tables, this commit adds support for the version 0 transaction format. This format is implicitly used when the :lookup_tables option is non-empty.
-
:lookup_tables(default:%{}) — A map of address lookup tables to use. Each key is at:Solana.Key.t/0representing the address of a lookup table account, and each value is a list oft:Solana.Key.t/0representing the addresses of that lookup table.When non-empty, the transaction is encoded using the version 0 format.
Solana.Transaction.to_binary/2 now accepts two options; however, there's currently no way to use these with Solana.RPC.Request.send_transaction/2.
It might be nice to allow Solana.RPC.Request.send_transaction/2 to either accept pre-compiled transactions or forward these options to Solana.Transaction.to_binary/2.
Version 0 transaction cannot be parsed without an RPC connection.
Because Solana.Transaction.parse/1 currently does not have access to an RPC client, I have left it out the parsing of version 0 transactions for now.
I also left out the test for Solana.LookupTable.close_lookup_table/1 because closing a lookup table requires a cool-down period after deactivation, which caused the tests to time out.
Once there is way to send transactions that are compiled with options, I will add tests for version 0 transactions.