Contrat

Contrat
0x6f1c821fd6…005cde7cc6

Solde WTG

0 WTG

0,00 FCFA (@ 23,45 FCFA/WTG)

Avoirs en tokens

0 token

≈ 0,00 FCFA

Plus d'infos

Transactions envoyées0
Dernière activitéil y a 1 sem.
Première activitéil y a 3 sem.
Financé par

Code du contrat

✓ Vérifié

WtgPool · Solidity v0.8.35 · optimiseur activé (200 runs) · licence MIT

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

contract WCFA {
    string public name = "WINTG CFA";
    string public symbol = "WCFA";
    uint8 public decimals = 18;
    uint256 public totalSupply;
    address public owner;
    mapping(address => uint256) public balanceOf;
    mapping(address => mapping(address => uint256)) public allowance;
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    constructor() { owner = msg.sender; }

    function mint(address to, uint256 amt) external {
        require(msg.sender == owner, "!owner");
        totalSupply += amt;
        balanceOf[to] += amt;
        emit Transfer(address(0), to, amt);
    }
    function transfer(address to, uint256 amt) external returns (bool) { _t(msg.sender, to, amt); return true; }
    function approve(address s, uint256 amt) external returns (bool) {
        allowance[msg.sender][s] = amt; emit Approval(msg.sender, s, amt); return true;
    }
    function transferFrom(address f, address to, uint256 amt) external returns (bool) {
        uint256 a = allowance[f][msg.sender];
        require(a >= amt, "allow");
        if (a != type(uint256).max) allowance[f][msg.sender] = a - amt;
        _t(f, to, amt); return true;
    }
    function _t(address f, address to, uint256 amt) internal {
        require(balanceOf[f] >= amt, "bal");
        balanceOf[f] -= amt; balanceOf[to] += amt; emit Transfer(f, to, amt);
    }
}

contract TestToken {
    string public name;
    string public symbol;
    uint8 public decimals = 18;
    uint256 public totalSupply;
    address public owner;
    mapping(address => uint256) public balanceOf;
    mapping(address => mapping(address => uint256)) public allowance;
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    constructor(string memory n, string memory s, uint256 supply) {
        name = n; symbol = s; owner = msg.sender;
        totalSupply = supply; balanceOf[msg.sender] = supply;
        emit Transfer(address(0), msg.sender, supply);
    }
    function mint(address to, uint256 amt) external {
        require(msg.sender == owner, "!owner");
        totalSupply += amt; balanceOf[to] += amt; emit Transfer(address(0), to, amt);
    }
    function transfer(address to, uint256 amt) external returns (bool) { _t(msg.sender, to, amt); return true; }
    function approve(address sp, uint256 amt) external returns (bool) {
        allowance[msg.sender][sp] = amt; emit Approval(msg.sender, sp, amt); return true;
    }
    function transferFrom(address f, address to, uint256 amt) external returns (bool) {
        uint256 a = allowance[f][msg.sender]; require(a >= amt, "allow");
        if (a != type(uint256).max) allowance[f][msg.sender] = a - amt;
        _t(f, to, amt); return true;
    }
    function _t(address f, address to, uint256 amt) internal {
        require(balanceOf[f] >= amt, "bal");
        balanceOf[f] -= amt; balanceOf[to] += amt; emit Transfer(f, to, amt);
    }
}

contract TestNFT {
    string public name;
    string public symbol;
    uint256 public totalSupply;
    address public owner;
    mapping(uint256 => address) public ownerOf;
    mapping(address => uint256) public balanceOf;
    mapping(uint256 => address) public getApproved;
    event Transfer(address indexed from, address indexed to, uint256 indexed id);
    event Approval(address indexed owner, address indexed approved, uint256 indexed id);

    constructor(string memory n, string memory s) { name = n; symbol = s; owner = msg.sender; }
    function mint(address to) external returns (uint256 id) {
        id = ++totalSupply; ownerOf[id] = to; balanceOf[to]++; emit Transfer(address(0), to, id);
    }
    function transferFrom(address from, address to, uint256 id) external {
        require(ownerOf[id] == from, "own");
        require(msg.sender == from || getApproved[id] == msg.sender, "auth");
        ownerOf[id] = to; balanceOf[from]--; balanceOf[to]++; delete getApproved[id];
        emit Transfer(from, to, id);
    }
    function approve(address a, uint256 id) external {
        require(ownerOf[id] == msg.sender, "own"); getApproved[id] = a; emit Approval(msg.sender, a, id);
    }
}

interface IERC20 {
    function transfer(address to, uint256 amount) external returns (bool);
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
    function balanceOf(address) external view returns (uint256);
}

