Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Solidity 0.6 & 0.7 code #12578

Merged
merged 14 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/witty-jeans-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

Remove 0.6 and 0.7 Solidity source code
9 changes: 4 additions & 5 deletions .github/workflows/solidity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ jobs:
- 'contracts/**/*'
- '.github/workflows/solidity.yml'
- '.github/workflows/solidity-foundry.yml'
old_sol:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Afaik @smartcontractkit/keepers has some frozen code that should be included here so I'll keep this logic around. I've added the deprecated interface folder here for now, as no files should be added there

- 'contracts/src/v0.6/**/*'
- 'contracts/src/v0.7/**/*'
read_only_sol:
- 'contracts/src/v0.8/interfaces/**/*'

- name: Fail if read-only files have changed
if: ${{ steps.changes.outputs.old_sol == 'true' }}
if: ${{ steps.changes.outputs.read_only_sol == 'true' }}
run: |
echo "One or more read-only Solidity file(s) has changed."
for file in ${{ steps.changes.outputs.old_sol_files }}; do
for file in ${{ steps.changes.outputs.read_only_sol_files }}; do
echo "$file was changed"
done
exit 1
Expand Down
5 changes: 5 additions & 0 deletions contracts/.changeset/nine-comics-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@chainlink/contracts": minor
---

Removed 0.6 and 0.7 Solidity source code
2 changes: 0 additions & 2 deletions contracts/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ node_modules
solc
LinkToken.json
typechain
src/v0.6
src/v0.7
**/vendor

# Ignore TS definition and map files
Expand Down
9 changes: 7 additions & 2 deletions contracts/.solcover.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
module.exports = {
skipFiles: [
'v0.6/',
'v0.7/',
'v0.8/mocks',
'v0.8/interfaces',
'v0.8/vendor',
'v0.8/tests',
'v0.8/dev/interfaces',
'v0.8/dev/vendor',
'v0.8/dev/Keeper2_0/interfaces',
'v0.8/dev/transmission',
'v0.8/tests',
'v0.8/automation/testhelpers',
'v0.8/shared',
'v0.8/vrf/testhelpers',
'v0.8/vrf/mocks',
'v0.8/llo-feeds/test',
'v0.8/functions/tests',
],
istanbulReporter: ['text', 'text-summary', 'json'],
mocha: {
Expand Down
4 changes: 0 additions & 4 deletions contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ $ npm install @chainlink/contracts --save
```sh
@chainlink/contracts
├── src # Solidity contracts
│ ├── v0.6
│ ├── v0.7
│ └── v0.8
└── abi # ABI json output
├── v0.6
├── v0.7
└── v0.8
```

Expand Down
16 changes: 11 additions & 5 deletions contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test = 'src/v0.8/functions/tests/v1_X'
gas_price = 3_000_000_000 # 3 gwei

[profile.vrf]
optimizer_runs = 1000
optimizer_runs = 1_000
src = 'src/v0.8/vrf'
test = 'test/v0.8/foundry/vrf' # skips tests for no VRF foundry tests

Expand All @@ -36,18 +36,18 @@ optimizer_runs = 1_000_000
src = 'src/v0.8/vrf'

[profile.automation]
optimizer_runs = 10000
optimizer_runs = 10_000
src = 'src/v0.8/automation'
test = 'src/v0.8/automation/test'

[profile.l2ep]
optimizer_runs = 1000000
optimizer_runs = 1_000_000
src = 'src/v0.8/l2ep'
test = 'src/v0.8/l2ep/test'
solc_version = '0.8.19'

[profile.llo-feeds]
optimizer_runs = 1000000
optimizer_runs = 1_000_000
src = 'src/v0.8/llo-feeds'
test = 'src/v0.8/llo-feeds/test'
solc_version = '0.8.19'
Expand All @@ -59,8 +59,14 @@ src = 'src/v0.8/keystone'
test = 'src/v0.8/keystone/test'
optimizer_runs = 10_000

[profile.operatorforwarder]
optimizer_runs = 1_000_000
solc_version = '0.8.19'
src = 'src/v0.8/operatorforwarder'
test = 'src/v0.8/operatorforwarder/test'

[profile.shared]
optimizer_runs = 1000000
optimizer_runs = 1_000_000
src = 'src/v0.8/shared'
test = 'src/v0.8/shared/test'
solc_version = '0.8.19'
Expand Down
8 changes: 0 additions & 8 deletions contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ let config = {
},
solidity: {
compilers: [
{
version: '0.6.6',
settings: COMPILER_SETTINGS,
},
{
version: '0.7.6',
settings: COMPILER_SETTINGS,
},
{
version: '0.8.6',
settings: COMPILER_SETTINGS,
Expand Down
2 changes: 1 addition & 1 deletion contracts/scripts/native_solc_compile_all
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ python3 -m pip install --require-hashes -r $SCRIPTPATH/requirements.txt
# 6 and 7 are legacy contracts, for each other product we have a native_solc_compile_all_$product script
# These scripts can be run individually, or all together with this script.
# To add new CL products, simply write a native_solc_compile_all_$product script and add it to the list below.
for product in 6 7 automation events_mock feeds functions keystone llo-feeds logpoller operatorforwarder shared transmission vrf
for product in automation events_mock feeds functions keystone llo-feeds logpoller operatorforwarder shared transmission vrf
do
$SCRIPTPATH/native_solc_compile_all_$product
done
47 changes: 0 additions & 47 deletions contracts/scripts/native_solc_compile_all_6

This file was deleted.

45 changes: 0 additions & 45 deletions contracts/scripts/native_solc_compile_all_7

This file was deleted.

2 changes: 1 addition & 1 deletion contracts/scripts/prepublish_generate_abi_folder
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; cd .. && pwd -P )"
TARGET="abi"

# For each version directory in src, copy the json files to the correct location
versions=( v0.6 v0.7 v0.8 )
versions=( v0.8 )
for version in "${versions[@]}"
do
rm -rf $SCRIPTPATH/$TARGET/$version
Expand Down
Loading
Loading