-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'jt/net-80-upgrade-diff-report-render' into jt/net-61-ci…
…-implementation
- Loading branch information
Showing
17 changed files
with
71 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
/// @title Library for reverting with custom errors efficiently | ||
/// @notice Contains functions for reverting with custom errors with different argument types efficiently | ||
/// @dev To use this library, declare `using CustomRevert for bytes4;` and replace `revert CustomError()` with | ||
/// `CustomError.selector.revertWith()` | ||
/// @dev The functions may tamper with the free memory pointer but it is fine since the call context is exited immediately | ||
library CustomRevert { | ||
/// @dev Reverts with the selector of a custom error in the scratch space | ||
function revertWith(bytes4 selector) internal pure { | ||
assembly ("memory-safe") { | ||
mstore(0, selector) | ||
revert(0, 0x04) | ||
} | ||
} | ||
|
||
/// @dev Reverts with a custom error with a uint256 argument in the scratch space | ||
function revertWith(bytes4 selector, uint256 value) internal pure { | ||
assembly ("memory-safe") { | ||
mstore(0, selector) | ||
mstore(0x04, value) | ||
revert(0, 0x24) | ||
} | ||
} | ||
|
||
/// @dev Reverts with a custom error with an address argument in the scratch space | ||
function revertWith(bytes4 selector, address addr) internal pure { | ||
assembly ("memory-safe") { | ||
mstore(0, selector) | ||
mstore(0x04, and(addr, 0xffffffffffffffffffffffffffffffffffffffff)) | ||
revert(0, 0x24) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"$schema": "node_modules/lerna/schemas/lerna-schema.json", | ||
"version": "0.0.59", | ||
"version": "0.0.61", | ||
"packages": ["packages/*", "protocol"], | ||
"npmClient": "yarn" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@river-build/dlog", | ||
"version": "0.0.59", | ||
"version": "0.0.61", | ||
"packageManager": "[email protected]", | ||
"type": "module", | ||
"main": "dist/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@river-build/encryption", | ||
"version": "0.0.59", | ||
"version": "0.0.61", | ||
"packageManager": "[email protected]", | ||
"type": "module", | ||
"main": "dist/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@river-build/eslint-config", | ||
"version": "0.0.59", | ||
"version": "0.0.61", | ||
"license": "MIT", | ||
"main": "typescript.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@river-build/generated", | ||
"version": "0.0.59", | ||
"version": "0.0.61", | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"preinstall": "node ./scripts/make-config.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@river-build/proto", | ||
"version": "0.0.59", | ||
"version": "0.0.61", | ||
"packageManager": "[email protected]", | ||
"type": "module", | ||
"main": "dist/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@river-build/sdk", | ||
"version": "0.0.59", | ||
"version": "0.0.61", | ||
"packageManager": "[email protected]", | ||
"type": "module", | ||
"main": "dist/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@river-build/web3", | ||
"version": "0.0.59", | ||
"version": "0.0.61", | ||
"packageManager": "[email protected]", | ||
"type": "module", | ||
"main": "dist/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@river-build/proto-source", | ||
"version": "0.0.59", | ||
"version": "0.0.61", | ||
"packageManager": "[email protected]", | ||
"files": [ | ||
"*.proto" | ||
|