Skip to content

Commit

Permalink
Set the scene for the mainnet deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
af-afk committed Oct 17, 2024
1 parent 30215ae commit fbebdbf
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/deploy-spn-mainnet-graph.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Deploy SPN Mainnet Longtail graph

on:
push:
branches:
- development
paths:
- 'lib/**'
- 'config/**'
- 'cmd/graphql.ethereum/**'

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- name: Checkout code
uses: actions/checkout@v2

- name: Go Build Cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}

- name: Go Mod Cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.23.2'

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y zip
- name: Build lambda zip
run: |
cd cmd/graphql.ethereum
make lambda
- name: Deploy to AWS Lambda
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ap-southeast-2
run: |
aws lambda update-function-code --function-name longtail-mainnet-graph \
--zip-file fileb://cmd/graphql.ethereum/bootstrap.zip >&2 >/dev/null
20 changes: 20 additions & 0 deletions pkg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,26 @@ Longtail is Arbitrum's cheapest and most rewarding AMM.

### Deployments

#### Superposition Mainnet

[Superposition RPC](https://docs.superposition.so/superposition-mainnet/network-details)

##### AMM contract deployments

| Deployment name | Deployment address |
|--------------------------------|--------------------------------------------|
| Longtail AMM | |
| Longtail NFT manager | |
| Permit2 router | |
| Swaps implementation | |
| Swaps permit2 A implementation | |
| Quotes implementation | |
| Positions implementation | |
| Update position implementation | |
| Admin implementation | |
| Adjust position implementation | |
| Swaps permit2 B implementation | |

#### Superposition Testnet

[Superposition RPC](https://docs.superposition.so/superposition-testnet/network-details)
Expand Down
13 changes: 13 additions & 0 deletions pkg/seawater/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,19 @@ impl Pools {
Ok(())
}

/// Update the operator that's trusted to call certain trusted functions.
#[allow(non_snake_case)]
pub fn update_seawater_admin_D25_D_364_D(&mut self, admin: Address) -> Result<(), Revert> {
assert_eq_or!(
msg::sender(),
self.seawater_admin.get(),
Error::SeawaterAdminOnly
);

self.seawater_admin.set(admin);

Ok(())
}
/// Update the emergency council that can disable the pools.
#[allow(non_snake_case)]
pub fn update_emergency_council_7_D_0_C_1_C_58(
Expand Down
4 changes: 4 additions & 0 deletions pkg/sol/ISeawaterExecutors.sol
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ interface ISeawaterExecutorAdminExposed {
/// @param manager address to set to in its new form
function updateNftManager9BDF41F6(address manager) external;

/// @notice set the new admin.
/// @param operator to replace the existing operator with
function updateSeawaterAdminD25D364D(address operator) external;

/// @notice updateEmergencyCouncil to a new address.
/// @param newCouncil to set the emergency council to
function updateEmergencyCouncil7D0C1C58(address newCouncil) external;
Expand Down
5 changes: 5 additions & 0 deletions pkg/sol/SeawaterAMM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ contract SeawaterAMM is ISeawaterAMM {
directDelegate(_getExecutorAdmin());
}

/// @inheritdoc ISeawaterExecutorAdminExposed
function updateSeawaterAdminD25D364D(address /* operator */) external {
directDelegate(_getExecutorAdmin());
}

/// @inheritdoc ISeawaterExecutorAdminExposed
function updateEmergencyCouncil7D0C1C58(address /* council */) external {
directDelegate(_getExecutorAdmin());
Expand Down

0 comments on commit fbebdbf

Please sign in to comment.