Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
9645d523
Commit
9645d523
authored
Jul 13, 2021
by
github-actions
Browse files
Options
Browse Files
Download
Plain Diff
Merge upstream openzeppelin-contracts into upstream-patched
parents
37a95ee0
4e2641a9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
6 deletions
+6
-6
ERC1155.sol
contracts/token/ERC1155/ERC1155.sol
+2
-2
README.adoc
contracts/token/ERC20/README.adoc
+1
-1
ERC721.sol
contracts/token/ERC721/ERC721.sol
+1
-1
SignatureChecker.sol
contracts/utils/cryptography/SignatureChecker.sol
+1
-1
ERC165Checker.sol
contracts/utils/introspection/ERC165Checker.sol
+1
-1
No files found.
contracts/token/ERC1155/ERC1155.sol
View file @
9645d523
...
...
@@ -408,7 +408,7 @@ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
) private {
if (to.isContract()) {
try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
if (response != IERC1155Receiver
(to)
.onERC1155Received.selector) {
if (response != IERC1155Receiver.onERC1155Received.selector) {
revert("ERC1155: ERC1155Receiver rejected tokens");
}
} catch Error(string memory reason) {
...
...
@@ -431,7 +431,7 @@ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
bytes4 response
) {
if (response != IERC1155Receiver
(to)
.onERC1155BatchReceived.selector) {
if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
revert("ERC1155: ERC1155Receiver rejected tokens");
}
} catch Error(string memory reason) {
...
...
contracts/token/ERC20/README.adoc
View file @
9645d523
...
...
@@ -22,7 +22,7 @@ Additionally there are multiple custom extensions, including:
* {ERC20Permit}: gasless approval of tokens (standardized as ERC2612).
* {ERC20FlashMint}: token level support for flash loans through the minting and burning of ephemeral tokens (standardized as ERC3156).
* {ERC20Votes}: support for voting and vote delegation.
* {ERC20VotesComp}: support for voting and vote delegation (compatible with Compound's token
n
, with uint96 restrictions).
* {ERC20VotesComp}: support for voting and vote delegation (compatible with Compound's token, with uint96 restrictions).
* {ERC20Wrapper}: wrapper to create an ERC20 backed by another ERC20, with deposit and withdraw methods. Useful in conjunction with {ERC20Votes}.
Finally, there are some utilities to interact with ERC20 contracts in various ways.
...
...
contracts/token/ERC721/ERC721.sol
View file @
9645d523
...
...
@@ -374,7 +374,7 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver
(to)
.onERC721Received.selector;
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
...
...
contracts/utils/cryptography/SignatureChecker.sol
View file @
9645d523
...
...
@@ -24,7 +24,7 @@ library SignatureChecker {
) internal view returns (bool) {
if (Address.isContract(signer)) {
try IERC1271(signer).isValidSignature(hash, signature) returns (bytes4 magicValue) {
return magicValue == IERC1271
(signer)
.isValidSignature.selector;
return magicValue == IERC1271.isValidSignature.selector;
} catch {
return false;
}
...
...
contracts/utils/introspection/ERC165Checker.sol
View file @
9645d523
...
...
@@ -104,7 +104,7 @@ library ERC165Checker {
* Interface identification is specified in ERC-165.
*/
function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) {
bytes memory encodedParams = abi.encodeWithSelector(IERC165
(account)
.supportsInterface.selector, interfaceId);
bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);
(bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams);
if (result.length < 32) return false;
return success && abi.decode(result, (bool));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment