filswan / swan-faucet

Simple smart contract based ERC20 faucet for Ethereum
MIT License
1 stars 2 forks source link

add config with maxAmount, check tokenAmounts resolves #20 #22

Closed rykci closed 2 years ago

rykci commented 2 years ago

add tokenConfig file

inside checkFaucetBalance function

rykci commented 2 years ago

example response when i request 100 USDC, 0.2 MATIC

[
    {
        "address": "0xe11A86849d99F524cAC3E7A0Ec1241828e332C62",
        "result": 0
    },
    {
        "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
        "result": -1,
        "err": "exceeding maximum amount"
    },
    {
        "tx_hash": "0xc1b998cf09a75a5ad21285c69070ccf95fd8d0a46accfaf58c35a29614d2bc8e"
    }
]