Skip to content

Commit

Permalink
Install solidity string utils
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnGuilding committed Oct 30, 2024
1 parent 2cd37e2 commit 57de2b2
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 18 deletions.
7 changes: 4 additions & 3 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
"lint": "solhint 'src/**/*.sol'"
},
"dependencies": {
"@matterlabs/zksync-contracts": "^0.6.1",
"@openzeppelin/contracts": "^5.0.0",
"@openzeppelin/contracts-upgradeable": "^5.0.0",
"@zk-email/contracts": "^6.3.0",
"@matterlabs/zksync-contracts": "^0.6.1",
"solady": "^0.0.123"
"solady": "^0.0.123",
"solidity-stringutils": "github:LayerZero-Labs/solidity-stringutils"
},
"devDependencies": {
"ds-test": "https://github.com/dapphub/ds-test",
Expand All @@ -28,4 +29,4 @@
"README.md",
"remappings.txt"
]
}
}
3 changes: 2 additions & 1 deletion packages/contracts/remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
forge-std/=../../node_modules/forge-std/src
ds-test/=../../node_modules/ds-test/src
solady/=../../node_modules/solady/src/
accountabstraction/=../../node_modules/accountabstraction/
accountabstraction/=../../node_modules/accountabstraction/
solidity-stringutils/=../../node_modules/solidity-stringutils/
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@
pragma solidity ^0.8.25;

import {console} from "forge-std/console.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {StringUtils} from "src/libraries/StringUtils.sol";
import {StructHelper} from "../../../helpers/StructHelper.sol";

contract StringUtils_HexToBytes_Fuzz_Test is StructHelper {
using Strings for uint256;

function setUp() public override {
super.setUp();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;

import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
import { StringUtils } from "src/libraries/StringUtils.sol";
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
import { StructHelper } from "../../../helpers/StructHelper.sol";

contract StringUtils_HexToBytes32_Fuzz_Test is StructHelper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
pragma solidity ^0.8.25;

import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
import { strings } from "solidity-stringutils/src/strings.sol";
import { StringUtils } from "src/libraries/StringUtils.sol";
import {StructHelper} from "../../helpers/StructHelper.sol";

contract StringUtils_HexToBytes_Test is StructHelper {
using Strings for uint256;
using strings for *;

function setUp() public override {
super.setUp();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;

import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
import { strings } from "solidity-stringutils/src/strings.sol";
import { StringUtils } from "src/libraries/StringUtils.sol";
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
import {StructHelper} from "../../helpers/StructHelper.sol";

contract StringUtils_HexToBytes32_Test is StructHelper {
using Strings for uint256;
using strings for *;


function setUp() public override {
super.setUp();
}
Expand Down
8 changes: 6 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3958,9 +3958,9 @@ node-int64@^0.4.0:
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==

"node-pre-gyp-github@git+https://github.com/ultamatt/node-pre-gyp-github.git":
"node-pre-gyp-github@https://github.com/ultamatt/node-pre-gyp-github.git":
version "1.4.3"
resolved "git+https://github.com/ultamatt/node-pre-gyp-github.git#e4961827f77751489bc8d4760a0479f3f985f34f"
resolved "https://github.com/ultamatt/node-pre-gyp-github.git#e4961827f77751489bc8d4760a0479f3f985f34f"
dependencies:
"@octokit/rest" "^15.9.5"
commander "^2.17.0"
Expand Down Expand Up @@ -4513,6 +4513,10 @@ solhint@^3.6.1:
optionalDependencies:
prettier "^2.8.3"

"solidity-stringutils@github:LayerZero-Labs/solidity-stringutils":
version "0.0.1"
resolved "https://codeload.github.com/LayerZero-Labs/solidity-stringutils/tar.gz/eb21d6b502c2741145ab2a90f5f5b4fda9dfb218"

source-map-support@0.5.13:
version "0.5.13"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932"
Expand Down

0 comments on commit 57de2b2

Please sign in to comment.