{ "source_sha256": "40f4d84a2346613c5548b024d064818d79238bc7e337549482be02b282961634", "decimals": 6, "cases": [ { "label": "approve 5 LAB with balance 2 LAB", "method": "approve", "args": [ "0x2222222222222222222222222222222222222222", "5000000" ], "success": true, "error": null, "before": { "owner_balance_raw": "2000000", "recipient_balance_raw": "0", "allowance_raw": "0" }, "after": { "owner_balance_raw": "2000000", "recipient_balance_raw": "0", "allowance_raw": "5000000" }, "logs": 1, "events": [ "Approval" ] }, { "label": "try transfer 3 LAB: enough allowance, insufficient balance", "method": "transferFrom", "args": [ "0x1111111111111111111111111111111111111111", "0x3333333333333333333333333333333333333333", "3000000" ], "success": false, "error": "ERC20InsufficientBalance", "before": { "owner_balance_raw": "2000000", "recipient_balance_raw": "0", "allowance_raw": "5000000" }, "after": { "owner_balance_raw": "2000000", "recipient_balance_raw": "0", "allowance_raw": "5000000" }, "logs": 0, "events": [] }, { "label": "transfer 2 LAB", "method": "transferFrom", "args": [ "0x1111111111111111111111111111111111111111", "0x3333333333333333333333333333333333333333", "2000000" ], "success": true, "error": null, "before": { "owner_balance_raw": "2000000", "recipient_balance_raw": "0", "allowance_raw": "5000000" }, "after": { "owner_balance_raw": "0", "recipient_balance_raw": "2000000", "allowance_raw": "3000000" }, "logs": 1, "events": [ "Transfer" ] }, { "label": "test-only mint 4 more LAB", "method": "mintForLab", "args": [ "0x1111111111111111111111111111111111111111", "4000000" ], "success": true, "error": null, "before": { "owner_balance_raw": "0", "recipient_balance_raw": "2000000", "allowance_raw": "3000000" }, "after": { "owner_balance_raw": "4000000", "recipient_balance_raw": "2000000", "allowance_raw": "3000000" }, "logs": 1, "events": [ "Transfer" ] }, { "label": "spender uses remaining 3 LAB after top-up", "method": "transferFrom", "args": [ "0x1111111111111111111111111111111111111111", "0x3333333333333333333333333333333333333333", "3000000" ], "success": true, "error": null, "before": { "owner_balance_raw": "4000000", "recipient_balance_raw": "2000000", "allowance_raw": "3000000" }, "after": { "owner_balance_raw": "1000000", "recipient_balance_raw": "5000000", "allowance_raw": "0" }, "logs": 1, "events": [ "Transfer" ] }, { "label": "approve 5 then overwrite with 3: first 5", "method": "approve", "args": [ "0x2222222222222222222222222222222222222222", "5000000" ], "success": true, "error": null, "before": { "owner_balance_raw": "1000000", "recipient_balance_raw": "5000000", "allowance_raw": "0" }, "after": { "owner_balance_raw": "1000000", "recipient_balance_raw": "5000000", "allowance_raw": "5000000" }, "logs": 1, "events": [ "Approval" ] }, { "label": "approve 3 overwrites rather than adds", "method": "approve", "args": [ "0x2222222222222222222222222222222222222222", "3000000" ], "success": true, "error": null, "before": { "owner_balance_raw": "1000000", "recipient_balance_raw": "5000000", "allowance_raw": "5000000" }, "after": { "owner_balance_raw": "1000000", "recipient_balance_raw": "5000000", "allowance_raw": "3000000" }, "logs": 1, "events": [ "Approval" ] }, { "label": "set allowance to zero", "method": "approve", "args": [ "0x2222222222222222222222222222222222222222", "0" ], "success": true, "error": null, "before": { "owner_balance_raw": "1000000", "recipient_balance_raw": "5000000", "allowance_raw": "3000000" }, "after": { "owner_balance_raw": "1000000", "recipient_balance_raw": "5000000", "allowance_raw": "0" }, "logs": 1, "events": [ "Approval" ] }, { "label": "nonzero transfer after zero allowance fails", "method": "transferFrom", "args": [ "0x1111111111111111111111111111111111111111", "0x3333333333333333333333333333333333333333", "1" ], "success": false, "error": "ERC20InsufficientAllowance", "before": { "owner_balance_raw": "1000000", "recipient_balance_raw": "5000000", "allowance_raw": "0" }, "after": { "owner_balance_raw": "1000000", "recipient_balance_raw": "5000000", "allowance_raw": "0" }, "logs": 0, "events": [] }, { "label": "maximum uint256 approval in this implementation", "method": "approve", "args": [ "0x2222222222222222222222222222222222222222", "115792089237316195423570985008687907853269984665640564039457584007913129639935" ], "success": true, "error": null, "before": { "owner_balance_raw": "1000000", "recipient_balance_raw": "5000000", "allowance_raw": "0" }, "after": { "owner_balance_raw": "1000000", "recipient_balance_raw": "5000000", "allowance_raw": "115792089237316195423570985008687907853269984665640564039457584007913129639935" }, "logs": 1, "events": [ "Approval" ] }, { "label": "transfer 1 LAB with maximum approval", "method": "transferFrom", "args": [ "0x1111111111111111111111111111111111111111", "0x3333333333333333333333333333333333333333", "1000000" ], "success": true, "error": null, "before": { "owner_balance_raw": "1000000", "recipient_balance_raw": "5000000", "allowance_raw": "115792089237316195423570985008687907853269984665640564039457584007913129639935" }, "after": { "owner_balance_raw": "0", "recipient_balance_raw": "6000000", "allowance_raw": "115792089237316195423570985008687907853269984665640564039457584007913129639935" }, "logs": 1, "events": [ "Transfer" ] } ] }