Skip to content

Commit

Permalink
Remove old Solidity code & move misplaced files (#15852)
Browse files Browse the repository at this point in the history
* rm dead code

* move ChainSpecificUtil_v0_8_6.sol to vrf

* remove flags

* move chainlink client to operatorforwarder

* move automation test wrappers to automation

* more automation cleanup

* move interfaces to operatorforwarder

* remove TypeAndVersionInterface.sol in favor of ITypeAndVersion

* move and remove mocks

* move ChainSpecificUtil to shared

* move more testhelpers

* move MockV3Aggregator

* move logpoller related contracts to shared

* clean up broken references

* fix broken ref

* rebase

* fix lint & compile feeds

* gen wrapper for ITypeAndVersion

* fix lint
  • Loading branch information
RensR authored Jan 8, 2025
1 parent 9bcb3db commit fcefd62
Show file tree
Hide file tree
Showing 180 changed files with 416 additions and 3,111 deletions.
5 changes: 5 additions & 0 deletions .changeset/cold-coats-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal minor rename of various gethwrappers
3 changes: 0 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,11 @@ core/scripts/gateway @smartcontractkit/dev-services
/contracts/src/v0.8/automation @smartcontractkit/dev-services
/contracts/src/v0.8/ccip @smartcontractkit/ccip-onchain
/contracts/src/v0.8/functions @smartcontractkit/dev-services
# TODO: interfaces folder, folder should be removed and files moved to the correct folders
/contracts/src/v0.8/l2ep @smartcontractkit/bix-build
/contracts/src/v0.8/llo-feeds @smartcontractkit/data-streams-engineers
# TODO: mocks folder, folder should be removed and files moved to the correct folders
/contracts/src/v0.8/operatorforwarder @smartcontractkit/data-feeds-engineers
/contracts/src/v0.8/shared @smartcontractkit/core-solidity
# TODO: tests folder, folder should be removed and files moved to the correct folders
# TODO: transmission folder, owner should be found
/contracts/src/v0.8/vrf @smartcontractkit/dev-services
/contracts/src/v0.8/keystone @smartcontractkit/keystone
/contracts/src/v0.8/workflow @smartcontractkit/dev-services
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/solidity-foundry-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ jobs:
- '!contracts/src/v0.8/**/*.t.sol'
- '!contracts/src/v0.8/*.t.sol'
- '!contracts/src/v0.8/**/testhelpers/**'
- '!contracts/src/v0.8/testhelpers/**'
- '!contracts/src/v0.8/vendor/**'
other_shared:
- modified|added: 'contracts/src/v0.8/(interfaces/**/*.sol|*.sol)'
Expand Down
5 changes: 5 additions & 0 deletions contracts/.changeset/angry-needles-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chainlink/contracts': minor
---

#internal Removal and moving of various older Solidity contracts. Unused test helpers are removed, used files are now in their proper product folders
3 changes: 0 additions & 3 deletions contracts/STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,6 @@ All contracts will expose a `typeAndVersion` constant.
The string has the following format: `<contract name><SPACE><semver>-<dev>` with the `-dev` part only being applicable to contracts that have not been fully released.
Try to fit it into 32 bytes to keep the impact on contract sizes minimal.

Note that `ITypeAndVersion` should be used, not `TypeAndVersionInterface`.





Expand Down
2 changes: 0 additions & 2 deletions contracts/scripts/lcov_prune
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ exclusion_list_ccip=(
"src/v0.8/ccip/libraries/USDPriceWith18Decimals.sol"
"src/v0.8/ccip/libraries/MerkleMultiProof.sol"
"src/v0.8/ccip/libraries/Pool.sol"
"src/v0.8/ConfirmedOwnerWithProposal.sol"
"src/v0.8/tests/MockV3Aggregator.sol"
"src/v0.8/ccip/applications/CCIPClientExample.sol"
"src/v0.8/keystone/*"
)
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 automation events_mock feeds functions keystone llo-feeds logpoller operatorforwarder shared vrf ccip liquiditymanager workflow
for product in automation events_mock feeds functions keystone llo-feeds operatorforwarder shared vrf ccip liquiditymanager workflow
do
$SCRIPTPATH/native_solc_compile_all_$product
done
10 changes: 5 additions & 5 deletions contracts/scripts/native_solc_compile_all_automation
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ compileContract automation/testhelpers/UpkeepCounter.sol

compileContract automation/interfaces/StreamsLookupCompatibleInterface.sol

compileContract tests/VerifiableLoadUpkeep.sol
compileContract tests/VerifiableLoadStreamsLookupUpkeep.sol
compileContract tests/VerifiableLoadLogTriggerUpkeep.sol
compileContract tests/AutomationConsumerBenchmark.sol
compileContract tests/StreamsLookupUpkeep.sol
compileContract automation/testhelpers/VerifiableLoadUpkeep.sol
compileContract automation/testhelpers/VerifiableLoadStreamsLookupUpkeep.sol
compileContract automation/testhelpers/VerifiableLoadLogTriggerUpkeep.sol
compileContract automation/testhelpers/AutomationConsumerBenchmark.sol
compileContract automation/testhelpers/StreamsLookupUpkeep.sol

SOLC_VERSION="0.8.19"

Expand Down
4 changes: 2 additions & 2 deletions contracts/scripts/native_solc_compile_all_feeds
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ compileContract () {
}

# Aggregators
compileContract Chainlink.sol
compileContract ChainlinkClient.sol
compileContract operatorforwarder/Chainlink.sol
compileContract operatorforwarder/ChainlinkClient.sol
33 changes: 0 additions & 33 deletions contracts/scripts/native_solc_compile_all_logpoller

This file was deleted.

7 changes: 5 additions & 2 deletions contracts/scripts/native_solc_compile_all_shared
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,16 @@ compileContract() {
$command
}

compileContract interfaces/AggregatorV3Interface
compileContract interfaces/ITypeAndVersion
compileContract token/ERC677/BurnMintERC677
compileContract token/ERC677/LinkToken
compileContract token/ERC20/BurnMintERC20
compileContract test/helpers/ChainReaderTester
compileContract test/helpers/LogEmitter
compileContract test/helpers/VRFLogEmitter
compileContract mocks/MockV3Aggregator
compileContract mocks/WERC20Mock
compileContract interfaces/AggregatorV3Interface

compileContract openzeppelin-solidity/v4.8.3/contracts/token/ERC20/ERC20 vendor
compileContract multicall/ebd8b64/src/Multicall3 vendor
compileContract MockV3Aggregator tests
28 changes: 0 additions & 28 deletions contracts/src/v0.8/Denominations.sol

This file was deleted.

124 changes: 0 additions & 124 deletions contracts/src/v0.8/Flags.sol

This file was deleted.

65 changes: 0 additions & 65 deletions contracts/src/v0.8/PermissionedForwardProxy.sol

This file was deleted.

Loading

0 comments on commit fcefd62

Please sign in to comment.