You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are planning to deploy contracts to solana. To be able to use them we have to attest the changes that are required to add the solana SDK to the masa sdk and make it connect to solana.
Acceptance Criteria
Add Solana SDK to Masa SDK
Connect to solana testnet/devnet
Transact on solana testnet/devnet
Output
Smart Contracts
There is no concept called smart contracts at Solana. Instead they follow a concept that is called Program. There is a default program called splToken which is very similar to ERC20 tokens on EVM and comes with its own factory. Based on the findings with the OFT implementation on Solana we might or might not use that Program for the Masa Token. To ship functionality like staking we need a custom staking program. There is no known code generation framework like we are using with ABIs and ethers.js so we might up ending keeping the using code and in the SDK and the contract itself in sync manually.
Wallets
My implementation of Solana here is based on a connection / keypair construct similar to the wallet construct from ethers.js. Since we are not exactly sure what a wallet connection in the browser would deliver we can go ahead with the keypair solution for now. It works very well in the cli. It enables us to use public keys as addresses. I used it to transact to send SOL from one to another wallet. All of the wallets are derived from a seedphrase in the cli right now. We must make sure we can properly inject the provider once we have solved this in masa-react.
Networks
I added two of three solana networks to the networks collection that are flagged as "non evm" so we must ignore them when ever we do something evm related. In the cli the network switching worked like on all the other evm networks. I am not sure how a web provider like phantom would react on a network switch.
Utils
The tooling supplied by the solana web3 sdk itself is basic. I was able to send around SOL and do balance calculation based on that but i have not seen any tooling to access custom programs.
The text was updated successfully, but these errors were encountered:
We are planning to deploy contracts to solana. To be able to use them we have to attest the changes that are required to add the solana SDK to the masa sdk and make it connect to solana.
Acceptance Criteria
Output
Smart Contracts
There is no concept called smart contracts at Solana. Instead they follow a concept that is called Program. There is a default program called splToken which is very similar to ERC20 tokens on EVM and comes with its own factory. Based on the findings with the OFT implementation on Solana we might or might not use that Program for the Masa Token. To ship functionality like staking we need a custom staking program. There is no known code generation framework like we are using with ABIs and ethers.js so we might up ending keeping the using code and in the SDK and the contract itself in sync manually.
Wallets
My implementation of Solana here is based on a connection / keypair construct similar to the wallet construct from ethers.js. Since we are not exactly sure what a wallet connection in the browser would deliver we can go ahead with the keypair solution for now. It works very well in the cli. It enables us to use public keys as addresses. I used it to transact to send SOL from one to another wallet. All of the wallets are derived from a seedphrase in the cli right now. We must make sure we can properly inject the provider once we have solved this in masa-react.
Networks
I added two of three solana networks to the networks collection that are flagged as "non evm" so we must ignore them when ever we do something evm related. In the cli the network switching worked like on all the other evm networks. I am not sure how a web provider like phantom would react on a network switch.
Utils
The tooling supplied by the solana web3 sdk itself is basic. I was able to send around SOL and do balance calculation based on that but i have not seen any tooling to access custom programs.
The text was updated successfully, but these errors were encountered: