Skip to content

Commit 64546e2

Browse files
authored
Update README.md
1 parent 5c9e0d0 commit 64546e2

File tree

1 file changed

+53
-15
lines changed

1 file changed

+53
-15
lines changed

README.md

+53-15
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
<a href="https://github.com/bmresearch/Solnet/actions/workflows/dotnet.yml">
77
<img src="https://github.com/bmresearch/Solnet/actions/workflows/dotnet.yml/badge.svg"
88
alt="Build" ></a>
9-
<a href="https://github.com/bmresearch/Solnet/actions/workflows/publish.yml">
10-
<img src="https://github.com/bmresearch/Solnet/actions/workflows/publish.yml/badge.svg"
11-
alt="Release"></a>
129
<a href="https://coveralls.io/github/bmresearch/Solnet?branch=master">
1310
<img src="https://coveralls.io/repos/github/bmresearch/Solnet/badge.svg?branch=master"
1411
alt="Coverage Status" ></a>
@@ -64,15 +61,30 @@ for a list of other commonly needed programs see below:
6461
- [Serum](https://github.com/bmresearch/Solnet.Serum/)
6562
- [Mango](https://github.com/bmresearch/Solnet.Mango/)
6663
- [Pyth](https://github.com/bmresearch/Solnet.Pyth/)
64+
65+
Maintained by Bifrost <img src="https://avatars.githubusercontent.com/u/119550733?s=64&v=4" width=25 />
6766
- [Metaplex](https://github.com/bmresearch/Solnet.Metaplex/)
67+
- [Raydium](https://github.com/Bifrost-Technologies/Solnet.Raydium/)
68+
- [JupiterPerps](https://github.com/Bifrost-Technologies/Solnet.JupiterPerps)
69+
- [Moonshot](https://github.com/Bifrost-Technologies/Solnet.Moonshot)
70+
- [Pumpfun](https://github.com/Bifrost-Technologies/Solnet.Pumpfun)
71+
- [Ore](https://github.com/Bifrost-Technologies/Solnet.Ore)
6872

6973
## Requirements
70-
- net 5.0
74+
- net 6.0+ (minimum)
75+
- net 8.0+ (recommended)
7176

7277
## Dependencies
7378
- Chaos.NaCl.Standard
7479
- Portable.BouncyCastle
7580

81+
## Latest Nuget Packages
82+
- [Solnet.Rpc](https://www.nuget.org/packages/Solana.Rpc/)
83+
- [Solnet.Wallet](https://www.nuget.org/packages/Solana.Wallet/)
84+
- [Solnet.Programs](https://www.nuget.org/packages/Solana.Programs/)
85+
- [Solnet.Extensions](https://www.nuget.org/packages/Solana.Extensions/)
86+
- [Solnet.Keystore](https://www.nuget.org/packages/Solana.Keystore/)
87+
7688
## Examples
7789

7890
The [Solnet.Examples](https://github.com/bmresearch/Solnet/tree/master/src/Solnet.Examples/) project contains some code examples,
@@ -84,9 +96,14 @@ all you need to do is increment the value that is used to derive that account fr
8496
### Wallets
8597

8698
The [Solnet.Wallet](https://github.com/bmresearch/Solnet/tree/master/src/Solnet.Wallet/) project implements wallet and key generation features, these were made compatible
87-
with both the keys generated using `solana-keygen` and the keys generated using the popular browser wallet [sollet.io](https://www.sollet.io).
99+
with both the keys generated using `solana-keygen` and the keys generated using the popular browser wallet [Phantom](https://phantom.app/).
100+
101+
#### Initialize a keypair from a secret key
102+
```c#
103+
var account = Account.FromSecretKey("");
104+
```
88105

89-
#### Initializing a wallet compatible with sollet
106+
#### Initializing a wallet
90107

91108
```c#
92109
// To initialize a wallet and have access to the same keys generated in sollet (the default)
@@ -161,7 +178,10 @@ with both the [methods expected to be removed in v1.8](https://docs.solana.com/d
161178
The client factory allows you to pass a `Logger` which implements the `Microsoft.Extensions.Logging.ILogger` interface.
162179

163180
```c#
164-
var rpcClient = ClientFactory.GetClient(Cluster.MainNet, logger);
181+
var dev_rpcClient = ClientFactory.GetClient(Cluster.MainNet, logger);
182+
183+
var rpcClient = ClientFactory.GetClient("PAID RPC LINK HERE", logger);
184+
165185
var streamingRpcClient = ClientFactory.GetStreamingClient(Cluster.MainNet, logger);
166186
```
167187

@@ -201,6 +221,17 @@ var subscription = streaminRpcClient.SubscribeSignature(txSig.Result, (subscript
201221

202222
### Sending a transaction
203223

224+
#### *Important* Understanding priority fees
225+
Transactions poorly optimized for computation will result in a high drop rate. Always specify compute budget and compute price to make sure your transaction is properly processed. Reference existing transactions to figure out what other users interacting with the same programs are using for average fee price. This allows you to compete with other optimized transactions and increase the chance its always processed.
226+
227+
```c#
228+
var tx = new TransactionBuilder().
229+
AddInstruction(ComputeBudgetProgram.SetComputeUnitLimit(30000)).
230+
AddInstruction(ComputeBudgetProgram.SetComputeUnitPrice(1000000)).
231+
```
232+
233+
234+
204235
```c#
205236
// Initialize the rpc client and a wallet
206237
var rpcClient = ClientFactory.GetClient(Cluster.MainNet);
@@ -216,6 +247,8 @@ var blockHash = rpcClient.GetLatestBlockHash();
216247
var tx = new TransactionBuilder().
217248
SetRecentBlockHash(blockHash.Result.Value.Blockhash).
218249
SetFeePayer(fromAccount).
250+
AddInstruction(ComputeBudgetProgram.SetComputeUnitLimit(30000)).
251+
AddInstruction(ComputeBudgetProgram.SetComputeUnitPrice(1000000)).
219252
AddInstruction(MemoProgram.NewMemo(fromAccount, "Hello from Sol.Net :)")).
220253
AddInstruction(SystemProgram.Transfer(fromAccount, toAccount.GetPublicKey, 100000)).
221254
Build(fromAccount);
@@ -240,6 +273,8 @@ var initialAccount = wallet.GetAccount(22);
240273
var tx = new TransactionBuilder().
241274
SetRecentBlockHash(blockHash.Result.Value.Blockhash).
242275
SetFeePayer(ownerAccount).
276+
AddInstruction(ComputeBudgetProgram.SetComputeUnitLimit(30000)).
277+
AddInstruction(ComputeBudgetProgram.SetComputeUnitPrice(1000000)).
243278
AddInstruction(SystemProgram.CreateAccount(
244279
ownerAccount,
245280
mintAccount,
@@ -289,6 +324,8 @@ var newAccount = wallet.GetAccount(23);
289324
var tx = new TransactionBuilder().
290325
SetRecentBlockHash(blockHash.Result.Value.Blockhash).
291326
SetFeePayer(ownerAccount).
327+
AddInstruction(ComputeBudgetProgram.SetComputeUnitLimit(30000)).
328+
AddInstruction(ComputeBudgetProgram.SetComputeUnitPrice(1000000)).
292329
AddInstruction(SystemProgram.CreateAccount(
293330
ownerAccount,
294331
newAccount,
@@ -334,6 +371,8 @@ var recentHash = rpcClient.GetRecentBlockHash();
334371

335372
var tx = new TransactionBuilder().
336373
SetFeePayer(wallet.Account).
374+
AddInstruction(ComputeBudgetProgram.SetComputeUnitLimit(30000)).
375+
AddInstruction(ComputeBudgetProgram.SetComputeUnitPrice(1000000)).
337376
AddInstruction(memoInstruction).
338377
SetRecentBlockHash(recentHash.Result.Value.Blockhash).
339378
Build(wallet.Account);
@@ -353,6 +392,8 @@ PublicKey associatedTokenAccount =
353392
byte[] txBytes = new TransactionBuilder().
354393
SetRecentBlockHash(recentHash.Result.Value.Blockhash).
355394
SetFeePayer(ownerAccount).
395+
AddInstruction(ComputeBudgetProgram.SetComputeUnitLimit(30000)).
396+
AddInstruction(ComputeBudgetProgram.SetComputeUnitPrice(1000000)).
356397
AddInstruction(AssociatedTokenAccountProgram.CreateAssociatedTokenAccount(
357398
ownerAccount,
358399
associatedTokenAccountOwner,
@@ -423,23 +464,20 @@ var sig = tokenWallet.Send(source, 12.75M, target, txBuilder => txBuilder.Build(
423464
Console.WriteLine($"tx: {sig}");
424465
```
425466

426-
## Support
427-
428-
Consider supporting us:
429-
430-
* Sol Address: **oaksGKfwkFZwCniyCF35ZVxHDPexQ3keXNTiLa7RCSp**
431-
* [Mango Ref Link](https://trade.mango.markets/?ref=MangoSharp)
432-
433467

434468
## Contribution
435469

436470
We encourage everyone to contribute, submit issues, PRs, discuss. Every kind of help is welcome.
437471

438-
## Maintainers
472+
## Legacy Maintainers
439473

440474
* **Hugo** - [murlokito](https://github.com/murlokito)
441475
* **Tiago** - [tiago](https://github.com/tiago18c)
442476

477+
## Current Maintainers
478+
479+
* **Nathan** - [BifrostTitan](https://github.com/BifrostTitan)
480+
443481
See also the list of [contributors](https://github.com/bmresearch/Solnet/contributors) who participated in this project.
444482

445483
## License

0 commit comments

Comments
 (0)