Ricardo Guilherme Schmidt
524cb67110
improve getValueAt
2023-09-27 10:57:17 -03:00
Ricardo Guilherme Schmidt
3720dc7baa
remove minimetokenfactory
2023-09-27 10:57:17 -03:00
Ricardo Guilherme Schmidt
8b541109ec
fix gas snapshot and gas report
2023-09-26 12:43:16 -03:00
r4bbit
0a23a2440d
test: mark `unsupported` function as `pure`
2023-09-26 11:12:30 +02:00
r4bbit
2a241edd26
fix(MiniMeBase): make `burn()` and `mint()` virtual
...
Otherwise they can't be overriden, which is necessary when inheriting
contracts. This commit also renames `burn()` to `_burn()` and `mint()`
to `_mint()`, simply to allow inheriting contracts to make use of those
non-underscored function names instead.
2023-09-26 11:12:13 +02:00
r4bbit
ed9dcfc602
refactor: use ECDSA utils function for typed hash digest
2023-09-26 11:11:38 +02:00
Ricardo Guilherme Schmidt
ada12df49f
remove console from import on tests
2023-09-26 11:11:38 +02:00
Ricardo Guilherme Schmidt
d7f0d85921
add tests for permit
2023-09-26 11:11:38 +02:00
Ricardo Guilherme Schmidt
a522ebb09d
Make MiniMe implement ERC2612
...
Fixes vacp2p/minime#5
2023-09-26 11:11:38 +02:00
Ricardo Guilherme Schmidt
38d62c5517
fixes suggested by r4bbit
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
30bec58904
add more calls in clone test
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
7db2900a30
lint
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
df3283f42f
add initial balances check
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
c3358184de
add TestSnapshotReads
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
32a95501db
add testFutureParentSnapshot
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
2e02cea311
add receiving and rejecting ether tests
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
9ca2aa6164
add test generate token supply overflow
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
ce893b35e9
use IERC20 for claimTokens test
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
4a95c739b5
add test for transfer with controller zero
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
bb7bc3a6d7
add tests destroy tokens balance and supply check
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
22f02cb230
add rejecting controller tests
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
11bc73a42e
fix error in merge
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
6cf3528f01
add approve and call test
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
16d3feb5d9
add allowance tests
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
e69486197c
add transfer tests
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
86a889ab1c
add claimtokens test
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
18827999ec
add more transfer tests for different situations
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
c105703c8a
fix gas metering
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
64fdb4f4e8
lint
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
10870e7908
add strings at assertions
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
3000e7614e
add test for updateValueAtNow when same block
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
0e98139632
pause and resume gas meterings
2023-09-26 02:47:46 -03:00
Ricardo Guilherme Schmidt
678a35589c
removed createCloneToken functionality
2023-09-26 02:29:57 -03:00
Ricardo Guilherme Schmidt
c64845eddc
fix overflow checks
2023-09-25 20:07:27 -03:00
Ricardo Guilherme Schmidt
3f95a3bcf9
make abstract and concrete versions
...
add gas reports
move event from abstract to concrete
lint
2023-09-25 12:54:24 -03:00
Ricardo Guilherme Schmidt
461d865527
rename minitoken
2023-09-25 12:54:24 -03:00
Ricardo Guilherme Schmidt
e715502da1
Check for reentrancy double spend on onTransfer ( #29 )
...
* chore: add missing trailing slash in remapping
This was not causing any compilation issues, but the solidity language
server gets confused by this and complains about incorrect import
statements otherwise.
* TokenController interactions after balance updates
This test demonstrates that all transfer methods are vulnerable to
callback reentrancy attacks if the controller of the `MiniMeToken` is
malicious.
---------
Co-authored-by: r4bbit <445106+0x-r4bbit@users.noreply.github.com>
2023-09-22 20:25:23 +02:00
Ricardo Guilherme Schmidt
85ca91ccc9
replace forge test with pnpm gas-report
2023-09-19 10:36:28 -03:00
Ricardo Guilherme Schmidt
aa8cee3b8f
gas-report output to console + save filter output
2023-09-19 10:36:28 -03:00
Ricardo Guilherme Schmidt
6bf228162d
add gas-report tracking
2023-09-19 10:36:28 -03:00
r4bbit
0caec481cb
docs: add CI and codecov badges
...
Our fork has diverged significantly from its upstream repository, so we
should show the CI and codecov of its own source.
2023-09-19 09:58:19 -03:00
r4bbit
fe4146bccb
cleanup: remove unused javascript tests
...
These have been ported to foundry tests.
2023-09-19 09:57:50 -03:00
Ricardo Guilherme Schmidt
9014aee8a2
set immutables and constants
...
Fixes vacp2p/minime#21
2023-09-15 09:37:53 -03:00
Ricardo Guilherme Schmidt
d6ce59e502
Separate contracts source into dedicated files
...
Fixes vacp2p/minime#15
2023-09-14 13:34:43 -03:00
Ricardo Guilherme Schmidt
b899e5a8ec
Make MiniMe implement OZ ERC20
...
Fixes vacp2p/minime#4
2023-09-14 11:46:00 -03:00
Ricardo Guilherme Schmidt
c8581cd22d
remove string error messages
2023-09-13 11:47:40 -03:00
Ricardo Guilherme Schmidt
2636a070b1
add gas snapshot before changes
2023-09-13 11:47:40 -03:00
Ricardo Guilherme Schmidt
ed1df75a92
fix lint on SampleCampaign ( #12 )
2023-09-12 15:25:29 -03:00
Ricardo Guilherme Schmidt
a7237e0bc9
Fix-lint ( #10 )
...
* fix lint issues
* add require error msg
* fix warnings with 'forge fmt'
* fix grammar
2023-09-12 14:08:26 -03:00
r4bbit
5386b09f55
tests: port existing JS tests to foundry tests ( #9 )
2023-09-12 17:08:59 +02:00