-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* First version of the simulator * Add to pre-commit formatting * Refactor setup script * Add setupTestnet script * Small changes to TokenVault contract for easier integration with the actual pyth contract * Use price feed id as the name of WETH contract for consistency * Update docs * Update .gitignore * Update token vault searcher * Add value field to Adapter structs and logic * Add new command to setup a new searcher account from scratch * Clean up errors and add signatures * Implement bid on opportunity endpoint * Fix on searcher and vault monitor vault monitor needs to include value and WETH if necessary searcher uses the new endpoint for bidding * Setup poetry and replace autopep8 with black * Rename beacon server to liquidation server * Fix ci * Get hermes endpoint as parameter in simulator * Add interval option for simulator to create vaults periodically * Improve logging on per_sdk * Reduce ETH amounts to be more reasonable in actual testnets * Correct usage of chain_id in scripts * Minor refactor * Fix api docs * Remove the opportunity upon successful submission * Move error handling logic partly into auction Converting ContractError to RestErrors remain in api but logical error handling moved inside the auction module * Add build scripts * Use config for poll interval * Direct parsing of U256 and Signature using serde custom module * Add comment on why token names are pricefeed ids
- Loading branch information
Showing
52 changed files
with
8,187 additions
and
787 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Python Poetry | ||
description: Sets up a Python environment with Poetry | ||
|
||
inputs: | ||
python-version: | ||
required: false | ||
description: Python version | ||
default: "3.11" | ||
poetry-version: | ||
required: false | ||
description: Poetry version | ||
default: "1.6.1" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
- uses: abatilo/actions-poetry@v2.0.0 | ||
with: | ||
poetry-version: ${{ inputs.poetry-version }} | ||
- run: poetry -C per_sdk install | ||
shell: sh |
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 |
---|---|---|
|
@@ -15,3 +15,7 @@ api_keys.py | |
# env files | ||
*.env | ||
per_multicall/latestEnvironment.json | ||
|
||
**/target/ | ||
node_modules | ||
.idea |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use std::process::Command; | ||
|
||
fn main() { | ||
let contract_setup = r#" | ||
cd ../per_multicall | ||
forge build --via-ir | ||
"#; | ||
println!("cargo:rerun-if-changed=../per_multicall"); | ||
|
||
// Build the contracts and generate the ABIs. This is required for abigen! macro expansions to work. | ||
let output = Command::new("sh") | ||
.args(["-c", contract_setup]) | ||
.output() | ||
.expect("Failed to run build contracts command"); | ||
if !output.status.success() { | ||
panic!( | ||
"Failed to build contracts: {}", | ||
String::from_utf8_lossy(&output.stderr) | ||
); | ||
} else { | ||
println!( | ||
"Built all solidity contracts {}", | ||
String::from_utf8_lossy(&output.stdout) | ||
); | ||
} | ||
} |
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,5 +1,7 @@ | ||
chains: | ||
development: | ||
geth_rpc_addr: http://localhost:8545 | ||
contract_addr: 0xa513E6E4b8f2a923D98304ec87F64353C4D5C853 | ||
per_contract: 0xa513E6E4b8f2a923D98304ec87F64353C4D5C853 | ||
adapter_contract: 0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e | ||
legacy_tx: false | ||
poll_interval: 1 |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[toolchain] | ||
channel = "stable" |
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
Oops, something went wrong.