-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from flashbots/update-readmep
Update README
- Loading branch information
Showing
4 changed files
with
43 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
TestContract:testBar() (gas: 401) | ||
TestTransactions:testLegacyTransactionRLPEncoding() (gas: 163969) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,41 @@ | ||
# <h1 align="center"> Suave-std </h1> | ||
# Suave-std | ||
|
||
Suave Standard library (`suave-std`) is a collection of helpful contracts and libraries to build Suapps. | ||
|
||
## Installation | ||
|
||
To install with [Foundry](https://github.com/foundry-rs/foundry): | ||
|
||
```bash | ||
forge install flashbots/suave-std | ||
``` | ||
|
||
## Libraries | ||
|
||
### Transactions.sol | ||
|
||
Helper library that defines types and encoding/decoding methods for the Ethereum transaction types. | ||
|
||
#### Example usage | ||
|
||
```solidity | ||
import "suave-std/Transactions.sol"; | ||
contract Example { | ||
function example() { | ||
Transactions.Legacy memory legacyTxn0 = Transactions.Legacy({ | ||
to: address(0x095E7BAea6a6c7c4c2DfeB977eFac326aF552d87), | ||
gas: 50000, | ||
gasPrice: 10, | ||
value: 10, | ||
... | ||
}); | ||
// Encode to RLP | ||
bytes memory rlp = Transactions.encodeRLP(legacyTxn0); | ||
// Decode from RLP | ||
Transactions.Legacy memory legacyTxn1 = Transactions.decodeRLP(rlp); | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
[profile.ci.fuzz] | ||
runs = 10_000 | ||
solc_version = "0.8.23" |