-
Notifications
You must be signed in to change notification settings - Fork 1
Test CI/CD OpenZeppelin #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test CI/CD OpenZeppelin #7
Conversation
Co-authored-by: Ernesto García <ernestognw@gmail.com>
Co-authored-by: Ernesto García <ernestognw@gmail.com>
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com> Co-authored-by: Sam Bugs <101145325+0xsambugs@users.noreply.github.com> Co-authored-by: Ernesto García <ernestognw@gmail.com> Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com> Co-authored-by: wizard <112275929+famouswizard@users.noreply.github.com> Co-authored-by: leopardracer <136604165+leopardracer@users.noreply.github.com> Co-authored-by: cairo <cairoeth@protonmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Francisco Giordano <fg@frang.io> Co-authored-by: Simka <0xsimka@gmail.com> Co-authored-by: Voronor <129545215+voronor@users.noreply.github.com>
…5422) Co-authored-by: Ernesto García <ernestognw@gmail.com>
…sol (#5446) Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com> Co-authored-by: ernestognw <ernestognw@gmail.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: futreall <86553580+futreall@users.noreply.github.com> Co-authored-by: Marco <wudmytrotest200@gmail.com> Co-authored-by: Dmitry <98899785+mdqst@users.noreply.github.com> Co-authored-by: Dmytrol <46675332+Dimitrolito@users.noreply.github.com> Co-authored-by: Noisy <125606576+donatik27@users.noreply.github.com> Co-authored-by: Danil <37103154+Danyylka@users.noreply.github.com> Co-authored-by: CrazyFrog <anna.shuraeva13@gmail.com> Co-authored-by: Bryer <0xbryer@gmail.com> Co-authored-by: Viktor Pavlik <160131789+Vikt0rPavlik@users.noreply.github.com> Co-authored-by: Skylar Ray <137945430+sky-coderay@users.noreply.github.com> Co-authored-by: Brawn <nftdropped@gmail.com> Co-authored-by: fuder.eth <139509124+vtjl10@users.noreply.github.com> Co-authored-by: FT <140458077+zeevick10@users.noreply.github.com> Co-authored-by: Ann Wagner <chant_77_swirly@icloud.com> Co-authored-by: Hopium <135053852+Hopium21@users.noreply.github.com> Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com> Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com> Co-authored-by: Ernesto García <ernestognw@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…5429) Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com> Co-authored-by: Ernesto García <ernestognw@gmail.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Ernesto García <ernestognw@gmail.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
Reviewer's Guide by SourceryThis pull request introduces several new features and improvements, including a clear function for EnumerableSet and EnumerableMap, a Bytes32x2Set struct for EnumerableSet, trySafeTransfer and trySafeTransferFrom functions for SafeERC20, a GovernorProposalGuardian extension, a standard implementation of ERC6909, and metadata and content URI extensions for ERC6909. It also exposes the _isTrustedByTarget internal function in ERC2771Forwarder, adds a Calldata library, makes the receive function in TimelockController virtual, stops explicitly setting paused to false during construction in Pausable, and exposes efficientKeccak256 for hashing non-commutative pairs of bytes32. Updated class diagram for EnumerableSetclassDiagram
class EnumerableSet {
<<library>>
}
class Bytes32x2Set {
bytes32[2][] _values
mapping(bytes32 valueHash => uint256) _positions
add(bytes32[2] memory value) bool
remove(bytes32[2] memory value) bool
clear(Bytes32x2Set storage self) internal
contains(bytes32[2] memory value) bool
length() uint256
at(uint256 index) bytes32[2] memory
values() bytes32[2][] memory
_hash(bytes32[2] memory value) bytes32
}
EnumerableSet -- Bytes32x2Set : contains
Updated class diagram for EnumerableMapclassDiagram
class EnumerableMap {
<<library>>
}
EnumerableMap : +clear()
note for EnumerableMap "Adds a clear function to EnumerableMaps which deletes all entries in the map"
Updated class diagram for SafeERC20classDiagram
class SafeERC20 {
<<library>>
}
SafeERC20 : +trySafeTransfer(IERC20 token, address to, uint256 value) bool
SafeERC20 : +trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) bool
note for SafeERC20 "Adds trySafeTransfer and trySafeTransferFrom that do not revert and return false if the transfer is not successful."
Class diagram for GovernorProposalGuardianclassDiagram
class GovernorProposalGuardian {
address private _proposalGuardian
event ProposalGuardianSet(address oldProposalGuardian, address newProposalGuardian)
proposalGuardian() address
setProposalGuardian(address newProposalGuardian)
_setProposalGuardian(address newProposalGuardian)
_validateCancel(uint256 proposalId, address caller) bool
}
class Governor
Governor <|-- GovernorProposalGuardian
note for GovernorProposalGuardian "Adds a governance extension that defines a proposal guardian who can cancel proposals at any stage in their lifecycle."
Class diagram for ERC6909classDiagram
class ERC6909 {
mapping(address owner => mapping(uint256 id => uint256)) private _balances
mapping(address owner => mapping(address operator => bool)) private _operatorApprovals
mapping(address owner => mapping(address spender => mapping(uint256 id => uint256))) private _allowances
error ERC6909InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 id)
error ERC6909InsufficientAllowance(address spender, uint256 allowance, uint256 needed, uint256 id)
error ERC6909InvalidApprover(address approver)
error ERC6909InvalidReceiver(address receiver)
error ERC6909InvalidSender(address sender)
error ERC6909InvalidSpender(address spender)
supportsInterface(bytes4 interfaceId) bool
balanceOf(address owner, uint256 id) uint256
allowance(address owner, address spender, uint256 id) uint256
isOperator(address owner, address spender) bool
approve(address spender, uint256 id, uint256 amount) bool
setOperator(address spender, bool approved) bool
transfer(address receiver, uint256 id, uint256 amount) bool
transferFrom(address sender, address receiver, uint256 id, uint256 amount) bool
_mint(address to, uint256 id, uint256 amount)
_transfer(address from, address to, uint256 id, uint256 amount)
_burn(address from, uint256 id, uint256 amount)
_update(address from, address to, uint256 id, uint256 amount)
_approve(address owner, address spender, uint256 id, uint256 amount)
_setOperator(address owner, address spender, bool approved)
_spendAllowance(address owner, address spender, uint256 id, uint256 amount)
}
class Context
Context <|-- ERC6909
class ERC165
ERC165 <|-- ERC6909
note for ERC6909 "Adds a standard implementation of ERC6909."
Class diagram for ERC6909ContentURIclassDiagram
class ERC6909ContentURI {
string private _contractURI
mapping(uint256 id => string) private _tokenURIs
event ContractURIUpdated()
event URI(string value, uint256 indexed id)
contractURI() string
tokenURI(uint256 id) string
_setContractURI(string memory newContractURI)
_setTokenURI(uint256 id, string memory newTokenURI)
}
class ERC6909
ERC6909 <|-- ERC6909ContentURI
note for ERC6909ContentURI "Adds an extension of ERC6909 which adds content URI functionality."
Class diagram for ERC6909TokenSupplyclassDiagram
class ERC6909TokenSupply {
mapping(uint256 id => uint256) private _totalSupplies
totalSupply(uint256 id) uint256
_update(address from, address to, uint256 id, uint256 amount)
}
class ERC6909
ERC6909 <|-- ERC6909TokenSupply
note for ERC6909TokenSupply "Adds an extension of ERC6909 which tracks total supply for each token id."
Updated class diagram for ERC2771ForwarderclassDiagram
class ERC2771Forwarder
ERC2771Forwarder : +_isTrustedByTarget(address target) internal view virtual returns (bool)
note for ERC2771Forwarder "Exposes the `_isTrustedByTarget` internal function to check whether a target trusts the forwarder."
Class diagram for CalldataclassDiagram
class Calldata {
<<library>>
emptyBytes() bytes calldata
emptyString() string calldata
}
note for Calldata "Library with `emptyBytes` and `emptyString` functions to generate empty `bytes` and `string` calldata types."
Updated class diagram for TimelockControllerclassDiagram
class TimelockController
TimelockController : +receive() external payable virtual
note for TimelockController "Receive function is now virtual."
Updated class diagram for PausableclassDiagram
class Pausable
Pausable : -constructor()
note for Pausable "Stop explicitly setting `paused` to `false` during construction."
Updated class diagram for HashesclassDiagram
class Hashes {
<<library>>
}
Hashes : +efficientKeccak256(bytes32 a, bytes32 b) internal pure returns (bytes32)
note for Hashes "Expose `efficientKeccak256` for hashing non-commutative pairs of bytes32 without allocating extra memory."
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Updated dependencies detected. Learn more about Socket for GitHub ↗︎
|
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat is a license policy violation?This package is not allowed per your license policy. Review the package's license to ensure compliance. Find a package that does not violate your license policy or adjust your policy to allow this package's license. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Dargon789 - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding tests for the
clear
function inEnumerableSet.behavior.js
.
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟡 Complexity: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test CI/CD OpenZeppelin #7
Test CI/CD OpenZeppelin
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
9d08a58
into
Dargon789:circleci-project-setup
Fixes #????
PR Checklist
npx changeset add
)Summary by Sourcery
Add
clear
function to EnumerableSet and EnumerableMap. Add a new set type for pairs of bytes32. Expose an efficient hashing function for pairs of bytes32. Add non-reverting variants of SafeERC20 transfer functions. Expose an internal function in ERC2771Forwarder. Make TimelockController receive function virtual. Stop explicitly setting paused to false in Pausable constructor. Add ERC6909 standard implementation with extensions for metadata, token supply, and content URI. Add a library for calldata manipulation.New Features:
clear
function toEnumerableSet
andEnumerableMap
which deletes all values in the set or map respectively.Bytes32x2Set
toEnumerableSet
that handles (ordered) pairs of bytes32.efficientKeccak256
for hashing non-commutative pairs of bytes32 without allocating extra memory.trySafeTransfer
andtrySafeTransferFrom
toSafeERC20
that do not revert and return false if the transfer is not successful._isTrustedByTarget
internal function inERC2771Forwarder
to check whether a target trusts the forwarder.TimelockController
receive function virtual.paused
tofalse
during construction inPausable
.ERC6909Metadata
extension which adds metadata functionality.ERC6909TokenSupply
extension which tracks total supply for each token id.ERC6909ContentURI
extension which adds content URI functionality.Calldata
library withemptyBytes
andemptyString
functions to generate emptybytes
andstring
calldata types respectively