Contrat

Contrat Token WRC-721
0x78d64baa7e…3038e60b0f

Solde WTG

0 WTG

0,00 FCFA (@ 20,13 FCFA/WTG)

Avoirs en tokens

0 token

≈ 0,00 FCFA

Plus d'infos

Transactions envoyées1
Dernière activitéil y a 1 min
Première activitéil y a 1 j
Financé par

Code du contrat

✓ Vérifié

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

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

/// Jeton de cotation (peg FCFA) — mintable par le déployeur, pour seed la liquidité.
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);
    }
}

/// Jeton ERC-20 de test générique (nom/symbole/offre au déploiement).
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);
    }
}

/// Collection NFT ERC-721 minimale (émet Transfer à 3 topics indexés → détecté ERC-721).
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);
}

/// Brûleur de gaz : consomme du gaz de façon contrôlée (vrais opcodes, vrai gaz)
/// pour simuler la DEMANDE réseau sur le devnet — les blocs se remplissent, le base
/// fee EIP-1559 monte/descend selon l'intensité, et le burn de frais devient réel.
contract GasBurner {
    uint256 public acc;
    function churn(uint256 rounds) external {
        uint256 a = acc;
        // Mémoire de travail FIXE (scratch 0x00-0x40) → coût de gaz CONSTANT par tour.
        // (abi.encodePacked dans une boucle allouerait de la mémoire à chaque tour →
        //  coût quadratique → la calibration sous-estime → out-of-gas.)
        assembly {
            for { let i := 0 } lt(i, rounds) { i := add(i, 1) } {
                mstore(0x00, a)
                mstore(0x20, i)
                a := keccak256(0x00, 0x40)
            }
        }
        acc = a;
    }
}

