Contrat

Contrat
0x7dff5bfbdb…1e334a6325

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 6 j
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
0x7684199e4c… Échange 335 382 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 2799.97 SAHEL
≈ 63 231,75 FCFA
0.00010478 WTG
0x3aefcc409a… Échange 335 366 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 749.8034 WTG
≈ 17 582,88 FCFA
0.00008599 WTG
0x9d582ac49f… Échange 335 183 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 4199.89 SAHEL
≈ 94 845,93 FCFA
0.00010478 WTG
0x2b3a60d61c… Échange 335 102 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 699.28 SAHEL
≈ 15 791,86 FCFA
0.00010478 WTG
0xe09da0c67a… Échange 335 065 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 698.58 SAHEL
≈ 15 776,09 FCFA
0.00010478 WTG
0x0e5e1a2b98… Échange 334 929 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 751.2858 WTG
≈ 17 617,64 FCFA
0.00008599 WTG
0xbba3e0e6a0… Échange 334 894 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 498.8618 WTG
≈ 11 698,30 FCFA
0.00008599 WTG
0xcf5c609224… Échange 334 877 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 2811.01 SAHEL
≈ 63 481,08 FCFA
0.00010478 WTG
0x8305a25495… Échange 334 870 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 4191.38 SAHEL
≈ 94 653,70 FCFA
0.00010478 WTG
0xe1ea296449… Échange 334 867 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 251.4208 WTG
≈ 5 895,81 FCFA
0.00008599 WTG
0xd3eab65321… Échange 334 808 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 250.9189 WTG
≈ 5 884,05 FCFA
0.00008599 WTG
0x851987a00c… Échange 334 668 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 624.1766 WTG
≈ 14 636,93 FCFA
0.00008599 WTG
0xa8b4722e4c… Échange 334 522 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 124.7106 WTG
≈ 2 924,46 FCFA
0.00008599 WTG
0xddc153ac85… Échange 334 482 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 1408.28 SAHEL
≈ 31 803,23 FCFA
0.00010478 WTG
0xdd11456cfa… Échange 334 430 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 2106.11 SAHEL
≈ 47 562,16 FCFA
0.00010478 WTG
0x8802f0a49e… Échange 334 382 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 623.5474 WTG
≈ 14 622,18 FCFA
0.00008599 WTG
0x9a89c8e0c2… Échange 334 363 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 4207.97 SAHEL
≈ 95 028,34 FCFA
0.00010478 WTG
0xea75dedb1b… Échange 334 311 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 125.3301 WTG
≈ 2 938,99 FCFA
0.00008599 WTG
0x92dd4b9991… Échange 334 235 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 499.3233 WTG
≈ 11 709,12 FCFA
0.00008599 WTG
0x6d7f7356bd… Échange 334 150 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 704.12 SAHEL
≈ 15 901,17 FCFA
0.00010478 WTG
0x146f03ead4… Échange 334 088 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 3503.1 SAHEL
≈ 79 110,31 FCFA
0.00010478 WTG
0x892bce3348… Échange 334 000 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 3485.67 SAHEL
≈ 78 716,72 FCFA
0.00010478 WTG
0x7b4da69a67… Échange 333 958 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 126.0781 WTG
≈ 2 956,53 FCFA
0.00008599 WTG
0x7c2d40c07c… Échange 333 930 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 1392.87 SAHEL
≈ 31 455,17 FCFA
0.00010475 WTG
0x5534b2cd78… Échange 333 924 il y a 1 sem. 0x835164…ee75cc ENTR. 0x7dff5b…4a6325 503.3049 WTG
≈ 11 802,49 FCFA
0.00008599 WTG
SAH
Sahel Pay · il y a 6 j
1601.7805 SAHEL
≈ 36 172,91 FCFA
SAH
Sahel Pay · il y a 6 j
958.1851 SAHEL
≈ 21 638,63 FCFA
SAH
Sahel Pay · il y a 6 j
1922.102 SAHEL
≈ 43 406,71 FCFA
SAH
Sahel Pay · il y a 1 sem.
966.8087 SAHEL
≈ 21 833,38 FCFA
SAH
Sahel Pay · il y a 1 sem.
963.9083 SAHEL
≈ 21 767,88 FCFA
SAH
Sahel Pay · il y a 1 sem.
1927.8339 SAHEL
≈ 43 536,15 FCFA
SAH
Sahel Pay · il y a 1 sem.
1601.7087 SAHEL
≈ 36 171,29 FCFA
SAH
Sahel Pay · il y a 1 sem.
965.8246 SAHEL
≈ 21 811,16 FCFA
SAH
Sahel Pay · il y a 1 sem.
1601.6992 SAHEL
≈ 36 171,07 FCFA
SAH
Sahel Pay · il y a 1 sem.
1277.5152 SAHEL
≈ 28 850,05 FCFA
SAH
Sahel Pay · il y a 1 sem.
321.296 SAHEL
≈ 7 255,81 FCFA
SAH
Sahel Pay · il y a 1 sem.
320.3321 SAHEL
≈ 7 234,04 FCFA
SAH
Sahel Pay · il y a 1 sem.
1923.9092 SAHEL
≈ 43 447,52 FCFA
SAH
Sahel Pay · il y a 1 sem.
1290.2787 SAHEL
≈ 29 138,28 FCFA
SAH
Sahel Pay · il y a 1 sem.
324.506 SAHEL
≈ 7 328,30 FCFA
SAH
Sahel Pay · il y a 1 sem.
970.6064 SAHEL
≈ 21 919,14 FCFA
SAH
Sahel Pay · il y a 1 sem.
1935.3891 SAHEL
≈ 43 706,77 FCFA
SAH
Sahel Pay · il y a 1 sem.
325.1457 SAHEL
≈ 7 342,75 FCFA
SAH
Sahel Pay · il y a 1 sem.
1296.6811 SAHEL
≈ 29 282,87 FCFA
SAH
Sahel Pay · il y a 1 sem.
1946.9725 SAHEL
≈ 43 968,36 FCFA
SAH
Sahel Pay · il y a 1 sem.
1614.405 SAHEL
≈ 36 458,01 FCFA
SAH
Sahel Pay · il y a 1 sem.
1286.3785 SAHEL
≈ 29 050,21 FCFA
SAH
Sahel Pay · il y a 1 sem.
961.8982 SAHEL
≈ 21 722,49 FCFA
SAH
Sahel Pay · il y a 1 sem.
1277.4212 SAHEL
≈ 28 847,92 FCFA
SAH
Sahel Pay · il y a 1 sem.
955.2003 SAHEL
≈ 21 571,23 FCFA
Tx parenteTypeDeÀValeur
0x373005ab…f024a5 appel 0x7dff5b…4a6325 0x835164…ee75cc 1111.344674 WTG
≈ 26 061,01 FCFA
0x4ba84013…d911a1 appel 0x7dff5b…4a6325 0x835164…ee75cc 221.158277 WTG
≈ 5 186,16 FCFA
0x5992a332…be481f appel 0x7dff5b…4a6325 0x835164…ee75cc 221.378772 WTG
≈ 5 191,33 FCFA
0x02e7e87f…838196 appel 0x7dff5b…4a6325 0x835164…ee75cc 221.599486 WTG
≈ 5 196,50 FCFA
0x18a3687a…3736cb appel 0x7dff5b…4a6325 0x835164…ee75cc 1330.922528 WTG
≈ 31 210,11 FCFA
0xb4665411…ce298d appel 0x7dff5b…4a6325 0x835164…ee75cc 882.782105 WTG
≈ 20 701,22 FCFA
0xc4e8d07f…f84547 appel 0x7dff5b…4a6325 0x835164…ee75cc 443.15132 WTG
≈ 10 391,89 FCFA
0x3802b43d…7644e7 appel 0x7dff5b…4a6325 0x835164…ee75cc 666.052446 WTG
≈ 15 618,92 FCFA
0x0e99c834…37d0d2 appel 0x7dff5b…4a6325 0x835164…ee75cc 887.177435 WTG
≈ 20 804,29 FCFA
0xdf116bc9…b5506c appel 0x7dff5b…4a6325 0x835164…ee75cc 1328.098019 WTG
≈ 31 143,87 FCFA
0xc40d2181…c18b6f appel 0x7dff5b…4a6325 0x835164…ee75cc 445.347567 WTG
≈ 10 443,39 FCFA
0x2c54e9fa…27517a appel 0x7dff5b…4a6325 0x835164…ee75cc 223.117795 WTG
≈ 5 232,11 FCFA
0xe00729dd…ef59c4 appel 0x7dff5b…4a6325 0x835164…ee75cc 445.788909 WTG
≈ 10 453,74 FCFA
0xbadef7fe…6d8fcd appel 0x7dff5b…4a6325 0x835164…ee75cc 442.244313 WTG
≈ 10 370,62 FCFA
0xe72ae235…b513f0 appel 0x7dff5b…4a6325 0x835164…ee75cc 213.284039 WTG
≈ 5 001,51 FCFA
0x7759151b…2b5e99 appel 0x7dff5b…4a6325 0x835164…ee75cc 426.993367 WTG
≈ 10 012,99 FCFA
0x57170051…7b3a93 appel 0x7dff5b…4a6325 0x835164…ee75cc 213.922396 WTG
≈ 5 016,48 FCFA
0x097e67a5…04deb1 appel 0x7dff5b…4a6325 0x835164…ee75cc 213.070325 WTG
≈ 4 996,50 FCFA
0xd4e711ef…45139f appel 0x7dff5b…4a6325 0x835164…ee75cc 58.839019 WTG
≈ 1 379,77 FCFA
0x1ac92d55…56f9f9 appel 0x7dff5b…4a6325 0x835164…ee75cc 293.900607 WTG
≈ 6 891,96 FCFA
0xb4ff70ba…9a68c9 appel 0x7dff5b…4a6325 0x835164…ee75cc 58.720815 WTG
≈ 1 377,00 FCFA
0x920d3143…b0488f appel 0x7dff5b…4a6325 0x835164…ee75cc 293.8968 WTG
≈ 6 891,87 FCFA
0x75703215…7c246f appel 0x7dff5b…4a6325 0x835164…ee75cc 59.071962 WTG
≈ 1 385,24 FCFA
0x0ed31aea…c76b0c appel 0x7dff5b…4a6325 0x835164…ee75cc 173.543097 WTG
≈ 4 069,58 FCFA
0x1f2b2fc5…8f3ea5 appel 0x7dff5b…4a6325 0x835164…ee75cc 174.062164 WTG
≈ 4 081,75 FCFA