Skip to content

Commit

Permalink
make withdraw and release function virtual
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroknots committed Dec 6, 2024
1 parent a5f6b0a commit afab0fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/solady
Submodule solady updated 87 files
+11 −10 .github/workflows/ci-all-via-ir.yml
+47 −16 .github/workflows/ci.yml
+41 −35 README.md
+11 −3 foundry.toml
+1 −1 package.json
+24 −0 prep/all.js
+67 −0 prep/common.js
+69 −0 prep/eof-compat-analysis.js
+50 −0 prep/gen-efficient-hash-lib.js
+49 −0 prep/gen-globalized-libs.js
+82 −0 prep/gen-safe-cast-lib.js
+16 −0 prep/remove-trailing-whitespace.js
+6 −1 src/Milady.sol
+67 −56 src/accounts/ERC1271.sol
+0 −7 src/accounts/ERC4337.sol
+0 −3 src/accounts/ERC6551.sol
+193 −0 src/accounts/ERC7821.sol
+334 −0 src/accounts/LibERC7579.sol
+0 −166 src/accounts/Pod.sol
+18 −1 src/accounts/Receiver.sol
+366 −0 src/accounts/Timelock.sol
+314 −0 src/auth/EnumerableRoles.sol
+12 −1 src/tokens/ERC20.sol
+458 −0 src/tokens/ERC20Votes.sol
+497 −150 src/utils/DynamicArrayLib.sol
+60 −151 src/utils/ECDSA.sol
+650 −153 src/utils/EfficientHashLib.sol
+6 −2 src/utils/EnumerableSetLib.sol
+86 −26 src/utils/FixedPointMathLib.sol
+659 −0 src/utils/LibBytes.sol
+220 −0 src/utils/LibCall.sol
+165 −40 src/utils/LibClone.sol
+10 −2 src/utils/LibRLP.sol
+112 −1 src/utils/LibSort.sol
+302 −557 src/utils/LibString.sol
+756 −0 src/utils/LibTransient.sol
+49 −9 src/utils/P256.sol
+123 −0 src/utils/ReentrancyGuardTransient.sol
+3 −3 src/utils/SSTORE2.sol
+58 −70 src/utils/SafeTransferLib.sol
+134 −291 src/utils/SignatureCheckerLib.sol
+336 −0 src/utils/WebAuthn.sol
+990 −0 src/utils/g/DynamicArrayLib.sol
+1,317 −0 src/utils/g/DynamicBufferLib.sol
+739 −0 src/utils/g/EnumerableSetLib.sol
+819 −0 src/utils/g/JSONParserLib.sol
+240 −0 src/utils/g/LibBitmap.sol
+663 −0 src/utils/g/LibBytes.sol
+318 −0 src/utils/g/LibMap.sol
+505 −0 src/utils/g/LibPRNG.sol
+395 −0 src/utils/g/LibRLP.sol
+969 −0 src/utils/g/LibString.sol
+765 −0 src/utils/g/LibTransient.sol
+572 −0 src/utils/g/MinHeapLib.sol
+721 −0 src/utils/g/RedBlackTreeLib.sol
+340 −0 src/utils/g/WebAuthn.sol
+254 −2 test/DynamicArrayLib.t.sol
+113 −39 test/ERC1271.t.sol
+584 −0 test/ERC20Votes.t.sol
+3 −8 test/ERC4337.t.sol
+151 −0 test/ERC7821.t.sol
+80 −0 test/EfficientHashLib.t.sol
+304 −0 test/EnumerableRoles.t.sol
+50 −0 test/EnumerableSetLib.t.sol
+57 −0 test/FixedPointMathLib.t.sol
+49 −0 test/LibBytes.t.sol
+59 −0 test/LibCall.t.sol
+88 −5 test/LibClone.t.sol
+285 −0 test/LibERC7579.t.sol
+104 −0 test/LibRLP.t.sol
+3 −0 test/LibSort.t.sol
+335 −0 test/LibString.t.sol
+251 −0 test/LibTransient.t.sol
+53 −19 test/P256.t.sol
+0 −149 test/Pod.t.sol
+115 −0 test/ReentrancyGuardTransient.t.sol
+87 −21 test/SafeTransferLib.t.sol
+161 −6 test/SignatureCheckerLib.t.sol
+390 −0 test/Timelock.t.sol
+249 −0 test/WebAuthn.t.sol
+15 −0 test/utils/TestPlus.sol
+8 −0 test/utils/mocks/MockERC1271Wallet.sol
+41 −0 test/utils/mocks/MockERC20Votes.sol
+33 −0 test/utils/mocks/MockERC7821.sol
+67 −0 test/utils/mocks/MockEnumerableRoles.sol
+0 −32 test/utils/mocks/MockPod.sol
+146 −0 test/utils/mocks/MockReentrancyGuardTransient.sol
2 changes: 1 addition & 1 deletion lib/soledge
4 changes: 2 additions & 2 deletions src/lib/SharedLogic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ contract SharedLogic is ConstructorLogic {
* @param amount The amount of tokens to transfer.
* @return Whether the transfer was successful.
*/
function _release(address from, address to, uint256 id, uint256 amount) internal returns (bool) {
function _release(address from, address to, uint256 id, uint256 amount) internal virtual returns (bool) {
assembly ("memory-safe") {
// Compute the sender's balance slot using the master slot seed.
mstore(0x20, _ERC6909_MASTER_SLOT_SEED)
Expand Down Expand Up @@ -94,7 +94,7 @@ contract SharedLogic is ConstructorLogic {
* @param amount The amount of tokens to burn and withdraw.
* @return Whether the withdrawal was successful.
*/
function _withdraw(address from, address to, uint256 id, uint256 amount) internal returns (bool) {
function _withdraw(address from, address to, uint256 id, uint256 amount) internal virtual returns (bool) {
// Set reentrancy guard due to external token transfers.
_setReentrancyGuard();

Expand Down

0 comments on commit afab0fe

Please sign in to comment.