Skip to content

Commit

Permalink
fix(ctb): remove linked libraries from scripts and tests (#11426)
Browse files Browse the repository at this point in the history
* add additional address to exclude

* chore: make public library methods internal

* remove another public lib method

* remove additional public lib methods

* remove hardcoded assumption now that we know it's lib linking

* style: forge fmt
  • Loading branch information
mds1 authored Aug 9, 2024
1 parent cdfe8a8 commit b1dfa22
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/contracts-bedrock/scripts/ForgeArtifacts.sol
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ library ForgeArtifacts {
}

/// @notice Returns the storage layout for a deployed contract.
function getStorageLayout(string memory _name) public returns (string memory layout_) {
function getStorageLayout(string memory _name) internal returns (string memory layout_) {
string[] memory cmd = new string[](3);
cmd[0] = Executables.bash;
cmd[1] = "-c";
Expand All @@ -64,7 +64,7 @@ library ForgeArtifacts {
}

/// @notice Returns the abi from a the forge artifact
function getAbi(string memory _name) public returns (string memory abi_) {
function getAbi(string memory _name) internal returns (string memory abi_) {
string[] memory cmd = new string[](3);
cmd[0] = Executables.bash;
cmd[1] = "-c";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ library MIPSSyscalls {

uint32 internal constant SCHED_QUANTUM = 100_000;
/// @notice Start of the data segment.
uint32 public constant BRK_START = 0x40000000;
uint32 internal constant BRK_START = 0x40000000;

// SYS_CLONE flags
uint32 internal constant CLONE_VM = 0x100;
Expand Down
6 changes: 3 additions & 3 deletions packages/contracts-bedrock/test/safe-tools/SafeTestTools.sol
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ struct SafeInstance {

library Sort {
/// @dev Sorts an array of addresses in place
function sort(address[] memory arr) public pure returns (address[] memory) {
function sort(address[] memory arr) internal pure returns (address[] memory) {
LibSort.sort(arr);
return arr;
}
}

library SafeTestLib {
/// @dev The address of foundry's VM contract
address constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;
address internal constant VM_ADDR = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D;
/// @dev The address of the first owner in the linked list of owners
address constant SENTINEL_OWNERS = address(0x1);
address internal constant SENTINEL_OWNERS = address(0x1);

/// @dev Get the address from a private key
function getAddr(uint256 pk) internal pure returns (address) {
Expand Down

0 comments on commit b1dfa22

Please sign in to comment.