-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build!: upgrade all packages + root to latest Hardhat version and eth…
…ers v6 (#889)
- Loading branch information
Showing
199 changed files
with
8,308 additions
and
10,918 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
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.4; | ||
|
||
/** | ||
* @title sample contract used for testing | ||
*/ | ||
contract BothCallReturnMagicValue { | ||
function lsp20VerifyCall( | ||
address /*caller*/, | ||
uint256 /*value*/, | ||
bytes memory /*data*/ | ||
) external pure returns (bytes4 magicValue) { | ||
return | ||
bytes4( | ||
abi.encodePacked( | ||
bytes3(BothCallReturnMagicValue.lsp20VerifyCall.selector), | ||
hex"01" | ||
) | ||
); | ||
} | ||
|
||
function lsp20VerifyCallResult( | ||
bytes32 /*callHash*/, | ||
bytes memory /*result*/ | ||
) external pure returns (bytes4) { | ||
return BothCallReturnMagicValue.lsp20VerifyCallResult.selector; | ||
} | ||
} |
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,31 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.4; | ||
|
||
/** | ||
* @title sample contract used for testing | ||
*/ | ||
contract FirstCallReturnMagicValue { | ||
function lsp20VerifyCall( | ||
address /*caller*/, | ||
uint256 /*value*/, | ||
bytes memory /*data*/ | ||
) external pure returns (bytes4 magicValue) { | ||
return | ||
bytes4( | ||
abi.encodePacked( | ||
bytes3(FirstCallReturnMagicValue.lsp20VerifyCall.selector), | ||
hex"00" | ||
) | ||
); | ||
} | ||
|
||
/** | ||
* @dev should not be called | ||
*/ | ||
function lsp20VerifyCallResult( | ||
bytes32 /*callHash*/, | ||
bytes memory /*result*/ | ||
) external pure returns (bytes4) { | ||
revert("This revert will not be triggered"); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
contracts/Mocks/LSP20Owners/SecondCallReturnExpandedValue.sol
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,39 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.4; | ||
|
||
/** | ||
* @title sample contract used for testing | ||
*/ | ||
contract SecondCallReturnExpandedValue { | ||
function lsp20VerifyCall( | ||
address /*caller*/, | ||
uint256 /*value*/, | ||
bytes memory /*data*/ | ||
) external pure returns (bytes4 magicValue) { | ||
return | ||
bytes4( | ||
abi.encodePacked( | ||
bytes3( | ||
SecondCallReturnExpandedValue.lsp20VerifyCall.selector | ||
), | ||
hex"01" | ||
) | ||
); | ||
} | ||
|
||
function lsp20VerifyCallResult( | ||
bytes32 /*callHash*/, | ||
bytes memory /*result*/ | ||
) external pure returns (bytes32) { | ||
return | ||
bytes32( | ||
bytes.concat( | ||
bytes4( | ||
SecondCallReturnExpandedValue | ||
.lsp20VerifyCallResult | ||
.selector | ||
) | ||
) | ||
); | ||
} | ||
} |
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
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
Oops, something went wrong.