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

merge release/20250308 into main #84

Merged
merged 249 commits into from
Mar 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
249 commits
Select commit Hold shift + click to select a range
151e5a2
[refactor] removed keystore
tomasfrancizco Sep 17, 2024
b15db10
[refactor] removed keystore files, changed entrypoint files name
tomasfrancizco Sep 17, 2024
dca22f6
[refactor] NFTs: added mintOriginal & mintCopy, setBaseURI
tomasfrancizco Sep 19, 2024
9b2a89d
[fix] type errors
tomasfrancizco Sep 26, 2024
7c1ca34
[fix] NFTs: mintOriginal, mintCopy, setLimits
tomasfrancizco Sep 26, 2024
ae44b43
[fix] typo
tomasfrancizco Sep 26, 2024
f3060ab
[feature] :poop: write bad code that needs to be improved (workaround)
dappsar Sep 30, 2024
fd47c9f
Merge pull request #12 from P4-Games/feature/workaround-mint-icp
dappsar Sep 30, 2024
8f6c87c
[feat] :rewind: rever to original contract post icp hackathon
dappsar Sep 30, 2024
4564a83
Merge pull request #13 from P4-Games/feature/restore-mint-post-icp
dappsar Sep 30, 2024
25b30ce
[fix] changed entrypoint from v7 to v6
tomasfrancizco Oct 2, 2024
8996f85
[feat] added paymaster
tomasfrancizco Oct 2, 2024
3d47aed
[chore] :truck: rename ChatterPayNFT.1 to ChatterPayNFT.sol
dappsar Oct 3, 2024
4eeb4de
Merge pull request #19 from P4-Games/dappsar-patch-1
dappsar Oct 3, 2024
ad8da85
Mergebranch 'develop' of https://github.com/P5-Games/ChatterPay-Smart…
tomasfrancizco Oct 3, 2024
ae964e6
merge entrypoint-v6
tomasfrancizco Oct 3, 2024
b8b0b10
removed flow image
tomasfrancizco Oct 3, 2024
eaa545b
Merge pull request #21 from P4-Games/entrypoint-v6
tomasfrancizco Oct 3, 2024
7cd60b0
Merge branch 'develop' of https://github.com/P4-Games/ChatterPay-Smar…
tomasfrancizco Oct 3, 2024
30bbbad
[feat] added setEntryPoint function
tomasfrancizco Oct 4, 2024
da43be4
[refactor] setCopiesLimit to setCopyLimit
tomasfrancizco Oct 4, 2024
efd26cf
[feat] withdrawBalance first approach
tomasfrancizco Oct 4, 2024
d5e9e14
[refactor] change withdrawBalance name
tomasfrancizco Oct 4, 2024
dd3bee5
[chore] removed hardhat files
tomasfrancizco Oct 4, 2024
7b2d660
[feat] :sparkles: add uri parameter in mint-copy (#22)
dappsar Oct 5, 2024
ba3b386
Merge pull request #23 from P4-Games/feature/add-uri-in-copy
dappsar Oct 5, 2024
ea12817
[feat] implemented UUPS proxy for NFT
tomasfrancizco Oct 7, 2024
243b6d7
added beaconAccessor imports and ocnfigurations
tomasfrancizco Oct 9, 2024
ac8e716
Merge branch 'develop' of https://github.com/P4-Games/ChatterPay-Smar…
tomasfrancizco Oct 9, 2024
1b558f6
[feat] wallet UUPS proxy first approach
tomasfrancizco Oct 9, 2024
8338fba
removed L1SLoad references from wallet
tomasfrancizco Oct 9, 2024
35c34b0
[fix] deploy script and tests
tomasfrancizco Oct 9, 2024
c680a6f
[feat] added wallet proxy & tests
tomasfrancizco Oct 13, 2024
0c07abc
[refactor] removed unused import
tomasfrancizco Oct 13, 2024
6d326f1
[feat] added withdrawBalance function
tomasfrancizco Oct 15, 2024
261d31c
[refactor] removed implementation from factory and changed initializa…
tomasfrancizco Oct 15, 2024
cdf7bd9
[feat] vault first approach
tomasfrancizco Oct 23, 2024
afecfb5
cei change
tomasfrancizco Oct 24, 2024
fcb2d29
merge feature/wallet-uups
tomasfrancizco Oct 24, 2024
63bb323
removed beacon
tomasfrancizco Oct 24, 2024
e23bca6
modified vault, paymaster, tests, scripts
tomasfrancizco Oct 25, 2024
1d3f296
[fix] support mints to proxies
TomasDmArg Oct 29, 2024
a09794d
vault: removed password hash nonce
tomasfrancizco Oct 29, 2024
c6a5fdf
Merge branch 'staging' of https://github.com/P4-Games/ChatterPay-Smar…
tomasfrancizco Oct 29, 2024
235859e
[feat] implemented paymaster signature validation
tomasfrancizco Oct 31, 2024
124a37e
Merge pull request #30 from P4-Games/staging
tomasfrancizco Oct 31, 2024
3606afc
removed unnecesary dependencies
tomasfrancizco Oct 31, 2024
fdaf016
Merge pull request #31 from P4-Games/fix/remove-unnecesary-dependencies
tomasfrancizco Oct 31, 2024
c0fc3f2
removed imports
tomasfrancizco Oct 31, 2024
f63edb7
Merge pull request #32 from P4-Games/fix/remove-aa-imports
tomasfrancizco Oct 31, 2024
839309b
removed lib/account-abstraction
tomasfrancizco Oct 31, 2024
61a6ee8
Merge pull request #33 from P4-Games/remove-foundry-dependencies
tomasfrancizco Oct 31, 2024
d35a1be
simplified vault contract
tomasfrancizco Nov 4, 2024
62e64cb
Merge pull request #34 from P4-Games/feature/simple-vault
tomasfrancizco Nov 4, 2024
6b54a96
restored contracts flow image
tomasfrancizco Nov 4, 2024
460bc21
Merge pull request #35 from P4-Games/restore-images
tomasfrancizco Nov 4, 2024
96a1143
[chore] :wastebasket: remove invalid index.js reference in packages.json
dappsar Dec 24, 2024
fd88a14
[test] :rotating_light: remove unused vars in tests functions
dappsar Dec 24, 2024
1b38640
[chore] :memo: update package name
dappsar Dec 24, 2024
9d905d3
[docs] :memo: add missings env variables in doc
dappsar Dec 24, 2024
f8c1715
[docs] :memo: update some commands in readme
dappsar Dec 24, 2024
a0cd93d
[refactor] :art: replace use of 'proxies' by 'getProxies'
dappsar Dec 24, 2024
481ba5b
[feat] :rotating_light: add explicit payable function
dappsar Dec 24, 2024
09de5cb
Merge pull request #37 from P4-Games/feature/20241224
dappsar Dec 24, 2024
926e640
[docs] :memo: add slither info in readme
dappsar Dec 24, 2024
7bf4c77
[docs] :memo: move flow image to doc folder
dappsar Dec 24, 2024
db7434f
[docs} :memo: add development documentation
dappsar Dec 24, 2024
1021d8f
[docs] :fire: delete moved image file
dappsar Dec 24, 2024
64d2236
[ci] :construction_worker: update test github workflow to run on main…
dappsar Dec 24, 2024
cff3284
[build] :green_heart: ignore and remove package-lock.json to avoid wo…
dappsar Dec 24, 2024
2631608
[build] :pushpin: add account-abstraction dependency to avid workflow…
dappsar Dec 24, 2024
b7eded7
[build] :construction_worker: add env variables in test workflow
dappsar Dec 24, 2024
593f6e0
[build] :construction_worker: add sumodules update in test workflow
dappsar Dec 24, 2024
9de4cbb
[build] :see_no_evil: remove github folder from ignore file
dappsar Dec 24, 2024
7f139da
[build] :construction_worker: update yarn lock file
dappsar Dec 24, 2024
3def8bf
[fix] :hammer: update script to use last erc20Mock contract
dappsar Dec 24, 2024
0cb73be
[docs] :memo: remove simple quote in readme
dappsar Dec 24, 2024
b3a3e79
Merge pull request #38 from P4-Games/feature/workflows-and-docs
dappsar Dec 24, 2024
cf4d71d
[docs] :memo: add detailed documentation for contracts
dappsar Dec 25, 2024
c935604
Merge pull request #40 from P4-Games/feature/contracts-docs
dappsar Dec 25, 2024
ff1bd47
[fix] :docs: fix technical-overview link (#27)
dappsar Dec 25, 2024
da2c4f1
Merge pull request #41 from P4-Games/feature/contracts-docs
dappsar Dec 25, 2024
e519742
[test] re-added name & symbol as parameters to differentiate erc tokens
tomasfrancizco Dec 26, 2024
3237604
[docs] :memo: fix docs references
dappsar Dec 26, 2024
c8b8cf3
Merge pull request #43 from P4-Games/fix/docs
dappsar Dec 26, 2024
635bece
[fix] fixed erc20mock dependency issue, added local file
tomasfrancizco Dec 26, 2024
c407eb8
Merge pull request #42 from P4-Games/test/modify-mock-erc20
tomasfrancizco Dec 26, 2024
cb96bdf
[docs] added natspec comments to vault contract
tomasfrancizco Dec 26, 2024
efed8c1
Merge pull request #44 from P4-Games/feature/vault-natspec-comments
tomasfrancizco Dec 26, 2024
c5f39d8
[docs] added natspec comments to factory contract
tomasfrancizco Dec 26, 2024
ed89e6c
Merge pull request #45 from P4-Games/feature/factory-natspec-comments
tomasfrancizco Dec 27, 2024
d7b4836
[docs] added chatterpay logic contract natspec comments
tomasfrancizco Dec 27, 2024
77b7f40
[docs] added nft contract natspec comments
tomasfrancizco Dec 27, 2024
ff10421
[docs] added paymaster contract natspec comments
tomasfrancizco Dec 27, 2024
c7f7d7f
[docs] added proxy contract natspec comments
tomasfrancizco Dec 27, 2024
5d95b61
Merge pull request #46 from P4-Games/feature/natspec-comments
tomasfrancizco Dec 27, 2024
3f404d6
[docs] :memo: update general documentation
dappsar Dec 27, 2024
8f4ffef
Merge pull request #47 from P4-Games/feature/readme
dappsar Dec 27, 2024
4006ad5
[docs] :memo: update link reference in readme
dappsar Dec 27, 2024
ca91b44
Merge pull request #48 from P4-Games/feature/docs
dappsar Dec 27, 2024
8a7e79c
[feat] added new and fixed deploy scripts & tests
tomasfrancizco Dec 31, 2024
78e80f5
Merge pull request #49 from P4-Games/feature/update-deploy-scripts
tomasfrancizco Dec 31, 2024
97566d4
removed DeployAllContracts.v2.s.sol
tomasfrancizco Dec 31, 2024
754f3a0
changed DeployChatterPay script, removed Upgrades
tomasfrancizco Dec 31, 2024
ed6d15d
created update scripts
tomasfrancizco Dec 31, 2024
256775e
Merge pull request #50 from P4-Games/feature/update-deploy-scripts
tomasfrancizco Dec 31, 2024
8f2e97d
[fix] :bug: fix chain_id not found when deploy contracts
dappsar Jan 3, 2025
4967b8c
[chore] :loud_sound: update logs in deployAllCntracts script
dappsar Jan 3, 2025
7e49b99
[chore] :truck: rename file .env.example to example_env
dappsar Jan 3, 2025
94df886
[chore] :fire: remove temp file
dappsar Jan 3, 2025
b8daf05
[docs] :memo: update instructions in readme file
dappsar Jan 3, 2025
623d06a
Merge pull request #51 from P4-Games/fix/deploy-all-script
dappsar Jan 3, 2025
3b8210c
[feat] added swap and improved execute transfer function
TomasDmArg Jan 6, 2025
dcbad3c
[feat] added modifiers, missing libs, and initial tests/mock contracts
TomasDmArg Jan 6, 2025
fb80d09
fix: factory interface and inheritance conflicts
TomasDmArg Jan 12, 2025
e3b4917
[chore] removed old tests
TomasDmArg Jan 12, 2025
25e1e96
[fix/WIP] resolve multiple contract compilation issues
TomasDmArg Jan 12, 2025
42bf011
[fix/WIP] resolve function mutability and unused parameter warnings
TomasDmArg Jan 12, 2025
f52510a
[test] added detailed logging for test setup debugging
TomasDmArg Jan 12, 2025
ae95695
[fix] update deployment scripts
TomasDmArg Jan 13, 2025
60766b5
[fix] resolve naming conflicts and config access in factory deployment
TomasDmArg Jan 13, 2025
a877378
[fix] initialization, added entrypoint context to tests
TomasDmArg Jan 13, 2025
d8aeeb7
[fix] improve swap router mock and tests passing
TomasDmArg Jan 13, 2025
c0d1e80
[feat] updated deploy script and deployed contracts successfully
TomasDmArg Jan 13, 2025
b7383b7
[docs] translate spanish docs
TomasDmArg Jan 13, 2025
2cd57e6
[chore] removed unnecesary contracts
TomasDmArg Jan 13, 2025
be4314a
test: add arbitrum integration test
TomasDmArg Jan 20, 2025
8114f1b
forge install: forge-std
TomasDmArg Jan 20, 2025
a2f79c1
[feat/WIP] Chatterpay integration test with chainlink price feed and …
TomasDmArg Jan 20, 2025
bbd2a29
[fix] decimal calculations. Integration test passing
TomasDmArg Jan 22, 2025
2aaef7f
[feat] test passing with custom pool and tokens with different decimals
TomasDmArg Jan 22, 2025
20a8539
[refactor] improved code quality, and improved documentation
TomasDmArg Jan 22, 2025
3cc9e2b
[refactor] improved code quality in integration test, and improved do…
TomasDmArg Jan 22, 2025
8b183d0
[refactor] unified test files
TomasDmArg Jan 22, 2025
df3a90f
[refactor] :recycle: read nft_base_uri from env in deployAll
dappsar Jan 22, 2025
635782c
[chore] :memo: print entrypoint address in deployAll
dappsar Jan 22, 2025
ea1dd9d
[docs] :memo: add arbitrum_api_key & nft_base_uri to example_env
dappsar Jan 22, 2025
8d4a98d
[feat] :hammer: add optimizer_runs & via_ir to foundry config
dappsar Jan 22, 2025
891ad23
[chore] :sparkles: complete scripts in makefile
dappsar Jan 22, 2025
8ba541f
[build] :hammer: add usdt, weth & simpleswap to deployAll
dappsar Jan 22, 2025
828f670
[ci] :hammer: add nft_base_uri to github workflow
dappsar Jan 22, 2025
04d4156
Merge pull request #52 from P4-Games/feature/20250122
dappsar Jan 22, 2025
55b2ba0
[refactor/WIP] increase test coverage, and addded missing contract fu…
TomasDmArg Jan 22, 2025
aabfd82
[test] entrypoint, admin and swap integration test modules working
TomasDmArg Jan 23, 2025
d28baa3
[fix] transfer integration test passing
TomasDmArg Jan 23, 2025
e32c7e6
[feat] improved reentrancy protection and security test passes now
TomasDmArg Jan 23, 2025
ad0c230
[fix] fee calculation issue
TomasDmArg Jan 23, 2025
cb2e16d
[test] simplified test approach with script
TomasDmArg Jan 23, 2025
4140727
[feat] added tolerance to test fee price
TomasDmArg Jan 23, 2025
da8f1c1
[fix] all tests passing
TomasDmArg Jan 23, 2025
fe6b82a
[docs] added test command in readme
TomasDmArg Jan 23, 2025
89e82f5
Merge branch 'develop' into feat/improved-transfer-swap
TomasDmArg Jan 23, 2025
e279d37
[refactor] removed unnecesary files, reorganized folders, updated docs
TomasDmArg Jan 23, 2025
0fe2533
[documentation] checked, updated, and added natspec documentation to …
TomasDmArg Jan 23, 2025
989d120
[feat] added script to generate ABIs
TomasDmArg Jan 23, 2025
0ece269
[ci] :hammer: update how to run tests in github actions
dappsar Jan 24, 2025
0290a2b
[chore] :see_no_evil: ignore forge-cache in gitignore
dappsar Jan 24, 2025
407b4bd
[test] :white_check_mark: update fee tolerante to 1% in swap tests
dappsar Jan 24, 2025
debcdce
merge fix/fix-build into feat/improved-transfer-swap (#64)
dappsar Jan 24, 2025
c02020d
[ci] :recycle: set up cache for fountry en gihub tests
dappsar Jan 24, 2025
502bc42
[ci] :recycle: set up cache for fountry en gihub tests (#65)
dappsar Jan 24, 2025
14e5354
[ci] :fire: remove .forge-cache folder
dappsar Jan 24, 2025
a3b182a
Core Contract Improvements & Security Enhancements (#62)
dappsar Jan 24, 2025
799df9e
[fix] :memo: remove extra quotes in readme and add additional info
dappsar Jan 24, 2025
50f57ca
merge fix/readme-markdown into develop (#66)
dappsar Jan 24, 2025
9e7ea7d
[docs] :memo: update contracts technical-overview
dappsar Jan 24, 2025
881108e
merge feature/contracts-documentation into develop (#67)
dappsar Jan 24, 2025
b99160f
[fix/WIP] deploy script initialization
TomasDmArg Jan 30, 2025
90aee7b
[feat] added mint tokens to deploy script
TomasDmArg Feb 6, 2025
3b6ab0a
[fix] updated package scripts
TomasDmArg Feb 7, 2025
28f8a8f
Update example_env
TomasDmArg Feb 7, 2025
238d93c
[fix] updated proxy bytecode to match initialization params
TomasDmArg Feb 7, 2025
cd960e7
[feat] added factory implementation update
TomasDmArg Feb 7, 2025
90cea72
Merge branch 'fix/deploy-initialization' of https://github.com/P4-Gam…
TomasDmArg Feb 7, 2025
36f4b2a
[chore] :hammer: add script to run coverage tests
dappsar Feb 8, 2025
5ac7dbf
[chore] :see_no_evil: ignore tests coverage files
dappsar Feb 8, 2025
cc2b946
[docs] :memo: update readme with new package scripts
dappsar Feb 8, 2025
2020f9e
[docs] :memo: translate texts in example_env to english
dappsar Feb 8, 2025
a0074d6
[chore] :memo: add license to package.json
dappsar Feb 8, 2025
088bdac
[build] :bug: fix YAML syntax errors in github action workflow
dappsar Feb 8, 2025
c22e1d6
[ci] :hammer: ensure forge warnings do not fail CI workflow
dappsar Feb 8, 2025
902509e
[ci] :art: rename workflows for better clarity in CI
dappsar Feb 8, 2025
ab6c45e
[chore] :see_no_evil: add *.log files to .gitignore
dappsar Feb 8, 2025
e3c40c0
[ci] :bug: replace yarn test:lcoal with direct forge test execution
dappsar Feb 8, 2025
31f6a37
[ci] :art: rename (again) workflows for better clarity in CI
dappsar Feb 8, 2025
7094dbd
[ci] :bug: add missing ARBITRUM_SEPOLIA_RPC_URL in test.yml
dappsar Feb 8, 2025
f04d830
[ci] :art: rename (again) workflows for better clarity in CI
dappsar Feb 8, 2025
b20b4cb
[ci] :art: improve test script to avoid rate-limit errors
dappsar Feb 8, 2025
9ca2334
[ci] :zap: reduce parallel test jobs to 1 to prevent RPC rate limits
dappsar Feb 8, 2025
d0cee63
[ci] :construction_worker: auto-export environment variables to .env …
dappsar Feb 8, 2025
37c1316
[ci] :bug: fix deprecated testFail* function in SwapModule tests
dappsar Feb 8, 2025
b51dd7c
[ci] :bug: reduce parallel test jobs form 8 to 1 to prevent RPC rate …
dappsar Feb 8, 2025
a5d1299
[ci] :mute: supress testFail* deprecation warnings in CI logs
dappsar Feb 8, 2025
5b5b97d
[refactor] :recycle: refactor test retry logic to avoid re-running su…
dappsar Feb 8, 2025
2dca088
[revert] :rewind: revert rename in swap-fail test
dappsar Feb 8, 2025
2ed0aa1
[ci] :mute: suppress testFail* deprecation warning in Foundry tests
dappsar Feb 8, 2025
64ad7df
Improve initialization script with liquidity and whitelists (#68)
dappsar Feb 8, 2025
8d7ed33
[fix] improved paymaster verification, and security
TomasDmArg Feb 13, 2025
430e0b7
[feat] added paymaster test, improved custom errors in paymaster cont…
TomasDmArg Feb 13, 2025
88f246e
[chore] added extra logs to paymaster deploy
TomasDmArg Feb 13, 2025
7f5f2fa
[feat] added paymaster only deploy to makefile
TomasDmArg Feb 13, 2025
c069fc2
[fix] removed fee update, added initialization params
TomasDmArg Feb 15, 2025
54e5163
[fix] compiler warnings / errors
TomasDmArg Feb 15, 2025
214c377
[fix] compiler errors
TomasDmArg Feb 15, 2025
0f0a775
[fix] compiler warnings
TomasDmArg Feb 15, 2025
13e8c55
[feat] updated tests and removed admin fee rule
TomasDmArg Feb 15, 2025
765bc15
[wip] tests update
TomasDmArg Feb 15, 2025
31ab564
[fix] correct proxy initialization parameters in ChatterPayWalletFactory
TomasDmArg Feb 15, 2025
384a00b
[fix] enhance proxy safety and add structured storage pattern
TomasDmArg Feb 15, 2025
fbc548e
[fix] adapt deploy factory to the new implementation
TomasDmArg Feb 15, 2025
6d6d09c
[fix] adapt deploy factory (individual script) to the new implementation
TomasDmArg Feb 15, 2025
85c2fb6
[fix] remove redundant token whitelisting step
TomasDmArg Feb 15, 2025
d200ab3
[feat] added getters
TomasDmArg Feb 15, 2025
fc77d8a
[docs] :memo: update uniswap addresses in example_env (#75)
dappsar Feb 21, 2025
c9732a1
[feat] :sparkles: add logic to choose whether to deploy paymaster or …
dappsar Feb 21, 2025
871f701
[chore] :loud_sound: update logs/comments in DeployAllContracts
dappsar Feb 21, 2025
5830acd
[feat] :sparkles: add paymaster address env var in example_env (#69)
dappsar Feb 21, 2025
e178608
[test] :hammer: add script to run only one test by name (#70)
dappsar Feb 21, 2025
60efda9
[test] :hammer: add script in package.json to call on-test script (#70)
dappsar Feb 21, 2025
2af55e9
[chore] :technologist: print contracts addresses deployed in bdd form…
dappsar Feb 21, 2025
cbaa5c6
[ci] :poop: skip validatePaymasterUserOp tests until fix related erro…
dappsar Feb 21, 2025
339eda4
[chore] :loud_sound: add logs in testOwnerShipManagement test
dappsar Feb 21, 2025
12dd85b
[chore] :test_tube: replace function with onlyOwner to test in testOw…
dappsar Feb 21, 2025
8113fe7
[chore] :test_tube: update numbre to create temp wallet in testSignat…
dappsar Feb 21, 2025
b72afc5
[bug] :poop: skip funciton in contract until errors are fixed (#76)
dappsar Feb 21, 2025
3947271
[feat] :sparkles: add stake functions in Paymaster (#71)
dappsar Feb 21, 2025
af26377
[feat] :sparkles: cast entrypoint address to (#71)
dappsar Feb 21, 2025
15a0826
[docs] :memo: add Paymaster stake instructions in documentation (#71)
dappsar Feb 21, 2025
d31f07d
[chore] :loud_sound: add logs entry as a reminder to stake balance in…
dappsar Feb 21, 2025
a01a996
[chore] :loud_sound: add print to console as a reminder to copy Entry…
dappsar Feb 21, 2025
b009011
[feat] :sparkles: add events in init/end executeTokenTransfer (#74)
dappsar Feb 21, 2025
6ab2c4e
[feat] :sparkles: replace transfer by safeTransfer in executeTokenTra…
dappsar Feb 21, 2025
40a94e8
[feat] :sparkles: update balance validation in executeTokenTransfer
dappsar Feb 21, 2025
fd482ac
[feat] :sparkles: improve function _payPrefund in Chatterpay contract
dappsar Feb 21, 2025
c40e3e7
[fix] :bug: update and split logic in validateUserUp (#77)
dappsar Feb 21, 2025
23be503
[chore] :recycle: disable constructor with _disableInitializers in Ch…
dappsar Feb 21, 2025
c1be11c
[refactor] :recycle: update variable name to
dappsar Feb 21, 2025
79094f6
[chore] :bulb: add comment reminder to improve swap token list in Cha…
dappsar Feb 21, 2025
96000d9
merge fix/paymaster into develop (#78)
dappsar Feb 21, 2025
07f4610
[chore] :loud_sound: remove simpleSwapAddress from console.log in dep…
dappsar Mar 6, 2025
68f2f19
[chore] :loud_sound: add swapRouter in console.log in deployAllContracts
dappsar Mar 6, 2025
33b73c8
[fix] :bug: add try-catch when deployed_paymaster_address is empty in…
dappsar Mar 6, 2025
09fb956
[chore] :loud_sound: add missing comma in console.log in deployAllCon…
dappsar Mar 6, 2025
96eb6a2
merge fix/deploy-all-contracts into develop (#80)
dappsar Mar 6, 2025
4a4b5ec
[feat] :sparkles: allow to withdraw paymaster funds from stakeManager…
dappsar Mar 7, 2025
4ad9d5a
[feat] :sparkles: add arbiturm one (mainnet) config (#81)
dappsar Mar 7, 2025
b394c71
[chore] :bulb: update comments in HelperConfig.s.sol (#81)
dappsar Mar 7, 2025
23a3a52
[docs] :memo: add contracts deployments links in doc (#81)
dappsar Mar 7, 2025
340f7fa
merge feature/add-mainnet-config into develop (#82)
dappsar Mar 7, 2025
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
14 changes: 14 additions & 0 deletions .doc/content.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Content

## Technical Overview

* [Contracts Overview](./technical-overview/overview.md)
* [Contracts Details](./technical-overview/contracts-details.md)

## Development

* [Development Guidelines](./development/development-guidelines.md)

## Deployment

* [Deploy Guidelines](./deployment/deployment-guidelines.md)
56 changes: 56 additions & 0 deletions .doc/deployment/deployment-guidelines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Deployment Guidelines

## Contracts Deployment

Find contract deployment addresses by network at these links:

- USDT 0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9
- USDC (Circle): [Circle Contracts Addresses](https://www.circle.com/blog/usdc-on-arbitrum-now-available)
- WETH: [Arbitrum Contract Addresses](https://docs.arbitrum.io/build-decentralized-apps/reference/contract-addresses)
- Uniswap Swap Router: [Uniswap Contract Deployments](https://docs.uniswap.org/contracts/v3/reference/deployments/polygon-deployments)
- EntryPoint: [eth Infinitism - Account Abstraction](https://github.com/eth-infinitism/account-abstraction/releases/tag/v0.6.0)


## Paymaster Deployment

### Post-Deployment

After deploying a new Paymaster contract, you **MUST** perform the staking process to deposit ETH into the StakeManager of the EntryPoint. This step is essential for security purposes and is validated by the bundler to ensure the proper operation of the Paymaster contract. πŸ›‘οΈ

This is a critical step that you **cannot skip** after deployment. Failure to stake the required ETH will result in the bundler failing to validate the contract, and your transactions may not work correctly! 🚨

#### **How to Stake:**

1. **Run the following command to stake ETH in the Paymaster contract:**

```sh
cast send paymaster_contract_address "addStake(uint32)" 100000 --value 100000000000000000 --from backend_signer_wallet_address --rpc-url https://arb-sepolia.g.alchemy.com/v2/API_KEY_ALCHEMY --private-key _backend_signer_wallet_private_key
```

- `100000` represents the amount of seconds of unstake time.
- `100000000000000000` equals **0.1 ETH** to be staked.

**Important Notes:**
- Make sure you have enough ETH in the backend signer wallet to cover the stake.
- The staking process is required for security validation and interaction with the EntryPoint.

2. **To check the balance and verify the stake:**

```sh
cast call entrypoint_contract_address "getDepositInfo(address)(uint112,bool,uint112,uint32,uint48)" paymaster_contract_address --rpc-url https://arb-sepolia.g.alchemy.com/v2/API_KEY_ALCHEMY
```

This will return the deposit information, including the amount of staked ETH and other relevant details.

#### **Why Is This Important?**

- **Security:** The bundler validates this stake to ensure that the Paymaster contract can be used safely and securely within the ecosystem. πŸ›‘οΈ
- **Smooth Operations:** Without this staking, the contract will not pass bundler validation and operations will fail. ⚠️

#### **Additional Notes on StakeManager & Bundler**

The **StakeManager** within the EntryPoint is responsible for managing the ETH deposits that cover gas costs for Paymaster operations. By staking ETH in the StakeManager, you are essentially providing a guarantee that there are sufficient funds to pay for transaction fees. This step is critical for the bundler to validate and process transactions that the Paymaster is handling.

The **bundler** is a service that aggregates multiple transactions and ensures that gas is paid in an efficient manner. Without proper staking, the bundler will not validate the transactions, and the system will fail to function as intended.

Make sure you complete this step right after the Paymaster deployment, as it is a necessary part of the contract initialization. βœ…
48 changes: 48 additions & 0 deletions .doc/development/coding-guidelines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Coding guidelines

## Configuring Git's line ending handling

This cofniguration converts LF to CRLF when checking out in Windows systems and CRLF to LF when committing.

```sh
# Global Configuration: Applies the settings to all repositories on your system.
git config --global core.autocrlf true
```

```sh
# Local Configuration: Applies the settings only to the current repository.
git config core.autocrlf true
```


## Commit changes

It is recommended to use a linter for commit messages, which should be specified in the following format:

```sh
- [type] message
- [type] :icono: message
```

Example:

```sh
- commit -m [chore] add commitlinter
- commit -m [chore] :sparkles: add commitlinter (to commit with an icon, you can use [gitmoji](https://gitmoji.dev/))
```

The allowed standard types are:

```sh
- feat: A new feature for the user.
- fix: Fixes a bug that affects the user.
- perf: Changes that improve site performance.
- build: Changes in the build system, deployment tasks, or installation.
- ci: Changes in continuous integration.
- docs: Changes in documentation.
- refactor: Code refactoring such as variable or function name changes.
- style: Changes in formatting, tabs, spaces, or semicolons, etc.; do not affect the user.
- test: Adds tests or refactors an existing one.
- chore: Other changes that don't modify src or test files.
- revert: Reverts a previous commit.
```
146 changes: 146 additions & 0 deletions .doc/technical-overview/contracts-details.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# ChatterPay Contracts Details

## 1. [**ChatterPay.sol**](../../src/ChatterPay.sol)

### **High-Level Overview**:
The `ChatterPay` contract serves as the core of the ChatterPay ecosystem, acting as a smart wallet implementation that supports ERC-4337 account abstraction. It facilitates token transfers, fee management, Uniswap-based token swaps, and integration with price oracles for real-time token valuation.

### **Key Features**:
- **ERC-4337 Account Abstraction**: Supports user operations via the EntryPoint contract, enabling decentralized transaction validation.
- **Fee Management**: Implements a fee structure in USD cents, with customizable pool fees and slippage for token swaps.
- **Uniswap V3 Integration**: Executes token swaps with single-hop or multi-hop routes and customizable price tolerances.
- **Token Whitelisting and Price Feeds**: Allows only whitelisted tokens to be used, with price feeds from Chainlink oracles.
- **Batch Transfers**: Supports multiple token transfers in a single transaction.
- **Upgradeable**: Built using `UUPSUpgradeable` for future enhancements.

### **Relations with Other ChatterPay Contracts**:
- **ChatterPayPaymaster**: Works alongside the Paymaster to manage fees and user operations.
- **ChatterPayVault**: Can interact with the vault for secure asset storage and retrieval.
- **ChatterPayWalletFactory**: Deployed wallets are created and managed by the factory contract.

### **External Contract Interactions**:
- **Uniswap V3 Router**: Interacts with the swap router for token exchanges.
- **Chainlink Oracles**: Retrieves token prices to calculate fees and ensure transaction accuracy.

---

## 2. [**ChatterPayNFT.sol**](../../src/ChatterPayNFT.sol)

### **High-Level Overview**:
The `ChatterPayNFT` contract enables the minting and management of both original NFTs and their limited copies. It incorporates robust features for URI management, copy limits, and upgradeability.

### **Key Features**:
- **ERC721 NFTs**: Implements the ERC721 standard for unique digital assets.
- **Original and Copy NFTs**: Allows the creation of original NFTs and associated copies with defined limits.
- **Base URI Management**: Supports dynamic updates to the base URI by the contract owner.
- **Upgradeable**: Built using `UUPSUpgradeable` for seamless updates.

### **Relations with Other ChatterPay Contracts**:
- **ChatterPay**: NFTs can be linked to wallet activities for rewards or asset tracking.
- **ChatterPayVault**: Original and copy NFTs may serve as collateral or proof of ownership within the vault.

### **External Contract Interactions**:
- **ERC721URIStorage**: Provides extended functionality for metadata management.

---

## 3. [**ChatterPayPaymaster.sol**](../../src/ChatterPayPaymaster.sol)

### **High-Level Overview**:
The `ChatterPayPaymaster` contract validates and manages user operations in collaboration with the EntryPoint contract. It uses signature-based authentication to ensure secure and authorized transactions.

### **Key Features**:
- **Paymaster Role**: Acts as a trusted intermediary to sponsor transaction costs for users.
- **Signature Validation**: Ensures operations are authorized via backend-signed messages.
- **Fee Management**: Integrates seamlessly with the `ChatterPay` wallet for fee processing.
- **Upgradeable**: Can be enhanced with new functionalities over time.

### **Relations with Other ChatterPay Contracts**:
- **ChatterPay**: Handles operation validation and fee sponsorship for the wallet contract.

### **External Contract Interactions**:
- **EntryPoint**: Collaborates with the EntryPoint contract for operation validation.

---

## 4. [**ChatterPayVault.sol**](../../src/ChatterPayVault.sol)

### **High-Level Overview**:
The `ChatterPayVault` contract serves as a secure storage mechanism for password-protected commitments. It supports the reservation, redemption, and cancellation of payments.

### **Key Features**:
- **Password-Protected Payments**: Uses hashed passwords for added security in transactions.
- **Commitment Expiration**: Ensures timely redemption or cancellation of commitments.
- **ERC20 Integration**: Handles token-based payments securely.

### **Relations with Other ChatterPay Contracts**:
- **ChatterPay**: Interacts with the main wallet for secure payment and asset management.
- **ChatterPayNFT**: Supports NFTs as collateral or proof of ownership.

### **External Contract Interactions**:
- **ERC20**: Facilitates secure token transfers within the vault.

---

## 5. [**ChatterPayWalletFactory.sol**](../../src/ChatterPayWalletFactory.sol)

### **High-Level Overview**:
The `ChatterPayWalletFactory` contract is responsible for deploying and managing wallet proxies for users. It leverages deterministic address computation for predictable wallet creation.

### **Key Features**:
- **Wallet Proxy Creation**: Deploys upgradeable wallet proxies using the ERC1967 standard.
- **Proxy Tracking**: Maintains a record of all deployed wallet proxies.
- **Upgradeable**: Built to support future enhancements.

### **Relations with Other ChatterPay Contracts**:
- **ChatterPayWalletProxy**: Deploys and manages proxies for the core wallet.

---

## 6. [**ChatterPayWalletProxy.sol**](../../src/ChatterPayWalletProxy.sol)

### **High-Level Overview**:
The `ChatterPayWalletProxy` contract provides upgradeable functionality for wallets using the ERC1967 Proxy standard. It ensures that wallets can be updated without changing their addresses.

### **Key Features**:
- **Upgradeable Wallets**: Supports upgrades to wallet implementations while preserving state.
- **ERC1967 Standard**: Provides a reliable mechanism for proxy upgrades.

### **Relations with Other ChatterPay Contracts**:
- **ChatterPayWalletFactory**: Proxies are deployed and managed by the factory.
- **ChatterPay**: Proxies delegate calls to the main wallet implementation.

---

## 7. [**AggregatorV3Interface.sol**](../../src/interfaces/AggregatorV3Interface.sol)

### **High-Level Overview**:
The `AggregatorV3Interface` defines the interface for Chainlink price feeds. It enables the retrieval of real-time token prices and metadata.

### **Key Features**:
- **Price Feeds**: Provides real-time token prices from decentralized oracles.
- **Metadata Access**: Retrieves additional information like price feed descriptions and versions.

### **Relations with Other ChatterPay Contracts**:
- **ChatterPay**: Utilizes price feeds to calculate transaction fees and validate swaps.

### **External Contract Interactions**:
- **Chainlink Oracles**: Fetches price data for supported tokens.

---

## 8. [**ISwapRouter.sol**](../../src/interfaces/ISwapRouter.sol)

### **High-Level Overview**:
The `ISwapRouter` interface facilitates token swaps using the Uniswap V3 protocol. It supports both single-hop and multi-hop swaps with fine-grained control over slippage and fees.

### **Key Features**:
- **Token Swapping**: Enables efficient token exchanges within the ecosystem.
- **Customizable Parameters**: Supports exact input/output swaps with defined slippage tolerances.

### **Relations with Other ChatterPay Contracts**:
- **ChatterPay**: Executes swaps for supported tokens using the router.

### **External Contract Interactions**:
- **Uniswap V3**: Provides the infrastructure for token swaps.

52 changes: 52 additions & 0 deletions .doc/technical-overview/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# ChatterPay Contracts Overview

## Summary

These smart contracts collectively create a robust ecosystem for wallet management, token price feeds, and NFT handling. They provide flexibility, upgradeability, and security by implementing key features like account abstraction, secure wallet deployment, NFT minting, and real-time price data management. The system allows for efficient wallet creation, management of user operations, and the minting of original and copy NFTs, all while ensuring that transaction fees and external data feeds are properly handled.

## Contracts List:

1. [**ChatterPay.sol**](../../src/ChatterPay.sol)
Core wallet contract for ChatterPay, handling user operations, token transfers, and transaction fee management.

# ChatterPay Contracts Overview

## Summary

These smart contracts collectively form a powerful ecosystem for wallet management, token price feeds, NFT handling, and transaction facilitation. They offer flexibility, upgradeability, and security by implementing advanced features like account abstraction, Uniswap V3 integration, secure wallet deployment, NFT minting, password-protected vaults, and real-time price feed management. The system enables efficient wallet creation, user operations management, token swaps, and NFT minting with robust mechanisms to handle fees, slippage, and external data feeds.

## Contracts List:

1. [**ChatterPay.sol**](../../src/ChatterPay.sol)
Core wallet contract for ChatterPay, supporting ERC-4337 account abstraction, Uniswap integration, transaction fee management, and token whitelisting.

2. [**ChatterPayNFT.sol**](../../src/ChatterPayNFT.sol)
Manages the minting of original NFTs and their limited copies. Includes functionality for copy limits, metadata updates, and ownership management, using an upgradeable proxy structure.

3. [**ChatterPayPaymaster.sol**](../../src/ChatterPayPaymaster.sol)
Paymaster contract that validates and manages user operations with signature-based authentication and fee handling, integrated with the EntryPoint contract.

4. [**ChatterPayVault.sol**](../../src/ChatterPayVault.sol)
A vault contract that handles password-protected payments, commitments, and secure asset storage with mechanisms for reservation, redemption, and cancellation.

5. [**ChatterPayWalletFactory.sol**](../../src/ChatterPayWalletFactory.sol)
Factory contract for deploying and managing ChatterPay wallet proxies. Provides deterministic address computation, proxy tracking, and upgradeability.

6. [**ChatterPayWalletProxy.sol**](../../src/ChatterPayWalletProxy.sol)
An upgradeable proxy contract for ChatterPay wallets, leveraging the ERC-1967 Proxy standard to enable wallet upgrades and version control.

7. [**AggregatorV3Interface.sol**](../../src/interfaces/AggregatorV3Interface.sol)
Interface for interacting with Chainlink price feed aggregators, providing methods to fetch price data and metadata for token feeds.

8. [**ISwapRouter.sol**](../../src/interfaces/ISwapRouter.sol)
Interface for the Uniswap V3 swap router, enabling precise control over token swaps, slippage, and multi-hop routing.

---

Representation of Chatterpay's Smart Contracts Flow:


![ChatterPay Smart Contracts Flow](./images/chatterpay-contracts-flow.png)


[Here](./contracts-details.md) you can see a detailed breakdown of the provided smart contracts used for ChatterPay.
3 changes: 0 additions & 3 deletions .env.example

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/slither.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Smart Contract Security Analysis
on:
push:
branches:
- '*'
pull_request:
branches:
- develop
- main

jobs:
analyze:
name: Smart Contract Static Analysis
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js and Yarn
uses: actions/setup-node@v3
with:
node-version: '20.15.0'
cache: 'yarn'

- name: Install dependencies with Yarn
run: |
yarn install

- name: Run Slither
uses: crytic/[email protected]
id: slither
with:
fail-on: none
continue-on-error: true
Loading