Ctrl+K

🧪 FlameBorn Testnet Suite (ERC20 + African Identity/AccessControl) I. Contract Metadata and Deployment Test Description Expected/Check Contract deploys Constructor runs, events fire deployed() succeeds Name/symbol/decimals ERC20 metadata correct (FLB, “FlameBorn”, 18) Query returns expected Total supply Genesis supply matches (1_000_000*10^18 or param) totalSupply() as expected Admin/minter/roles assigned Admin and roles given to deployer hasRole(role, deployer) African identity registry/init Deployer auto-registered if feature is present Identity state true, event Script/Hardhat Example: js Copy Edit expect(await token.name()).to.equal("FlameBorn"); expect(await token.symbol()).to.equal("FLB"); expect(await token.decimals()).to.equal(18); expect(await token.totalSupply()).to.equal(parseUnits("1000000", 18)); II. ERC20 Functionality (Core Token Logic) Test Description Expected/Check Transfer basic Peer transfer succeeds Balances updated, event emitted Transfer all Transfer 100% of balance Sender balance zero Over-transfer Transfer more than balance Transaction reverts Approve/allowance/transferFrom Standard approve/spend flow All states/events correct Transfer to zero address Must revert Revert with correct error Transfer zero amount No change but valid, event fires No state change, Transfer event Mint/burn (if present) Only allowed roles can mint/burn Permissioned, events, state Script/Hardhat Example: js Copy Edit await token.transfer(addr1.address, 100); expect(await token.balanceOf(addr1.address)).to.equal(100); await expect(token.transfer(addr1.address, 1e30)).to.be.revertedWith("ERC20: transfer amount exceeds balance"); III. Roles & Permissions Test Description Expected/Check Role assign/revoke Only admin can assign/revoke roles Only admin txs succeed Unauthorized grant Non-admin tries to grant/revoke Should revert Role-protected function (e.g. mint) Non-minter/non-admin tries to mint/burn Should revert Event logs for role changes Events for all role changes Event fired IV. African Identity & Regional Features (Custom) Test Description Expected/Check African identity registration (user) Register a new African identity State/event/valid Re-registration prevention Cannot register twice Revert Unauthorized identity change Others can’t register for you Revert Admin identity verification Admin can verify others (if allowed) Event/state Edge-case countries/region Support for all African regions State as expected Diaspora/returnee registry If diaspora feature, test registration State/event Script/Hardhat Example: js Copy Edit await token.connect(addr1).registerAfricanID("NGA", "123456"); expect(await token.isAfrican(addr1.address)).to.be.true; await expect(token.connect(addr1).registerAfricanID("NGA", "789")).to.be.reverted; V. Security & Abuse Test Description Expected/Check Reentrancy No external calls allow reentrancy State not corrupted Blacklist/pause (if present) Pausing/blacklisting disables actions Reverts or blocks Large transfer Handles max uint256 transfers No overflow Gas limit stress Handles many events/edge cases No out of gas Fuzz transferFrom/allowance Edge-case fuzz for approvals No double spend VI. Event & Logging Test Description Expected/Check All critical events Transfer, Approval, RoleGranted, KYC Event fires Custom event data Payload matches spec Event data valid VII. Multichain/Explorer/Wallet UX Test Description Expected/Check BscScan/Blockscout verification Code verified and readable Green checkmark Symbol/name on wallets Wallet shows FLB, FlameBorn Correct display Explorer events visible All events log correctly Shown in explorer Valora/MetaMask/Trust integration Token import works Icon/name/symbol VIII. Upgrade/Proxy Pattern (If Upgradable) Test Description Expected/Check Proxy upgrade Only admin can upgrade Others revert State preserved Upgrade does not destroy state Supply/balances ok Rollback safety Can downgrade/upgrade again Proxy works Manual QA Table Step Action Expected Deploy Use testnet faucet, deploy contract Deployed Role/ownership Query admin roles Owner is correct Transfer Transfer tokens to 2–3 accounts Balances correct KYC/identity Register and verify African identity State true, event fires Explorer check Confirm code/events on Blockscout/BscScan Everything visible Wallet add Add token to wallet, check display Symbol/name as spec Extensible: Add More Africa-Centric Features Community governance: test proposal/voting flows if DAO logic present. Charity pool: allocate/withdraw, multi-sig if required. Fee mechanics: if transfer/mint/burn fees, test with precision. Airdrop logic: test edge cases, replay protection. Template: Hardhat Test Skeleton js Copy Edit describe("FlameBorn (FLB) ERC20 Token", function () { let token, deployer, addr1, addr2, addr3; beforeEach(async function () { [deployer, addr1, addr2, addr3] = await ethers.getSigners(); const Token = await ethers.getContractFactory("FlameBornTokenV3"); token = await Token.deploy(ethers.utils.parseUnits("1000000", 18)); await token.deployed(); }); it("Has correct name, symbol, decimals, and supply", async function () { /* ... */ }); it("Admin/minter roles assigned to deployer", async function () { /* ... */ }); it("Peer transfers work", async function () { /* ... */ }); it("ERC20 approve/allowance/transferFrom logic", async function () { /* ... */ }); it("African KYC/identity registration works", async function () { /* ... */ }); it("Role permissions and abuse edge-cases", async function () { /* ... */ }); it("Pausing/blacklisting disables actions", async function () { /* ... */ }); it("Upgrades work if proxy", async function () { /* ... */ }); }); Production Advice Automate all above tests with Hardhat/Foundry for each deployment and upgrade. Do full manual QA on at least two EVM testnets (e.g. Celo Alfajores, BSC testnet). Document your schema for future audits and open-source contributors. If you want real code templates for Hardhat, Foundry, or Remix for any specific section above, just ask—I'll generate them on the spot. Want multi-network deploy/verify scripts? Need a full Hardhat test file? Let me know your stack. Format aoo to this test net - Follow Up Deployment
b0f98cc
verified