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
0x7e286c6321… Échange 401 115 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 2421.12 AKW
≈ 38 975,65 FCFA
0.00010478 WTG
0xbfdefc6854… Échange 401 080 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1028.4538 WTG
≈ 24 117,22 FCFA
0.00008599 WTG
0x6a1f3603f4… Échange 400 910 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 405.12 AKW
≈ 6 521,80 FCFA
0.00010478 WTG
0x84f98e0b0a… Échange 400 827 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 205.6901 WTG
≈ 4 823,43 FCFA
0.00008599 WTG
0xecdefb7419… Échange 400 641 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 2017.57 AKW
≈ 32 479,12 FCFA
0.00010478 WTG
0xca5250e39a… Échange 400 587 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 206.509 WTG
≈ 4 842,63 FCFA
0.00008599 WTG
0xfb1198612b… Échange 400 540 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1231.6641 WTG
≈ 28 882,50 FCFA
0.00008599 WTG
0x3ef65555cb… Échange 400 391 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 405.92 AKW
≈ 6 534,66 FCFA
0.00010478 WTG
0x20c1e5d2dc… Échange 400 281 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 405.52 AKW
≈ 6 528,14 FCFA
0.00010478 WTG
0x554768447f… Échange 400 172 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1226.7607 WTG
≈ 28 767,52 FCFA
0.00008599 WTG
0x72a971cf40… Échange 400 065 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 611.5457 WTG
≈ 14 340,74 FCFA
0.00008599 WTG
0xc1512a7863… Échange 400 052 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1223.83 AKW
≈ 19 701,38 FCFA
0.00010478 WTG
0x4788ae3fe9… Échange 399 957 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 2433.06 AKW
≈ 39 167,76 FCFA
0.00010475 WTG
0xefd6292860… Échange 399 851 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 615.1984 WTG
≈ 14 426,39 FCFA
0.00008599 WTG
0x7a12c924a1… Échange 399 803 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 816.9966 WTG
≈ 19 158,56 FCFA
0.00008599 WTG
0xec2abb40c7… Échange 399 747 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 2435.45 AKW
≈ 39 206,34 FCFA
0.00010478 WTG
0xe9d0f75fc3… Échange 399 740 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1225.473 WTG
≈ 28 737,32 FCFA
0.00008599 WTG
0x34f3c1ac61… Échange 399 684 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 407.93 AKW
≈ 6 566,91 FCFA
0.00010478 WTG
0x0b9a54d3fd… Échange 399 352 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 814.5383 WTG
≈ 19 100,91 FCFA
0.00008599 WTG
0x74ab9b360a… Échange 399 324 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 609.0765 WTG
≈ 14 282,83 FCFA
0.00008599 WTG
0xeb422b1be9… Échange 399 132 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 405.2405 WTG
≈ 9 502,88 FCFA
0.00008599 WTG
0x55963cbca0… Échange 399 075 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1208.4708 WTG
≈ 28 338,62 FCFA
0.00008599 WTG
0xed5df2921e… Échange 398 892 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 2060.01 AKW
≈ 33 162,40 FCFA
0.00010478 WTG
0xb23a5a2195… Échange 398 830 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 1232.31 AKW
≈ 19 837,93 FCFA
0.00010478 WTG
0x75aa53c940… Échange 398 783 il y a 1 sem. 0x835164…ee75cc ENTR. 0x6f1c82…de7cc6 607.242 WTG
≈ 14 239,82 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