Contrat

Contrat Token WRC-721
0x78d64baa7e…3038e60b0f

Solde WTG

0 WTG

0,00 FCFA (@ 21,83 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
0xb6e6cef5d5… Mint NFT 19 538 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #521 0.00011245 WTG
0xc7193ac7de… Mint NFT 19 488 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #520 0.00011245 WTG
0x97479288be… Mint NFT 19 455 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #519 0.00011245 WTG
0x58babcebae… Mint NFT 19 439 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #518 0.00011245 WTG
0x45e15024ac… Mint NFT 19 419 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #517 0.00011245 WTG
0x5b0d794810… Mint NFT 19 380 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #516 0.00011245 WTG
0x055509d6f2… Mint NFT 19 372 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #515 0.00011245 WTG
0x4fa4d23dac… Mint NFT 19 351 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #514 0.00011245 WTG
0xa79e3f1f7b… Mint NFT 19 289 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #513 0.00011245 WTG
0x6b75994a7c… Mint NFT 19 177 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #512 0.00011245 WTG
0x727a4e18e1… Mint NFT 19 128 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #511 0.00011245 WTG
0x68b9211bd7… Mint NFT 19 110 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #510 0.00011245 WTG
0x9dea61c289… Mint NFT 19 094 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #509 0.00011245 WTG
0x0bd73608cd… Mint NFT 19 070 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #508 0.00011245 WTG
0x46fe6fda0e… Mint NFT 19 050 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #507 0.00011245 WTG
0x3ec6b3a51b… Mint NFT 19 035 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #506 0.00011245 WTG
0x01f73952d9… Mint NFT 19 032 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #505 0.00011245 WTG
0xa26c0b3c6b… Mint NFT 18 940 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #504 0.00011245 WTG
0x6d07084378… Mint NFT 18 838 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #503 0.00011245 WTG
0x8d02a6474a… Mint NFT 18 783 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #502 0.00011245 WTG
0x50386a62c0… Mint NFT 18 739 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #501 0.00011245 WTG
0x70c05a6f8d… Mint NFT 18 728 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #500 0.00011245 WTG
0xfbab2e90ff… Mint NFT 18 681 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #499 0.00011245 WTG
0xfcd7c6d4f6… Mint NFT 18 663 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #498 0.00011245 WTG
0xe6a08b9cae… Mint NFT 18 651 il y a 1 j 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #497 0.00011245 WTG
Aucun transfert de token.
Tx parenteTypeDeÀValeur
Aucune transaction interne pour cette adresse.