contract GasBurner {
    uint256 public acc;
    function churn(uint256 rounds) external {
        uint256 a = acc;

        assembly {
            for { let i := 0 } lt(i, rounds) { i := add(i, 1) } {
                mstore(0x00, a)
                mstore(0x20, i)
                a := keccak256(0x00, 0x40)
            }
        }
        acc = a;
    }
}

contract WtgPool {
    IERC20 public quote;
    address public owner;
    event Swap(address indexed who, bool wtgIn, uint256 amountIn, uint256 amountOut);

    constructor(address _quote) { quote = IERC20(_quote); owner = msg.sender; }

    function getReserves() external view returns (uint256 wtgReserve, uint256 quoteReserve) {
        return (address(this).balance, quote.balanceOf(address(this)));
    }

    function addLiquidity(uint256 quoteAmount) external payable {
        require(quote.transferFrom(msg.sender, address(this), quoteAmount), "quote in");
    }

    function _out(uint256 amountIn, uint256 rIn, uint256 rOut) internal pure returns (uint256) {
        uint256 inWithFee = amountIn * 997;
        return (inWithFee * rOut) / (rIn * 1000 + inWithFee);
    }

    function swapWtgForQuote(uint256 minOut) external payable returns (uint256 out) {
        uint256 rWtg = address(this).balance - msg.value;
        uint256 rQuote = quote.balanceOf(address(this));
        out = _out(msg.value, rWtg, rQuote);
        require(out >= minOut && out < rQuote, "slip");
        require(quote.transfer(msg.sender, out), "quote out");
        emit Swap(msg.sender, true, msg.value, out);
    }

    function swapQuoteForWtg(uint256 amountIn, uint256 minOut) external returns (uint256 out) {
        require(quote.transferFrom(msg.sender, address(this), amountIn), "quote in");
        uint256 rQuote = quote.balanceOf(address(this)) - amountIn;
        uint256 rWtg = address(this).balance;
        out = _out(amountIn, rQuote, rWtg);
        require(out >= minOut && out < rWtg, "slip");
        (bool ok, ) = msg.sender.call{value: out}("");
        require(ok, "wtg out");
        emit Swap(msg.sender, false, amountIn, out);
    }

    receive() external payable {}
}
[
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "_quote",
                "type": "address"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "constructor"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "who",
                "type": "address"
            },
            {
                "indexed": false,
                "internalType": "bool",
                "name": "wtgIn",
                "type": "bool"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "amountIn",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "amountOut",
                "type": "uint256"
            }
        ],
        "name": "Swap",
        "type": "event"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "quoteAmount",
                "type": "uint256"
            }
        ],
        "name": "addLiquidity",
        "outputs": [],
        "stateMutability": "payable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "getReserves",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "wtgReserve",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "quoteReserve",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "owner",
        "outputs": [
            {
                "internalType": "address",
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "quote",
        "outputs": [
            {
                "internalType": "contract IERC20",
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "amountIn",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "minOut",
                "type": "uint256"
            }
        ],
        "name": "swapQuoteForWtg",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "out",
                "type": "uint256"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "minOut",
                "type": "uint256"
            }
        ],
        "name": "swapWtgForQuote",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "out",
                "type": "uint256"
            }
        ],
        "stateMutability": "payable",
        "type": "function"
    },
    {
        "stateMutability": "payable",
        "type": "receive"
    }
]
HashMéthodeBlocÂgeDeÀMontantFrais
0xcaee33dfd7… Échange 402 477 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1044.0951 WTG
≈ 24 484,01 FCFA
0.00034241 WTG
0x5e89ed4634… Échange 402 474 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 399.19 AKW
≈ 6 426,23 FCFA
0.00034021 WTG
0xe5d607ec00… Échange 402 360 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 2380.86 AKW
≈ 38 327,41 FCFA
0.00040915 WTG
0x4d770dc6c5… Échange 402 350 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1186.87 AKW
≈ 19 106,39 FCFA
0.00051397 WTG
0xf57bbb28fb… Échange 402 335 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 840.2651 WTG
≈ 19 704,20 FCFA
0.00041638 WTG
0x9945eef8a1… Échange 402 243 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 209.8564 WTG
≈ 4 921,13 FCFA
0.00075674 WTG
0xe65755b424… Échange 402 223 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1044.0618 WTG
≈ 24 483,23 FCFA
0.00038889 WTG
0x7a2967d9e7… Échange 402 211 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1245.4018 WTG
≈ 29 204,65 FCFA
0.00036859 WTG
0xd8afb51640… Échange 402 141 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1237.974 WTG
≈ 29 030,47 FCFA
0.00031715 WTG
0x2bb344ec67… Échange 402 137 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 2411.77 AKW
≈ 38 825,04 FCFA
0.00037898 WTG
0x7802d52f70… Échange 402 115 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 802.31 AKW
≈ 12 915,85 FCFA
0.00039711 WTG
0xc5174ee920… Échange 401 968 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 828.5941 WTG
≈ 19 430,52 FCFA
0.000376 WTG
0x3369647f4a… Échange 401 943 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 2402.14 AKW
≈ 38 670,05 FCFA
0.00064439 WTG
0x5cbda940df… Échange 401 939 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1595.05 AKW
≈ 25 677,32 FCFA
0.00056877 WTG
0xe465cd4841… Échange 401 926 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1192.7 AKW
≈ 19 200,39 FCFA
0.00047369 WTG
0x013be4745b… Échange 401 909 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 209.6348 WTG
≈ 4 915,93 FCFA
0.00036964 WTG
0xb42aa93e18… Échange 401 882 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1250.3075 WTG
≈ 29 319,69 FCFA
0.00011691 WTG
0xc8ec813f7b… Échange 401 803 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1197.44 AKW
≈ 19 276,68 FCFA
0.00010487 WTG
0x9393386044… Échange 401 777 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1246.5678 WTG
≈ 29 231,99 FCFA
0.00008601 WTG
0x1af47a6863… Échange 401 580 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1239.133 WTG
≈ 29 057,65 FCFA
0.00008599 WTG
0x72cc7794e0… Échange 401 553 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 617.7133 WTG
≈ 14 485,37 FCFA
0.00008599 WTG
0x6aa73d4403… Échange 401 481 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 2015.65 AKW
≈ 32 448,32 FCFA
0.00010478 WTG
0x2071117eda… Échange 401 472 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 824.4258 WTG
≈ 19 332,77 FCFA
0.00008599 WTG
0x473b0946bf… Échange 401 403 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1210.58 AKW
≈ 19 488,17 FCFA
0.00010478 WTG
0x8605613a5f… Échange 401 380 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1232.9399 WTG
≈ 28 912,42 FCFA
0.00008599 WTG
AKW
Akwaba · il y a 1 sem.
737.6695 AKW
≈ 11 875,10 FCFA
AKW
Akwaba · il y a 1 sem.
2210.8285 AKW
≈ 35 590,20 FCFA
AKW
Akwaba · il y a 1 sem.
2197.6427 AKW
≈ 35 377,93 FCFA
AKW
Akwaba · il y a 1 sem.
1822.2576 AKW
≈ 29 334,93 FCFA
AKW
Akwaba · il y a 1 sem.
1090.0843 AKW
≈ 17 548,32 FCFA
AKW
Akwaba · il y a 1 sem.
2167.1656 AKW
≈ 34 887,31 FCFA
AKW
Akwaba · il y a 1 sem.
360.1106 AKW
≈ 5 797,11 FCFA
AKW
Akwaba · il y a 1 sem.
1081.4091 AKW
≈ 17 408,66 FCFA
AKW
Akwaba · il y a 1 sem.
2169.2873 AKW
≈ 34 921,46 FCFA
AKW
Akwaba · il y a 1 sem.
2182.264 AKW
≈ 35 130,36 FCFA
AKW
Akwaba · il y a 1 sem.
2195.3183 AKW
≈ 35 340,51 FCFA
AKW
Akwaba · il y a 1 sem.
2201.8846 AKW
≈ 35 446,22 FCFA
AKW
Akwaba · il y a 1 sem.
1097.6395 AKW
≈ 17 669,94 FCFA
AKW
Akwaba · il y a 1 sem.
1100.9225 AKW
≈ 17 722,79 FCFA
AKW
Akwaba · il y a 1 sem.
1104.2154 AKW
≈ 17 775,80 FCFA
AKW
Akwaba · il y a 1 sem.
1107.528 AKW
≈ 17 829,13 FCFA
AKW
Akwaba · il y a 1 sem.
736.8783 AKW
≈ 11 862,36 FCFA
AKW
Akwaba · il y a 1 sem.
1102.0015 AKW
≈ 17 740,16 FCFA
AKW
Akwaba · il y a 1 sem.
2204.0227 AKW
≈ 35 480,64 FCFA
AKW
Akwaba · il y a 1 sem.
732.4702 AKW
≈ 11 791,40 FCFA
AKW
Akwaba · il y a 1 sem.
1834.8269 AKW
≈ 29 537,28 FCFA
AKW
Akwaba · il y a 1 sem.
737.5894 AKW
≈ 11 873,81 FCFA
AKW
Akwaba · il y a 1 sem.
1108.5902 AKW
≈ 17 846,23 FCFA
AKW
Akwaba · il y a 1 sem.
1481.0781 AKW
≈ 23 842,58 FCFA
AKW
Akwaba · il y a 1 sem.
1842.1369 AKW
≈ 29 654,95 FCFA
Tx parenteTypeDeÀValeur
0xe0139d6d…7d6a93 appel 0x6f1c82…de7cc6 0x835164…ee75cc 378.887916 WTG
≈ 8 884,91 FCFA
0xd7bab26a…5d425b appel 0x6f1c82…de7cc6 0x835164…ee75cc 754.000537 WTG
≈ 17 681,30 FCFA
0x0f301068…d28dd5 appel 0x6f1c82…de7cc6 0x835164…ee75cc 749.494557 WTG
≈ 17 575,63 FCFA
0xe58eeb15…48dbc7 appel 0x6f1c82…de7cc6 0x835164…ee75cc 745.756815 WTG
≈ 17 487,98 FCFA
0xb56013e6…c18c09 appel 0x6f1c82…de7cc6 0x835164…ee75cc 551.52197 WTG
≈ 12 933,18 FCFA
0x21363734…847dc2 appel 0x6f1c82…de7cc6 0x835164…ee75cc 731.699718 WTG
≈ 17 158,35 FCFA
0x8fe9f340…68f754 appel 0x6f1c82…de7cc6 0x835164…ee75cc 367.308868 WTG
≈ 8 613,39 FCFA
0xc938b6a3…2ea235 appel 0x6f1c82…de7cc6 0x835164…ee75cc 735.347217 WTG
≈ 17 243,88 FCFA
0xa50071bf…613ae5 appel 0x6f1c82…de7cc6 0x835164…ee75cc 733.876523 WTG
≈ 17 209,39 FCFA
0x91c5ec95…68cb13 appel 0x6f1c82…de7cc6 0x835164…ee75cc 184.200805 WTG
≈ 4 319,51 FCFA
0x9ebb7193…b3e07a appel 0x6f1c82…de7cc6 0x835164…ee75cc 367.299708 WTG
≈ 8 613,17 FCFA
0xc8191b2f…80203d appel 0x6f1c82…de7cc6 0x835164…ee75cc 549.299462 WTG
≈ 12 881,06 FCFA
0x4050f217…68f1ce appel 0x6f1c82…de7cc6 0x835164…ee75cc 356.045039 WTG
≈ 8 349,25 FCFA
0xcc11fda3…49a4d4 appel 0x6f1c82…de7cc6 0x835164…ee75cc 531.405209 WTG
≈ 12 461,44 FCFA
0x4a146b26…2d91b5 appel 0x6f1c82…de7cc6 0x835164…ee75cc 177.31026 WTG
≈ 4 157,92 FCFA
0x42223da0…e4ace2 appel 0x6f1c82…de7cc6 0x835164…ee75cc 177.487038 WTG
≈ 4 162,07 FCFA
0x0dbb19fe…572b4e appel 0x6f1c82…de7cc6 0x835164…ee75cc 176.956168 WTG
≈ 4 149,62 FCFA
0x1f3847dc…7155af appel 0x6f1c82…de7cc6 0x835164…ee75cc 706.411141 WTG
≈ 16 565,33 FCFA
0x4723b3ac…d56e58 appel 0x6f1c82…de7cc6 0x835164…ee75cc 388.6688 WTG
≈ 9 114,28 FCFA
0x897e2c78…618d9c appel 0x6f1c82…de7cc6 0x835164…ee75cc 65.230215 WTG
≈ 1 529,65 FCFA
0x2fdb0d4a…972034 appel 0x6f1c82…de7cc6 0x835164…ee75cc 385.567255 WTG
≈ 9 041,55 FCFA
0x0ef254cf…e5c870 appel 0x6f1c82…de7cc6 0x835164…ee75cc 64.323999 WTG
≈ 1 508,40 FCFA
0xb278a867…fbe8b2 appel 0x6f1c82…de7cc6 0x835164…ee75cc 386.328784 WTG
≈ 9 059,40 FCFA
0xa0003bc3…0bd6cc appel 0x6f1c82…de7cc6 0x835164…ee75cc 331.978102 WTG
≈ 7 784,88 FCFA
0x4ae9e806…0adf8f appel 0x6f1c82…de7cc6 0x835164…ee75cc 396.345164 WTG
≈ 9 294,29 FCFA