Skip to content

Commit bf629d4

Browse files
frangioAmxxernestognw
committed
Update remappings.txt for upgradeable contracts and set up submodule (#4639)
Co-authored-by: Hadrien Croubois <[email protected]> Co-authored-by: Ernesto García <[email protected]> (cherry picked from commit abba0d0)
1 parent aef22bd commit bf629d4

File tree

16 files changed

+78
-34
lines changed

16 files changed

+78
-34
lines changed

.github/actions/setup/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ runs:
1515
run: npm ci
1616
shell: bash
1717
if: steps.cache.outputs.cache-hit != 'true'
18+
- name: Install Foundry
19+
uses: foundry-rs/foundry-toolchain@v1
20+
with:
21+
version: nightly

.github/workflows/checks.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ jobs:
5757
- name: Set up environment
5858
uses: ./.github/actions/setup
5959
- name: Copy non-upgradeable contracts as dependency
60-
run:
61-
cp -rnT contracts node_modules/@openzeppelin/contracts
60+
run: |
61+
mkdir -p lib/openzeppelin-contracts
62+
cp -rnT contracts lib/openzeppelin-contracts/contracts
6263
- name: Transpile to upgradeable
6364
run: bash scripts/upgradeable/transpile.sh
6465
- name: Run tests
@@ -78,10 +79,8 @@ jobs:
7879
- uses: actions/checkout@v4
7980
with:
8081
submodules: recursive
81-
- name: Install Foundry
82-
uses: foundry-rs/foundry-toolchain@v1
83-
with:
84-
version: nightly
82+
- name: Set up environment
83+
uses: ./.github/actions/setup
8584
- name: Run tests
8685
run: forge test -vv
8786

.github/workflows/upgradeable.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@ jobs:
2929
- run: bash scripts/git-user-config.sh
3030
- name: Transpile to upgradeable
3131
run: bash scripts/upgradeable/transpile-onto.sh ${{ github.ref_name }} origin/${{ github.ref_name }}
32+
env:
33+
SUBMODULE_REMOTE: https://github.com/${{ github.repository }}.git
3234
- run: git push origin ${{ github.ref_name }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ contracts-exposed
6363

6464
# Foundry
6565
/out
66+
/cache_forge
6667

6768
# Certora
6869
.certora*

contracts/proxy/utils/UUPSUpgradeable.sol

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import {ERC1967Utils} from "../ERC1967/ERC1967Utils.sol";
1515
* `UUPSUpgradeable` with a custom implementation of upgrades.
1616
*
1717
* The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
18-
*
19-
* @custom:stateless
2018
*/
2119
abstract contract UUPSUpgradeable is IERC1822Proxiable {
2220
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable

contracts/token/ERC1155/utils/ERC1155Holder.sol

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import {IERC1155Receiver} from "../IERC1155Receiver.sol";
1111
*
1212
* IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be
1313
* stuck.
14-
*
15-
* @custom:stateless
1614
*/
1715
abstract contract ERC1155Holder is ERC165, IERC1155Receiver {
1816
/**

contracts/token/ERC721/utils/ERC721Holder.sol

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import {IERC721Receiver} from "../IERC721Receiver.sol";
1111
* Accepts all token transfers.
1212
* Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or
1313
* {IERC721-setApprovalForAll}.
14-
*
15-
* @custom:stateless
1614
*/
1715
abstract contract ERC721Holder is IERC721Receiver {
1816
/**

contracts/utils/Context.sol

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ pragma solidity ^0.8.20;
1212
* is concerned).
1313
*
1414
* This contract is only required for intermediate, library-like contracts.
15-
*
16-
* @custom:stateless
1715
*/
1816
abstract contract Context {
1917
function _msgSender() internal view virtual returns (address) {

contracts/utils/Multicall.sol

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import {Address} from "./Address.sol";
77

88
/**
99
* @dev Provides a function to batch together multiple calls in a single external call.
10-
*
11-
* @custom:stateless
1210
*/
1311
abstract contract Multicall {
1412
/**

contracts/utils/introspection/ERC165.sol

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import {IERC165} from "./IERC165.sol";
1616
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
1717
* }
1818
* ```
19-
*
20-
* @custom:stateless
2119
*/
2220
abstract contract ERC165 is IERC165 {
2321
/**

0 commit comments

Comments
 (0)