Skip to content

Commit

Permalink
WIP: Temporarily run: pnpm copy:ccip-files
Browse files Browse the repository at this point in the history
  • Loading branch information
chainchad committed Feb 14, 2025
1 parent 248ea75 commit 098d073
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 119 deletions.
54 changes: 15 additions & 39 deletions contracts/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Chainlink Smart Contracts
# Chainlink CCIP Smart Contracts

## Installation

```sh
# via pnpm
$ pnpm add @chainlink/contracts
$ pnpm add @chainlink/contracts-ccip
# via npm
$ npm install @chainlink/contracts --save
$ npm install @chainlink/contracts-ccip --save
```

### Directory Structure

```sh
@chainlink/contracts
@chainlink/contracts-ccip
├── src # Solidity contracts
│ └── v0.8
└── abi # ABI json output
Expand All @@ -21,55 +21,31 @@ $ npm install @chainlink/contracts --save

### Usage

The solidity smart contracts themselves can be imported via the `src` directory of `@chainlink/contracts`:
The solidity smart contracts themselves can be imported via the `src` directory of `@chainlink/contracts-ccip`:

```solidity
import {AutomationCompatibleInterface} from '@chainlink/contracts/src/v0.8/AutomationCompatibleInterface.sol';
import '@chainlink/contracts-ccip/src/v0.8/ccip/applications/CCIPReceiver.sol';
```

## Local Development

Note: Contracts in `dev/` directories are under active development and are likely unaudited. Please refrain from using these in production applications.

```bash
# Clone Chainlink repository
$ git clone https://github.com/smartcontractkit/chainlink.git
# Continuing via pnpm
$ cd contracts/
$ pnpm
$ pnpm test
```

## Contributing

Please adhere to the [Solidity Style Guide](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/STYLE.md).

Contributions are welcome! Please refer to
[Chainlink's contributing guidelines](https://github.com/smartcontractkit/chainlink/blob/develop/docs/CONTRIBUTING.md) for detailed
contribution information.

Thank you!

### Changesets

We use [changesets](https://github.com/changesets/changesets) to manage versioning the contracts.

Every PR that modifies any configuration or code, should most likely accompanied by a changeset file.

To install `changesets`:
1. Install `pnpm` if it is not already installed - [docs](https://pnpm.io/installation).
2. Run `pnpm install`.

Either after or before you create a commit, run the `pnpm changeset` command in the `contracts` directory to create an accompanying changeset entry which will reflect on the CHANGELOG for the next release.
1. Install `pnpm` if it is not already installed - [docs](https://pnpm.io/installation).
2. Run `pnpm install`.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
Either after or before you create a commit, run the `pnpm changeset:ccip` command in the `contracts` directory to create an accompanying changeset entry which will reflect on the CHANGELOG for the next release.

and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## License
Most of the contracts are licensed under the [MIT](https://choosealicense.com/licenses/mit/) license.
An exception to this is the ccip folder, which defaults to be licensed under the [BUSL-1.1](./src/v0.8/ccip/LICENSE.md) license, however, there are a few exceptions

- `src/v0.8/ccip/applications/*` is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license
- `src/v0.8/ccip/interfaces/*` is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license
- `src/v0.8/ccip/libraries/{Client.sol, Internal.sol}` is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license
The CCIP repo is licensed under the [BUSL-1.1](./src/v0.8/ccip/LICENSE.md) license, however, there are a few exceptions

- `src/v0.8/ccip/applications/*` is licensed under the [MIT](./src/v0.8/ccip/LICENSE-MIT.md) license
- `src/v0.8/ccip/interfaces/*` is licensed under the [MIT](./src/v0.8/ccip/LICENSE-MIT.md) license
- `src/v0.8/ccip/libraries/{Client.sol, Internal.sol}` is licensed under the [MIT](./src/v0.8/ccip/LICENSE-MIT.md) license
118 changes: 38 additions & 80 deletions contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,97 +1,55 @@
{
"name": "@chainlink/contracts",
"version": "1.3.0",
"description": "Chainlink smart contracts",
"name": "@chainlink/contracts-ccip",
"version": "1.6.0",
"description": "Chainlink smart contracts for CCIP",
"author": "Chainlink devs",
"license": "BUSL-1.1",
"private": false,
"scripts": {
"test": "hardhat test --parallel",
"lint": "eslint --ext js,ts .",
"prettier:check": "prettier '**/*' --check --ignore-unknown",
"prettier:write": "prettier '**/*' --write --ignore-unknown",
"size": "hardhat size-contracts",
"clean": "hardhat clean",
"compile:native": "./scripts/native_solc_compile_all",
"compile": "hardhat compile",
"coverage": "hardhat coverage",
"prepublishOnly": "pnpm compile && ./scripts/prepublish_generate_abi_folder",
"publish-beta": "pnpm publish --tag beta",
"publish-prod": "pnpm publish --tag latest",
"solhint": "solhint --max-warnings 0 \"./src/v0.8/**/*.sol\"",
"solhint-test": "solhint --config \".solhint-test.json\" --ignore-path \".solhintignore-test\" --max-warnings 0 \"./src/v0.8/**/*.sol\"",
"changeset:ccip": "pushd . && cd ./release/ccip && changeset && popd",
"copy:ccip-files": "cp ./release/ccip/package.json ./ && cp ./release/ccip/README.md ./"
"publish-prod": "npm dist-tag add @chainlink/[email protected] latest",
"compile": "./scripts/native_solc_compile_all_ccip",
"prepublishOnly": "pnpm compile",
"verify:ccip-files": "diff ./release/ccip/package.json ./package.json && diff ./release/ccip/README.md ./README.md"
},
"files": [
"src/v0.8",
"abi/v0.8",
"!src/*/ccip/**",
"!src/*/liquiditymanager/**"
"foundry.toml",
"src/v0.8/ccip/**/*.sol",
"src/v0.8/shared/access/*.sol",
"src/v0.8/shared/call/CallWithExactGas.sol",
"src/v0.8/shared/enumerable/EnumerableMapBytes32.sol",
"src/v0.8/shared/enumerable/EnumerableMapAddresses.sol",
"src/v0.8/shared/enumerable/EnumerableSetWithBytes16.sol",
"src/v0.8/shared/interfaces/IOwnable.sol",
"src/v0.8/shared/interfaces/ITypeAndVersion.sol",
"src/v0.8/shared/interfaces/IERC677Receiver.sol",
"src/v0.8/shared/interfaces/AggregatorV3Interface.sol",
"src/v0.8/shared/interfaces/AccessControllerInterface.sol",
"src/v0.8/shared/token/**/*.sol",
"src/v0.8/shared/util/SortedSetValidationUtil.sol",
"src/v0.8/liquiditymanager/interfaces/ILiquidityContainer.sol",
"src/v0.8/keystone/interfaces/**/*",
"src/v0.8/keystone/KeystoneFeedsPermissionHandler.sol",
"src/v0.8/keystone/lib/KeystoneFeedDefaultMetadataLib.sol",
"src/v0.8/vendor/openzeppelin-solidity/v4.8.3",
"src/v0.8/vendor/openzeppelin-solidity/v5.0.2",
"src/v0.8/vendor/Context.sol",
"src/v0.8/vendor/Pausable.sol",
"abi/v0.8/",
"src/v0.8/ccip/LICENSE.md",
"src/v0.8/ccip/v1.5-CCIP-License-grants.md",
"!src/v0.8/ccip/test/**/*",
"src/v0.8/ccip/test/mocks/**/*",
"!src/v0.8/ccip/test/mocks/test/*",
"scripts/native_solc_compile_all_ccip"
],
"pnpm": {
"_comment": "See https://github.com/ethers-io/ethers.js/discussions/2849#discussioncomment-2696454",
"_comment2_logger": "See https://github.com/ethers-io/ethers.js/issues/379 we pin this version since that's what was used in the old yarn lockfile",
"overrides": {
"@ethersproject/logger": "5.0.6"
}
},
"engines": {
"node": ">=18",
"pnpm": ">=9"
},
"devDependencies": {
"@ethereum-waffle/mock-contract": "^3.4.4",
"@ethersproject/abi": "~5.7.0",
"@ethersproject/bignumber": "~5.7.0",
"@ethersproject/contracts": "~5.7.0",
"@ethersproject/providers": "~5.7.2",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.6",
"@nomicfoundation/hardhat-ethers": "^3.0.8",
"@nomicfoundation/hardhat-network-helpers": "^1.0.12",
"@nomicfoundation/hardhat-verify": "^2.0.12",
"@typechain/ethers-v5": "^7.2.0",
"@typechain/hardhat": "^7.0.0",
"@types/cbor": "~5.0.1",
"@types/chai": "^4.3.20",
"@types/debug": "^4.1.12",
"@types/deep-equal-in-any-order": "^1.0.4",
"@types/mocha": "^10.0.10",
"@types/node": "^20.17.17",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"abi-to-sol": "^0.6.6",
"cbor": "^5.2.0",
"chai": "^4.5.0",
"debug": "^4.4.0",
"deep-equal-in-any-order": "^2.0.6",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.3",
"ethers": "~5.7.2",
"hardhat": "~2.20.1",
"hardhat-abi-exporter": "^2.10.1",
"hardhat-ignore-warnings": "^0.2.12",
"moment": "^2.30.1",
"prettier": "^3.5.0",
"prettier-plugin-solidity": "^1.4.2",
"solhint": "^5.0.5",
"solhint-plugin-chainlink-solidity": "git+https://github.com/smartcontractkit/chainlink-solhint-rules.git#v1.2.1",
"solhint-plugin-prettier": "^0.1.0",
"ts-node": "^10.9.2",
"typechain": "^8.2.1",
"typescript": "^5.7.3"
},
"dependencies": {
"@arbitrum/nitro-contracts": "1.1.1",
"@arbitrum/token-bridge-contracts": "1.1.2",
"@changesets/cli": "~2.27.12",
"@changesets/cli": "~2.27.8",
"@changesets/get-github-info": "^0.6.0",
"@eth-optimism/contracts": "0.6.0",
"@openzeppelin/contracts": "4.9.3",
"@openzeppelin/contracts-upgradeable": "4.9.3",
"@scroll-tech/contracts": "0.1.0",
"@zksync/contracts": "git+https://github.com/matter-labs/era-contracts.git#446d391d34bdb48255d5f8fef8a8248925fc98b9",
"semver": "^7.7.1"
"semver": "^7.6.3"
}
}

0 comments on commit 098d073

Please sign in to comment.