Skip to content
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

Update Contract #8

Open
wants to merge 421 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
421 commits
Select commit Hold shift + click to select a range
192c7dc
Merge pull request #613 from safe-global/v1.4.1/js-bundle-fix
mmv08 Jul 17, 2023
8e2bbf2
Merge pull request #614 from safe-global/release-branch/v1.4.1
mmv08 Jul 18, 2023
a2300ec
Merge branch 'main' of https://github.com/safe-global/safe-contracts …
mmv08 Jul 18, 2023
c67fbb6
Merge pull request #605 from jhoenicke/certoraOwnerReach
mmv08 Jul 18, 2023
3bf6291
Bump word-wrap from 1.2.3 to 1.2.4
dependabot[bot] Jul 18, 2023
943c779
fix inListReachable_preserve for setup
jhoenicke Jul 19, 2023
c0d299f
Merge pull request #619 from jhoenicke/certoraOwnerReach
mmv08 Jul 19, 2023
fca63a0
Merge pull request #618 from safe-global/dependabot/npm_and_yarn/word…
mmv08 Jul 19, 2023
e9e3d63
Add a rule for enabling modules
mmv08 Jul 20, 2023
e29557e
New rules to check correctness of functions
jhoenicke Jul 29, 2023
2f461f7
Updated configuration file
jhoenicke Jul 31, 2023
41377c9
add descriptions for asserts
jhoenicke Jul 31, 2023
d2dfe31
Merge pull request #620 from safe-global/certora/module-additions
mmv08 Jul 31, 2023
11fc95f
Merge pull request #629 from jhoenicke/certoraOwnerReach
mmv08 Jul 31, 2023
426e965
Feature: Module guard (#571)
akshay-ap Aug 1, 2023
f9a316b
Add overloaded `checkNSignatures` (#589)
akshay-ap Aug 1, 2023
8b040dd
Merge branch 'main' of github.com:safe-global/safe-contracts into rel…
mmv08 Aug 1, 2023
ac1b08c
Use safe-singleton-factory from safe-global namespace
mmv08 Aug 1, 2023
90f1482
Merge pull request #630 from safe-global/use-new-safe-singleton-factory
mmv08 Aug 1, 2023
8e015d7
Merge branch 'main' of github.com:safe-global/safe-contracts into rel…
mmv08 Aug 1, 2023
489213e
Update npm badge in the readme
mmv08 Aug 1, 2023
9ffb6e3
Merge pull request #631 from safe-global/update-readme-npm-badge
mmv08 Aug 1, 2023
e22af08
Merge pull request #599 from safe-global/release/v1.5.0
mmv08 Aug 1, 2023
4e41dbd
Merge branch 'main' of github.com:safe-global/safe-contracts into cer…
mmv08 Aug 1, 2023
a845451
Remove config, add github action to verify owners
mmv08 Aug 2, 2023
c866fbe
change code block language identifier
YanhuiJessica Aug 11, 2023
c778ae7
Merge pull request #634 from YanhuiJessica/main
mmv08 Aug 11, 2023
ed286e9
odule verification
mmv08 Aug 10, 2023
7d76797
Merge pull request #632 from safe-global/certoraOwnerReach
mmv08 Aug 11, 2023
39216f2
Merge branch 'main' of github.com:safe-global/safe-contracts into fv/…
mmv08 Aug 11, 2023
caaf7f2
Add an invariant that checks sentinel is never a module
mmv08 Aug 14, 2023
ce431e2
checkSignatures rule
teryanarmen Aug 14, 2023
af488f0
Merge pull request #635 from safe-global/fv/moduleReach
mmv08 Aug 17, 2023
58c87bc
add mySignatureSplit
teryanarmen Aug 18, 2023
2c40a9a
update spec for new interface
teryanarmen Aug 18, 2023
47e17a7
update harness with require in splitSig
teryanarmen Aug 18, 2023
214ddaa
Fix typo in buildSignatureBytes comment
mmv08 Aug 19, 2023
e17181e
Add 1.5.0 changelog
mmv08 Aug 18, 2023
acdb506
dependency bump
mmv08 Aug 21, 2023
2e3154d
Fix erc4337 test
mmv08 Aug 21, 2023
490b07e
bump hardhat & fix tests
mmv08 Aug 21, 2023
a5dfd61
bump hardhat & fix tests
mmv08 Aug 21, 2023
4d45391
Merge branch 'deps-bump' of github.com:safe-global/safe-contracts int…
mmv08 Aug 22, 2023
a6c28aa
tests fix
mmv08 Aug 23, 2023
52f439f
Merge pull request #642 from safe-global/main
teryanarmen Aug 23, 2023
8d47603
add more requires
teryanarmen Aug 23, 2023
949a09b
update script with more flags to deal with timeout
teryanarmen Aug 23, 2023
0ddb77c
remove settings that are unnecessary
teryanarmen Aug 23, 2023
4c1629b
fix benchmarks
mmv08 Aug 24, 2023
59e9cc6
split certora depth
mmv08 Aug 24, 2023
ae593d8
Fix unresolved setup call from the constructor
mmv08 Aug 25, 2023
414c044
add updates to checkSignatures
teryanarmen Aug 25, 2023
3b146b5
Merge pull request #643 from safe-global/bug/certora-unresolved-setup…
mmv08 Aug 25, 2023
da0f039
Merge branch 'main' of github.com:safe-global/safe-contracts into dep…
mmv08 Aug 25, 2023
ef9c7e9
Remove depth option from the runs with quantifiers
mmv08 Aug 25, 2023
f073326
Merge pull request #637 from safe-global/bug/comment-typo
mmv08 Aug 28, 2023
b5cc57a
Merge pull request #639 from safe-global/docs/1.5.0-changelog
mmv08 Aug 28, 2023
2648cca
Merge pull request #641 from safe-global/deps-bump
mmv08 Aug 28, 2023
0e4db07
Remove rules overlapping with rules in OwnerReach.spec
mmv08 Aug 28, 2023
28dfa59
Use byte instead of and in the SignatureDecoderContract
mmv08 Aug 28, 2023
7e4302f
Merge pull request #645 from safe-global/certora/cleanup
mmv08 Aug 29, 2023
2ca8143
Merge pull request #646 from safe-global/feat/signature-decoder-optim…
mmv08 Aug 29, 2023
52d20f5
remove ewc and volta from the hardhat config
mmv08 Aug 29, 2023
d123ab9
add a rule for module transaction executions
mmv08 Aug 29, 2023
8ba8c83
Merge pull request #647 from safe-global/chore/remove-outdated-networks
mmv08 Aug 30, 2023
cf843da
Merge pull request #648 from safe-global/certora/moduleExecutionRule
mmv08 Aug 30, 2023
8a855b6
Fix linter errors
mmv08 Aug 30, 2023
82dfcc8
Merge pull request #650 from safe-global/fix/linter-warnings
mmv08 Sep 1, 2023
465f491
remove trailing whitespace
jhoenicke Sep 7, 2023
91267d6
push munges
teryanarmen Sep 7, 2023
fb55a5c
Added counter of elements to spec.
jhoenicke Sep 8, 2023
27d1af9
Fix one failing rule
jhoenicke Sep 8, 2023
9e1d57f
fix typo:
owl11 Sep 16, 2023
851d689
Add a 1.3.0 -> 1.4.1 migration contract (#649)
mmv08 Sep 18, 2023
a9075a2
Merge pull request #658 from owl11/patch-1
mmv08 Sep 18, 2023
ccbdddd
Add summarization
mmv08 Sep 18, 2023
8ffae95
Merge pull request #657 from jhoenicke/certoraOwnerReach
mmv08 Sep 19, 2023
c4fb69e
Make checkSignature rule run.
jhoenicke Sep 22, 2023
3aaf2c2
Merge pull request #657 from jhoenicke/certoraOwnerReach
mmv08 Sep 26, 2023
2323407
Merge branch 'feat/external-contract-signature' into feat/fv/checkSig…
mmv08 Sep 26, 2023
aae6453
Merge pull request #661 from jhoenicke/feat/fv/checkSignatures
mmv08 Sep 26, 2023
09dc9ab
adjust the patch file
mmv08 Sep 26, 2023
1abedf3
Merge branch 'main' of github.com:safe-global/safe-contracts into fea…
mmv08 Sep 26, 2023
bc08fb0
Fix the methods block in the specs
mmv08 Sep 27, 2023
dcfcc01
Revert removal of an unused parameters in checkSignatures
mmv08 Sep 29, 2023
1cfa957
Certora: Mutation testing and rule enhancements (#660)
mmv08 Sep 29, 2023
7bd3ea4
Merge branch 'main' of github.com:safe-global/safe-contracts into fea…
mmv08 Sep 29, 2023
765c781
Update README.md to add missing --save-dev
bertux Oct 1, 2023
8249dcb
Feature: 1.5.0 Migration (#652)
mmv08 Oct 9, 2023
fdf9b8c
Bump flat, eth-gas-reporter and solidity-coverage
dependabot[bot] Oct 9, 2023
23f36d5
Merge pull request #665 from bertux/patch-1
mmv08 Oct 9, 2023
0b4ee70
Skip test files in coverage
mmv08 Oct 9, 2023
be0c330
Merge pull request #674 from safe-global/chore/coverage-skip-test
mmv08 Oct 9, 2023
ff4c676
Merge pull request #662 from safe-global/feat/external-contract-signa…
mmv08 Oct 11, 2023
45ed06a
Merge pull request #671 from safe-global/dependabot/npm_and_yarn/flat…
mmv08 Oct 12, 2023
7f13587
Signatures rule fix by copying the options from the original PR
mmv08 Oct 12, 2023
810fad9
Merge pull request #680 from safe-global/certora/signatures-rule-opti…
mmv08 Oct 12, 2023
f839437
Add pre-commit hook for linting and formatting
Uxio0 Oct 20, 2023
b344bd8
Merge pull request #686 from safe-global/add-precommit
mmv08 Oct 20, 2023
bd26f51
Enhance 1.4.1 contract checks for support proxy contract
mmv08 Oct 13, 2023
482332f
Add contract to migrate a Safe from not L2 to L2 (#685)
Uxio0 Oct 31, 2023
357f55e
Merge pull request #683 from safe-global/feature/1.4.1-migration-enha…
mmv08 Oct 31, 2023
373cfd2
Remove bytes from core contract methods and add them to the compatibi…
mmv08 Oct 30, 2023
fd05d21
Mask Immutables in Local Verify Task (#691)
nlordell Nov 1, 2023
52ce39c
Merge pull request #693 from safe-global/feature/remove-bytes-from-ch…
mmv08 Nov 1, 2023
4cee6ee
Add ability to implicitly specify "self" in multi-send
Philogy Nov 8, 2023
baf50a4
Update certora.yml to pin the cli version
mmv08 Nov 9, 2023
bbd9918
Proper parallel coveralls job
mmv08 Nov 9, 2023
650cd2b
Update onlyOwnersGuard, fix incorrect test
mmv08 Nov 11, 2023
8930059
Merge pull request #699 from safe-global/feature/optimize-onlyowners-…
mmv08 Nov 12, 2023
b71c65f
Explicitly Request Required PR Permission for CLA Bot (#692)
nlordell Nov 13, 2023
5aad84f
Merge pull request #695 from Philogy/main
mmv08 Nov 13, 2023
33eb51f
Add a test for forwarding calls to self
mmv08 Nov 13, 2023
ba5324e
Merge pull request #700 from safe-global/feat/multisend-self-tests
mmv08 Nov 14, 2023
915045f
Merge pull request #696 from safe-global/mmv08-patch-1
mmv08 Nov 15, 2023
69caefc
Enable ghost summary for getTransactionHash() (#702)
jhoenicke Nov 20, 2023
fec4b80
Uncomment the execTransaction rule (#705)
mmv08 Nov 22, 2023
4dd232a
Upgrade dependencies
mmv08 Nov 23, 2023
f03dfae
Merge pull request #709 from safe-global/deps/upgrade
mmv08 Nov 23, 2023
22ee559
Hardhat config updated
remedcu Dec 4, 2023
47c9adf
Memory Safe Contracts Written
remedcu Dec 4, 2023
5ee3905
Tests Updated
remedcu Dec 4, 2023
8753bc7
Guidelines Updated
remedcu Dec 4, 2023
d9a6f0c
safe-memory tag added
remedcu Dec 5, 2023
ebf89bb
solhint tags added for inline assembly
remedcu Dec 5, 2023
5cd5e53
SafeProxy assembly updated
remedcu Dec 5, 2023
d9cd9bb
Tests updated for coverage changes
remedcu Dec 5, 2023
4995c3d
solc 0.8.19
remedcu Dec 5, 2023
e287ca7
solcover updated with optimizer config
remedcu Dec 5, 2023
7444b95
fmt command added to package.json
remedcu Dec 5, 2023
c74ef15
solc reverted back to 0.7.6
remedcu Dec 5, 2023
a1a7ce6
Tests updated for coverage gas issue
remedcu Dec 5, 2023
e32f08e
console.logs for checking added
remedcu Dec 5, 2023
3a7bf79
Increased gas for a test with coverage
remedcu Dec 5, 2023
6481742
solc 0.8.19
remedcu Dec 5, 2023
c85784a
applyHarness updated
remedcu Dec 5, 2023
24d5abe
certora applyHarness update
remedcu Dec 5, 2023
5c23638
Reverting back to 0.7.6
remedcu Dec 21, 2023
f715936
Merge pull request #718 from safe-global/optimizer-enabled-with-origi…
remedcu Dec 21, 2023
7dbd1fe
SecuredTokenTransfer made to use free memory instead of scratch space
remedcu Dec 21, 2023
32ce306
viaIR: false in sample env
remedcu Dec 21, 2023
539f2fd
viaIR: false in sample env
remedcu Dec 21, 2023
aa7738a
Merge branch 'optimizer-enabled' of https://github.com/safe-global/sa…
remedcu Dec 21, 2023
534e3f4
Optimization commented and memory-safe edited
remedcu Dec 22, 2023
9166949
Review based safe-memory changes
remedcu Dec 22, 2023
771c969
Remove in assembly of FallbackManager
remedcu Dec 22, 2023
830bfc5
Using data size directly
remedcu Dec 22, 2023
62dcd4a
Using scratch space for in SecuredTokenTransfer
remedcu Dec 22, 2023
149f7e2
removed
remedcu Dec 22, 2023
0586ca8
Test based changes reverted
remedcu Dec 22, 2023
d052266
Comment reinstated
remedcu Dec 22, 2023
e55d181
Comment reinstated at the correct place
remedcu Dec 22, 2023
9c80418
Slight optimization in ModuleManager
remedcu Dec 22, 2023
71ff245
Transferring checkSignatures(...) to Safe
remedcu Dec 26, 2023
20a4bab
Added fmt script to package.json
remedcu Dec 26, 2023
2354477
Removed checkSignatures from CompatibilityFallbackHandler
remedcu Dec 26, 2023
2f2c56c
Tests edited after checkSignatures removal
remedcu Dec 26, 2023
c5f84b7
Add a test for checking return data in execTransactionFromModuleRetur…
mmv08 Nov 23, 2023
f48563d
Using uint256 for v (saves 9 bytes)
remedcu Jan 3, 2024
963c3ca
Guard Storage Slot used directly (saves 17 bytes)
remedcu Jan 3, 2024
b0b84f1
enableModule require -> if with revert (saves 2 bytes)
remedcu Jan 3, 2024
7fbc196
disableModule require -> if with revert (saves 2 bytes)
remedcu Jan 3, 2024
2d2260c
execTransactionFromModule require -> if with revert (saves 2 bytes)
remedcu Jan 3, 2024
a08d15d
Slight optimization in OwnerManager (saves 20 bytes)
remedcu Jan 3, 2024
b979bee
Slight codesize improvement in FallbackManager (saves 17 bytes)
remedcu Jan 3, 2024
0acdd35
Merge pull request #721 from safe-global/checkSignatures
remedcu Jan 4, 2024
fbef92b
Comment typo updated
remedcu Jan 5, 2024
625d96d
Version Overrides for old OZ files
remedcu Jan 5, 2024
b723796
Updating old compiler versions to default one
remedcu Jan 5, 2024
edc2910
Updated harness patch
remedcu Jan 8, 2024
9740605
SafeProxy using scratch space initially
remedcu Jan 8, 2024
0bdca8a
Updated harness patch
remedcu Jan 8, 2024
1cce1e9
Certora Harness Restored
remedcu Jan 8, 2024
5d2df08
EOF for .env.sample
remedcu Jan 8, 2024
5919110
Sigleton -> Singleton typo fixed
remedcu Jan 8, 2024
76a48cc
.env.sample updation
remedcu Jan 8, 2024
50e3d0c
harness timestamp restored
remedcu Jan 8, 2024
81a0fc4
Test Token pragma raised
remedcu Jan 8, 2024
99d7075
Using ErrorMessage for revert
remedcu Jan 8, 2024
c3e2317
Certora Signature Specs Updated
remedcu Jan 8, 2024
082c7af
solcover and .env updated
remedcu Jan 9, 2024
bc16a01
Using scratch space for call result boolean
remedcu Jan 9, 2024
d9069e2
Guidelines Updated
remedcu Jan 9, 2024
36280d3
solhint inline assembly comment
remedcu Jan 9, 2024
85f043f
Using bytes5 instead of string
remedcu Jan 9, 2024
d3f6010
SafeProxy memory-safety reverted
remedcu Jan 10, 2024
6b25caf
Multisend* memory-safety revert
remedcu Jan 10, 2024
c53fdc7
Using returndatasize directly
remedcu Jan 10, 2024
cd87eb0
DelegateCaller memory-safe revert and using returndatasize
remedcu Jan 10, 2024
7c51578
SafeProxy all changes reverted
remedcu Jan 10, 2024
0d24013
Using returndatasize through memory (revert)
remedcu Jan 10, 2024
6230350
contract.ts memory-safe tagging reverted
remedcu Jan 10, 2024
9b7697a
Revert use of uint8 everywhere except Safe contract
remedcu Jan 10, 2024
fc87888
Merge pull request #711 from safe-global/optimizer-enabled
remedcu Jan 10, 2024
8dd165a
Merge branch 'main' into contract-size
remedcu Jan 10, 2024
eebd751
Return Data Test Updated
remedcu Jan 12, 2024
b824669
Locked certora-cli to v5.0.5
remedcu Jan 12, 2024
7709f91
Adding natspec for pre & post guard check functions
remedcu Jan 12, 2024
75a5b7c
Func rename & getting guard during preModuleExecution
remedcu Jan 12, 2024
e3849a3
Fix Typo In Migration Contract Comment
nlordell Jan 12, 2024
9604d93
Rearranging func parameter
remedcu Jan 12, 2024
965e2e9
Merge pull request #728 from safe-global/bug/execTransactionFromModul…
remedcu Jan 12, 2024
fba7acc
Merge branch 'main' into contract-size
remedcu Jan 12, 2024
de17ed6
Merge pull request #729 from safe-global/fix-l2-migration-contract-typo
mmv08 Jan 12, 2024
1bc5036
Pin Certora CLI Version in CI (#730)
nlordell Jan 12, 2024
ac0eda0
Merge pull request #726 from safe-global/contract-size
remedcu Jan 12, 2024
b140318
Adding `ISafe` interface for `CompatibilityFallbackHandler` (#722)
remedcu Jan 16, 2024
914d0f8
Rename repository to safe-smart-account (#733)
akshay-ap Jan 22, 2024
3da1415
Upgrade certora spec files and CI to certora-cli v6 (#732)
mmv08 Feb 5, 2024
3b4c992
Remove OR operator from the benchmark job (#736)
mmv08 Feb 8, 2024
7a872e4
chore: remove useless `and` op (#737)
zhiqiangxu Feb 12, 2024
98429bc
Dependencies: Update all dependencies (#738)
mmv08 Feb 16, 2024
12136fd
Bump undici from 5.23.0 to 5.28.3 (#739)
dependabot[bot] Feb 20, 2024
2278f7c
Using `returndatasize()` in assembly. (#740)
remedcu Mar 7, 2024
bf48615
Fix typos (#744)
xiaoxianBoy Mar 16, 2024
0be700e
Bump follow-redirects from 1.15.2 to 1.15.6 (#745)
dependabot[bot] Mar 27, 2024
1cd7568
Upgrade all dependecies across the board (#746)
mmv08 Mar 28, 2024
2474f63
Bump undici from 5.28.3 to 5.28.4 (#748)
dependabot[bot] Apr 9, 2024
90d7caa
Update Compatibility Signature Verification Functions (#750)
nlordell Apr 18, 2024
ea2f7ca
Fix Safe NatSpec Documentation (#751)
nlordell Apr 18, 2024
8340a4e
Remove Leftover Testing Code In Harness Patch (#756)
nlordell Apr 24, 2024
5feb0d0
Update dependencies to the latest versions (#757)
mmv08 Apr 30, 2024
f830466
Create a separate interface for module guard (#758)
akshay-ap May 24, 2024
a9e3385
Upgrade Certora CLI and Prover to v7.6.3 on the CI (#761)
mmv08 May 28, 2024
499b17a
chore: fix typos (#763)
xiaoxianBoy Jun 11, 2024
46f7c60
Fix compilation issue with solidity versions >= 0.8.12 (#772)
akshay-ap Jun 26, 2024
13c0494
Create a pre call hook onBeforeExecTransaction (#776)
akshay-ap Jun 28, 2024
8f80a83
Add Safe to L2 Setup Contract (#759)
nlordell Jul 3, 2024
b6692f9
Generic migration contract (#793)
akshay-ap Jul 19, 2024
cfa4e33
Update factory data and latest version in README.md (#797)
mmv08 Jul 23, 2024
2556b94
`getSafeWithOwners` using types (#796)
remedcu Jul 23, 2024
eccba0d
Workflow Updated (#803)
remedcu Jul 29, 2024
9b2ff71
add some comment to `SENTINEL_OWNERS` (#804)
zhiqiangxu Aug 1, 2024
9ec11a1
Unifying function to get Safe implementation (#808)
remedcu Aug 8, 2024
af53bdf
Update Package Dependencies (#810)
nlordell Aug 19, 2024
a7928e8
Remove unused launch configuration for Truffle tests (#819)
mmv08 Aug 29, 2024
c266ffc
Lint: add a rule for order import sorting (#818)
mmv08 Aug 29, 2024
5c1e50e
Feature: add zksync support to v1.5.0 (#742)
mmv08 Sep 5, 2024
2787247
Update CHANGELOG.md (#816)
akshay-ap Sep 6, 2024
f9a4d2e
Remove reference to inexisting 'deploy' variable in SafeToL2Setup dep…
mmv08 Sep 6, 2024
786dadc
Audit Changes for `v1.4.1-2` cherry picked from `release/v1.4.1-2` (#…
remedcu Sep 9, 2024
9229531
`v1.4.1` Audit Report and Deployment Address (#828)
remedcu Sep 12, 2024
fddfd14
Migration Contract FV (#832)
remedcu Sep 16, 2024
7ccf6e0
Docs: Update README (#831)
Olexandr88 Sep 18, 2024
70673bb
Update `SafeMigration` tests for zkSync (#833)
mmv08 Sep 19, 2024
1cec0e7
Add zkSync support to `SafeToL2Migration` tests (#834)
mmv08 Sep 20, 2024
73b1778
fix: remove deprecated `husky install` command (#835)
toolabi Sep 26, 2024
0796a37
Tests job updated in Workflow (#836)
remedcu Sep 27, 2024
3e2ee89
Remove unused mock contracts from SafeToL2Migration tests (#837)
mmv08 Sep 27, 2024
0142ec8
Error propagation for internal TX (#839)
remedcu Sep 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,20 @@ INFURA_KEY=""
# Used for custom network
NODE_URL=""
ETHERSCAN_API_KEY=""
# Use the Safe singleton factory for singleton deployment. This is required if EIP-155 is enforce on a chain.
# CUSTOM_DETERMINISTIC_DEPLOYMENT="true"
# (Optional) Used to run ERC-4337 compatibility test. MNEMONIC is also required.
ERC4337_TEST_BUNDLER_URL=
ERC4337_TEST_NODE_URL=
ERC4337_TEST_SINGLETON_ADDRESS=
ERC4337_TEST_SAFE_FACTORY_ADDRESS=
# (Optional) Tells the test runner which Safe Singleton Contract to use for testing: Safe or SafeL2. Defaults to Safe.
SAFE_CONTRACT_UNDER_TEST="Safe"
# Used for compiling with different solidity testing
SOLIDITY_VERSION= # Example: '0.8.19'
# For running coverage tests, `details` section of solidity settings are required, else could be removed.
SOLIDITY_SETTINGS= # Example: '{"viaIR":true,"optimizer":{"enabled":true, "details": {"yul": true, "yulDetails": { "optimizerSteps": ""}}}}'
# Set to 1 to run hardhat in zksync mode. This will enable the ZK compiler and run the hardhat node in zksync mode.
HARDHAT_ENABLE_ZKSYNC=0
# Sets hardhat chain id. In general, you don't need this, it's only used for testing the SafeToL2Setup contract.
HARDHAT_CHAIN_ID=31337
# (Optional) Hardhat-deploy only supports zksync deployment if the private key for the account is provided. Specify the private key here.
ZKSYNC_DEPLOYER_PK="0x7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110"
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ about: Bug report about the Safe smart contracts
## Prerequisites

- First, many thanks for taking part in the community and helping us improve. We appreciate that a lot.
- Support questions are better asked in our Gitter chat: https://gitter.im/gnosis/Safe
- Support questions are better asked in our Discord: https://chat.safe.global
- Please ensure the issue isn't already reported.

*Please delete the above section and the instructions in the sections below before submitting*
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ about: Suggest an idea or feature request for the Safe smart contracts project
## Prerequisites

- First, many thanks for taking part in the community and helping us improve. We appreciate that a lot.
- Support questions are better asked in our Gitter chat: https://gitter.im/gnosis/Safe
- Support questions are better asked in our Discord: https://chat.safe.global
- Please ensure the issue isn't already reported.

*Please delete the above section and the instructions in the sections below before submitting*
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/certora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: certora

on:
push:
branches:
- main
pull_request:
branches:
- main

workflow_dispatch:

jobs:
verify:
runs-on: ubuntu-latest
strategy:
matrix:
rule: ["owner", "safe", "module", "nativeTokenRefund", "signatures", "safeMigration", "safeToL2Migration", "safeToL2Setup"]

steps:
- uses: actions/checkout@v4

- name: Install python
uses: actions/setup-python@v4
with: { python-version: 3.11 }

- name: Install certora cli
run: pip install -r certora/requirements.txt

- name: Install solc
run: |
wget https://github.com/ethereum/solidity/releases/download/v0.7.6/solc-static-linux
chmod +x solc-static-linux
sudo mv solc-static-linux /usr/local/bin/solc7.6

- name: Verify rule ${{ matrix.rule }}
run: |
cd certora
touch applyHarness.patch
make munged
cd ..
echo "key length" ${#CERTORAKEY}
certoraRun certora/conf/${{ matrix.rule }}.conf --wait_for_results=all
env:
CERTORAKEY: ${{ secrets.CERTORA_KEY }}
174 changes: 95 additions & 79 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,81 +1,97 @@
name: safe-contracts
on: [ push, pull_request ]
name: safe-smart-account
on: [push, pull_request]
env:
NODE_VERSION: 20.16.0

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16.7.0
- uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- run: yarn --frozen-lockfile
- run: yarn build
- run: yarn coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16.7.0
- uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- run: yarn --frozen-lockfile
- run: yarn lint:sol
tests-other:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
contract-name: ["GnosisSafeL2"]
env:
SAFE_CONTRACT_UNDER_TEST: ${{ matrix.contract-name }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16.7.0
- uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- run: yarn --frozen-lockfile
- run: yarn build
- run: yarn coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
benchmarks:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
solidity: ["0.7.6", "0.8.2"]
include:
- solidity: "0.8.2"
settings: '{"viaIR":true,"optimizer":{"enabled":true,"runs":10000}}'
env:
SOLIDITY_VERSION: ${{ matrix.solidity }}
SOLIDITY_SETTINGS: ${{ matrix.settings }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16.7.0
- uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- run: (yarn --frozen-lockfile && yarn build && yarn hardhat codesize --contractname GnosisSafe && yarn benchmark) || echo "Benchmark failed"
lint-solidity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- run: npm ci
- run: npm run lint:sol:prettier
- run: npm run lint:sol

lint-typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- run: npm ci
- run: npm run lint:ts:prettier
- run: npm run build:ts:dev # runs typecheck
- run: npm run lint:ts

tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- run: npm ci
- run: npm run build
- run: npm run test

coverage:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
contract-name: ["Safe", "SafeL2"]
env:
SAFE_CONTRACT_UNDER_TEST: ${{ matrix.contract-name }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- run: npm ci
- run: npm run build
- run: npm run coverage
- name: Send coverage to Coveralls (parallel)
uses: coverallsapp/github-action@v2
with:
parallel: true
flag-name: run-$
github-token: ${{ secrets.GITHUB_TOKEN }}

finish:
runs-on: ubuntu-latest
needs: tests
if: ${{ always() }}
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: "run-Safe,run-SafeL2"

benchmarks:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
solidity: ["0.7.6", "0.8.24"]
include:
- solidity: "0.8.24"
settings: '{"viaIR":false,"optimizer":{"enabled":true,"runs":1000000}}'
env:
SOLIDITY_VERSION: ${{ matrix.solidity }}
SOLIDITY_SETTINGS: ${{ matrix.settings }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- run: npm ci && npm run build && npx hardhat codesize --contractname Safe && npm run benchmark
12 changes: 9 additions & 3 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,27 @@ on:
pull_request_target:
types: [ opened, closed, synchronize ]

permissions:
actions: write
contents: write
pull-requests: write
statuses: write

jobs:
CLAssistant:
runs-on: ubuntu-latest
steps:
- name: "CLA Assistant"
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
# Beta Release
uses: cla-assistant/github-action@v2.1.3-beta
uses: cla-assistant/github-action@v2.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# the below token should have repo scope and must be manually added by you in the repository's secret
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
with:
path-to-signatures: 'signatures/version1/cla.json'
path-to-document: 'https://safe.global/cla/'
path-to-document: 'https://safe.global/cla'
# branch should not be protected
branch: 'cla-signatures'
allowlist: rmeissner,Uxio0,*bot # may need to update this expression if we add new bots
Expand All @@ -33,4 +39,4 @@ jobs:
#custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA'
#custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.'
#lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
#use-dco-flag: true - If you are using DCO instead of CLA
#use-dco-flag: true - If you are using DCO instead of CLA
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea/
build/
node_modules/
.DS_Store
Expand All @@ -11,4 +12,14 @@ bin/
solc
coverage/
coverage.json
yarn-error.log
yarn-error.log
typechain-types
.vscode

# Certora Formal Verification related files
.certora_internal
.certora_recent_jobs.json
.zip-output-url.txt

# zksync era node log
era_test_node.log
17 changes: 7 additions & 10 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm run lint:sol:prettier
npm run lint:ts:prettier
npm run lint:sol
npm run lint:ts

# Redirect output to stderr.
exec 1>&2

# prevent it.only or describe.only commited
# Prevent `it.only` or `describe.only` tests commited
if [ "$allowonlytests" != "true" ] &&
test $(git diff --cached | grep -E "\b(it|describe).only\(" | wc -l) != 0
then
cat <<\EOF
Error: Attempt to add it.only or describe.only - which may disable all other tests

If you know what you are doing you can disable this check using:

git config hooks.allowonlytests true
EOF
exit 1
fi

exit 0
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.7.0
v18.17.1
30 changes: 18 additions & 12 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
{
"plugins": ["prettier-plugin-solidity"],
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 140,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false,
"explicitTypes": "always"
{
"files": "*.sol",
"options": {
"parser": "solidity-parse",
"printWidth": 140,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false
}
}
}
]
}
],
"tabWidth": 4,
"printWidth": 140,
"trailingComma": "all",
"singleQuote": false,
"semi": true
}
Loading
Loading