/// Pool AMM x*y=k : WTG natif (réserve = solde du contrat) ⟷ WCFA. Frais 0,3 %.
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; }

    /// Prix = quoteReserve / wtgReserve. Sélecteur 0x0902f1ac (compatible lecture explorer).
    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);
    }

    /// Vend du WTG (msg.value), reçoit de la WCFA → fait BAISSER le prix.
    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);
    }

    /// Vend de la WCFA, reçoit du WTG → fait MONTER le prix.
    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": "string",
                "name": "n",
                "type": "string"
            },
            {
                "internalType": "string",
                "name": "s",
                "type": "string"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "constructor"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "owner",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "approved",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "uint256",
                "name": "id",
                "type": "uint256"
            }
        ],
        "name": "Approval",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "from",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "to",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "uint256",
                "name": "id",
                "type": "uint256"
            }
        ],
        "name": "Transfer",
        "type": "event"
    },
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "a",
                "type": "address"
            },
            {
                "internalType": "uint256",
                "name": "id",
                "type": "uint256"
            }
        ],
        "name": "approve",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "",
                "type": "address"
            }
        ],
        "name": "balanceOf",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "name": "getApproved",
        "outputs": [
            {
                "internalType": "address",
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "to",
                "type": "address"
            }
        ],
        "name": "mint",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "id",
                "type": "uint256"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "name",
        "outputs": [
            {
                "internalType": "string",
                "name": "",
                "type": "string"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "owner",
        "outputs": [
            {
                "internalType": "address",
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "name": "ownerOf",
        "outputs": [
            {
                "internalType": "address",
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "symbol",
        "outputs": [
            {
                "internalType": "string",
                "name": "",
                "type": "string"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "totalSupply",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "from",
                "type": "address"
            },
            {
                "internalType": "address",
                "name": "to",
                "type": "address"
            },
            {
                "internalType": "uint256",
                "name": "id",
                "type": "uint256"
            }
        ],
        "name": "transferFrom",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    }
]
0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80636352211e116100665780636352211e146101415780636a6278421461016a57806370a082311461017d5780638da5cb5b1461019d57806395d89b41146101b057600080fd5b806306fdde03146100a3578063081812fc146100c1578063095ea7b31461010257806318160ddd1461011757806323b872dd1461012e575b600080fd5b6100ab6101b8565b6040516100b89190610517565b60405180910390f35b6100ea6100cf366004610565565b6006602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016100b8565b61011561011036600461059a565b610246565b005b61012060025481565b6040519081526020016100b8565b61011561013c3660046105c4565b6102f0565b6100ea61014f366004610565565b6004602052600090815260409020546001600160a01b031681565b610120610178366004610601565b61046d565b61012061018b366004610601565b60056020526000908152604090205481565b6003546100ea906001600160a01b031681565b6100ab61050a565b600080546101c590610623565b80601f01602080910402602001604051908101604052809291908181526020018280546101f190610623565b801561023e5780601f106102135761010080835404028352916020019161023e565b820191906000526020600020905b81548152906001019060200180831161022157829003601f168201915b505050505081565b6000818152600460205260409020546001600160a01b031633146102975760405162461bcd60e51b815260206004820152600360248201526237bbb760e91b60448201526064015b60405180910390fd5b60008181526006602052604080822080546001600160a01b0319166001600160a01b0386169081179091559051839233917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a45050565b6000818152600460205260409020546001600160a01b0384811691161461033f5760405162461bcd60e51b815260206004820152600360248201526237bbb760e91b604482015260640161028e565b336001600160a01b038416148061036c57506000818152600660205260409020546001600160a01b031633145b6103a15760405162461bcd60e51b815260040161028e906020808252600490820152630c2eae8d60e31b604082015260600190565b600081815260046020908152604080832080546001600160a01b0319166001600160a01b038781169190911790915586168352600590915281208054916103e783610673565b90915550506001600160a01b03821660009081526005602052604081208054916104108361068a565b909155505060008181526006602052604080822080546001600160a01b03191690555182916001600160a01b0385811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600060026000815461047e9061068a565b9182905550600081815260046020908152604080832080546001600160a01b0319166001600160a01b0388169081179091558352600590915281208054929350906104c88361068a565b909155505060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4919050565b600180546101c590610623565b602081526000825180602084015260005b818110156105455760208186018101516040868401015201610528565b506000604082850101526040601f19601f83011684010191505092915050565b60006020828403121561057757600080fd5b5035919050565b80356001600160a01b038116811461059557600080fd5b919050565b600080604083850312156105ad57600080fd5b6105b68361057e565b946020939093013593505050565b6000806000606084860312156105d957600080fd5b6105e28461057e565b92506105f06020850161057e565b929592945050506040919091013590565b60006020828403121561061357600080fd5b61061c8261057e565b9392505050565b600181811c9082168061063757607f821691505b60208210810361065757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000816106825761068261065d565b506000190190565b60006001820161069c5761069c61065d565b506001019056fea2646970667358221220be38d7e57ed0713c526440af93f181d1a9bf8ac9781c9826fb66ff25003fa12864736f6c63430008230033
HashMéthodeBlocÂgeDeÀMontantFrais
0x6a624ad1d0… Mint NFT 4 389 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #114 0.00092276 WTG
0x9dde2cf608… Mint NFT 4 376 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #113 0.00062844 WTG
0x10b87de707… Mint NFT 4 362 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #112 0.0004691 WTG
0x56d67642c1… Mint NFT 4 337 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #111 0.00168711 WTG
0x5aadf4b854… Mint NFT 4 323 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #110 0.00060337 WTG
0x5f04aa5f0f… Mint NFT 4 294 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #109 0.00052748 WTG
0x89aac4054b… Mint NFT 4 278 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #108 0.000478 WTG
0x0ed9a987a2… Mint NFT 4 163 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #107 0.0004113 WTG
0x2c4fa259bb… Mint NFT 4 105 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #106 0.00071962 WTG
0x457ccd08fc… Mint NFT 4 062 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #105 0.00069677 WTG
0x352a50d7d5… Mint NFT 4 018 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #104 0.00040768 WTG
0x2b20d68268… Mint NFT 3 935 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #103 0.0005412 WTG
0x794c400f8b… Mint NFT 3 922 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #102 0.00067812 WTG
0x0883d7df26… Mint NFT 3 880 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #101 0.00080967 WTG
0xfc61e7b3ff… Mint NFT 3 812 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #100 0.00075097 WTG
0xe12b7a2b19… Mint NFT 3 798 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #99 0.00048181 WTG
0x13b5c3ef1e… Mint NFT 3 790 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #98 0.00069567 WTG
0xcca731a5a0… Mint NFT 3 767 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #97 0.00130809 WTG
0x5b880a8ddd… Mint NFT 3 696 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #96 0.00040397 WTG
0xbb934d14f4… Mint NFT 3 694 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #95 0.00046215 WTG
0xc0b8648373… Mint NFT 3 617 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #94 0.00052601 WTG
0x819d6c565a… Mint NFT 3 584 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #93 0.00062292 WTG
0x050049b49b… Mint NFT 3 543 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #92 0.00059781 WTG
0x29410635e2… Mint NFT 3 538 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #91 0.00079609 WTG
0x431846678c… Mint NFT 3 530 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #90 0.00174417 WTG
Aucun transfert de token.
Tx parenteTypeDeÀValeur
Aucune transaction interne pour cette adresse.