Commit Graph

43 Commits

Author SHA1 Message Date
Ricardo Guilherme Schmidt ae22357df7 remove _burn impossible overflow 2023-09-27 10:57:17 -03:00
Ricardo Guilherme Schmidt eab5b42b17 remove _mint impossible overflow 2023-09-27 10:57:17 -03:00
Ricardo Guilherme Schmidt 2831aeae66 remove onTransfer impossible overflow check 2023-09-27 10:57:17 -03:00
Ricardo Guilherme Schmidt 178e7f0b7b remove approveAndCall impossible condition 2023-09-27 10:57:17 -03:00
Ricardo Guilherme Schmidt ff900fec1d improve updateValueAtNow 2023-09-27 10:57:17 -03:00
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
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
Ricardo Guilherme Schmidt a522ebb09d Make MiniMe implement ERC2612
Fixes vacp2p/minime#5
2023-09-26 11:11:38 +02: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 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 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
Ricardo Guilherme Schmidt 2a8505f3b2
update to solidity 0.8.19 (#1) 2023-09-12 16:22:43 +02:00
Jordi Baylina ea04d950ee
Minor bug fixed. And throw instead of return false when no funds is hited 2017-12-09 21:52:46 +01:00
Jordi Baylina 5665bd4e9a
Full refactor of the tests to use await method 2017-10-21 09:10:44 +02:00
sophiii 80dcefc3af Update MiniMeToken.sol
Since the change of `throw` to `require` should we upgrade the version number inside the contract?
2017-10-16 14:43:59 +01:00
eduardo-antuna 6c8548c80e Version adapter of SampleCampaign-TokenController.sol 2017-08-06 21:56:41 +02:00
Jordi Baylina 2b61f1c0fa
Version adapter 2017-08-04 10:32:33 +02:00
Jordi Baylina 8e46200213
Failsafe external tokens 2017-08-04 10:14:04 +02:00
Jordi Baylina 31b6bf3001
Readability of overflow check 2017-07-30 17:14:56 +02:00
Jordi Baylina d8983286f2
Fix Create and destroy tokens in cloned tokens 2017-07-30 10:41:34 +02:00
Jordi Baylina 68627576ca Fix race condition and allow to clone a token in the future 2017-05-18 10:16:43 +02:00
Jordi Baylina 4c367d1ba4 Keep the parent history when you clone a token 2017-05-03 15:22:42 +02:00
Jordi Baylina 81233b8c15 Merge pull request #6 from ameten/apostrophe
Replaced apostrophe with a more traditional one
2017-05-03 14:51:33 +02:00
Jordi Baylina a3204ab85a Merge pull request #12 from Giveth/approveAndCallFix
Approve and call fix
2017-05-03 14:50:48 +02:00
Jordi Baylina 95adb311c9 Fix some possible overflows 2017-05-02 15:22:19 +02:00
Jordi Baylina 41e87ca01f Approve and call use the approve function to be coherent with all the logic 2017-05-01 18:27:03 +02:00
Jordi Baylina 38b64110cc Compiled and tests passed 2017-05-01 17:36:04 +02:00
Jordi Baylina 282380156e Approve and call fix of the data param construction 2017-05-01 17:32:33 +02:00
Danil Nemirovsky 9fd455a4b6 - replaced apostrophe with a more traditional one. 2017-02-23 02:55:28 +03:00
Danil Nemirovsky 1489f7d90a - removed unnecessary apostrophe. 2017-02-23 02:20:22 +03:00
Jordi Baylina 3a7b72a50b Fix missed edition of the contract 2017-02-10 08:38:42 +01:00
Jordi Baylina 72437eabc6 test 2017-02-10 08:33:42 +01:00
Jordi Baylina c86e6db09b Refactor to ECMA6 (babel) and JS class added 2017-02-10 07:24:56 +01:00