Skip to content

Commit

Permalink
feat: Open Sourcing Panoptic!
Browse files Browse the repository at this point in the history
  • Loading branch information
dyedm1 committed Sep 7, 2023
0 parents commit 6bb55ab
Show file tree
Hide file tree
Showing 151 changed files with 92,569 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Lint

on: [push]

jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 20

- name: Install dependencies
run: npm i && git add --renormalize .

- name: Run linters
uses: wearerequired/lint-action@v2
with:
github_token: ${{ secrets.github_token }}
continue_on_error: false
auto_fix: true
prettier: true
prettier_extensions: "css,html,json,jsx,md,sass,scss,ts,tsx,vue,yaml,yml,sol"
git_no_verify: true
git_email: [email protected]
94 changes: 94 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Tests
on: [push]
jobs:
foundry:
strategy:
fail-fast: true
name: Foundry suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Build
env:
FOUNDRY_PROFILE: test
run: |
forge --version
forge build
id: build
- name: Run Forge tests
env:
FOUNDRY_PROFILE: test
run: |
forge test --fork-url ${{ secrets.NODE_URL }} -vvv
id: forge-test

contract_sizes:
strategy:
fail-fast: true
name: Check contract size
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Build and check sizes (normal)
env:
FOUNDRY_PROFILE: ci_sizes
run: |
forge --version
forge build --sizes
id: build_normal
- name: Build and check sizes (via-IR)
env:
FOUNDRY_PROFILE: ci_sizes_ir
run: |
forge --version
forge build --sizes --skip PanopticHelper
id: build

deploy_sepolia:
strategy:
fail-fast: true
name: Deploy on Sepolia
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Build
run: |
forge --version
forge build
id: build
- name: Deploy factory on Sepolia
env:
DEPLOYER_PRIVATE_KEY: "0x375de66eef8034f72ad6736c91e68d94c1ff56ebaab41976bfdd5d875302fca1"
UNISWAP_V3_FACTORY: "0x3220B52A7f878a9DA5bc54C224e1bd34642dF65B"
WETH9: "0x3BbCB7bB7606C7afAad97e2c5135a97e94103B6f"
run: |
forge script deploy/DeployProtocol.s.sol:DeployProtocol --rpc-url sepolia -vvvv
id: deploy-protocol-sepolia
- name: Deploy new pool on Sepolia
env:
DEPLOYER_PRIVATE_KEY: "0x375de66eef8034f72ad6736c91e68d94c1ff56ebaab41976bfdd5d875302fca1"
UNISWAP_V3_FACTORY: "0x3220B52A7f878a9DA5bc54C224e1bd34642dF65B"
SFPM: "0x562A05400b793461F85DB478Cf0fcbBC30811217"
PANOPTIC_FACTORY: "0xE15EB47eA8A8f88A6204a90D3FC6a5a0372F1731"
run: |
forge script scripts/DeployTestPool.s.sol:DeployTestPool --rpc-url sepolia -vvvv
id: deploy-pool-sepolia
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
node_modules
mythx.json
.env
coverage
coverage.json
typechain

# Yarn files
yarn-error.log

#Hardhat files
cache
artifacts


.idea
tenderly.yaml
.vs/*
.DS_Store

.vscode

deployments
broadcast
15 changes: 15 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/openzeppelin/openzeppelin-contracts
[submodule "lib/solmate"]
path = lib/solmate
url = https://github.com/transmissions11/solmate
[submodule "lib/v3-core"]
path = lib/v3-core
url = https://github.com/Uniswap/v3-core
[submodule "lib/v3-periphery"]
path = lib/v3-periphery
url = https://github.com/Uniswap/v3-periphery
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
2 changes: 2 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
npx --no -- commitlint --edit
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test/hardhat-legacy
lib
package-lock.json
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"printWidth": 100,
"singleQuote": false,
"plugins": ["prettier-plugin-solidity"]
}
100 changes: 100 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
Business Source License 1.1

License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
"Business Source License" is a trademark of MariaDB Corporation Ab.

-----------------------------------------------------------------------------

Parameters

Licensor: Axicon Labs Limited

Licensed Work: Panoptic V1
The Licensed Work is (c) 2023 Axicon Labs Limited

Additional Use Grant: Any uses listed and defined at
v1-license-grants.panoptic.eth

Change Date: The earlier of 2027-09-07 or a date specified at
v1-license-date.panoptic.eth

Change License: GNU General Public License v2.0 or later

-----------------------------------------------------------------------------

Terms

The Licensor hereby grants you the right to copy, modify, create derivative
works, redistribute, and make non-production use of the Licensed Work. The
Licensor may make an Additional Use Grant, above, permitting limited
production use.

Effective on the Change Date, or the fourth anniversary of the first publicly
available distribution of a specific version of the Licensed Work under this
License, whichever comes first, the Licensor hereby grants you rights under
the terms of the Change License, and the rights granted in the paragraph
above terminate.

If your use of the Licensed Work does not comply with the requirements
currently in effect as described in this License, you must purchase a
commercial license from the Licensor, its affiliated entities, or authorized
resellers, or you must refrain from using the Licensed Work.

All copies of the original and modified Licensed Work, and derivative works
of the Licensed Work, are subject to this License. This License applies
separately for each version of the Licensed Work and the Change Date may vary
for each version of the Licensed Work released by Licensor.

You must conspicuously display this License on each original or modified copy
of the Licensed Work. If you receive the Licensed Work in original or
modified form from a third party, the terms and conditions set forth in this
License apply to your use of that work.

Any use of the Licensed Work in violation of this License will automatically
terminate your rights under this License for the current and all other
versions of the Licensed Work.

This License does not grant you any right in any trademark or logo of
Licensor or its affiliates (provided that you may use a trademark or logo of
Licensor as expressly required by this License).

TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
TITLE.

MariaDB hereby grants you permission to use this License’s text to license
your works, and to refer to it using the trademark "Business Source License",
as long as you comply with the Covenants of Licensor below.

-----------------------------------------------------------------------------

Covenants of Licensor

In consideration of the right to use this License’s text and the "Business
Source License" name and trademark, Licensor covenants to MariaDB, and to all
other recipients of the licensed work to be provided by Licensor:

1. To specify as the Change License the GPL Version 2.0 or any later version,
or a license that is compatible with GPL Version 2.0 or a later version,
where "compatible" means that software provided under the Change License can
be included in a program with software provided under GPL Version 2.0 or a
later version. Licensor may specify additional Change Licenses without
limitation.

2. To either: (a) specify an additional grant of rights to use that does not
impose any additional restriction on the right granted in this License, as
the Additional Use Grant; or (b) insert the text "None".

3. To specify a Change Date.

4. Not to modify this License in any other way.

-----------------------------------------------------------------------------

Notice

The Business Source License (this document, or the "License") is not an Open
Source license. However, the Licensed Work will eventually be made available
under an Open Source License, as stated in this License.
Loading

0 comments on commit 6bb55ab

Please sign in to comment.