Contrat

Contrat Token WRC-721
0x78d64baa7e…3038e60b0f

Solde WTG

0 WTG

0,00 FCFA (@ 26,01 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
0x46ba66487e… Mint NFT 39 101 il y a 48 min 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1074 0.00075471 WTG
0xb34500eddb… Mint NFT 39 066 il y a 50 min 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1073 0.00048792 WTG
0xfc0b100891… Mint NFT 39 063 il y a 50 min 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1072 0.00045185 WTG
0x0d1361027b… Mint NFT 38 935 il y a 56 min 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1071 0.00042164 WTG
0xece120159a… Mint NFT 38 924 il y a 57 min 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1070 0.00068554 WTG
0x9f70dc8e75… Mint NFT 38 914 il y a 57 min 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1069 0.00082644 WTG
0x652f987cc6… Mint NFT 38 883 il y a 59 min 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1068 0.00040577 WTG
0x6388318952… Mint NFT 38 849 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1067 0.00107436 WTG
0xfd73444ce3… Mint NFT 38 789 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1066 0.00062649 WTG
0x2d86df6397… Mint NFT 38 776 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1065 0.0004806 WTG
0xfe9e0564c1… Mint NFT 38 774 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1064 0.00042646 WTG
0x5edac056b1… Mint NFT 38 764 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1063 0.00046612 WTG
0xcc11bedc27… Mint NFT 38 746 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1062 0.00044214 WTG
0x51a7d1c24a… Mint NFT 38 676 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1061 0.00045261 WTG
0xe42b27473c… Mint NFT 38 628 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1060 0.00043846 WTG
0x87136435c6… Mint NFT 38 614 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1059 0.00060817 WTG
0x71b48912a4… Mint NFT 38 607 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1058 0.0004411 WTG
0xca0f9b21e0… Mint NFT 38 588 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1057 0.00043967 WTG
0x3c9ac2b632… Mint NFT 38 570 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1056 0.00044302 WTG
0xaae258ad10… Mint NFT 38 525 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1055 0.00040016 WTG
0x315f975de6… Mint NFT 38 491 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1054 0.00044891 WTG
0x85b8c6c3c8… Mint NFT 38 462 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1053 0.00039066 WTG
0xbcc76f6861… Mint NFT 38 447 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1052 0.00053093 WTG
0xc3b02d6723… Mint NFT 38 443 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1051 0.00046688 WTG
0x3b0b8e275e… Mint NFT 38 420 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1050 0.00042847 WTG
Aucun transfert de token.
Tx parenteTypeDeÀValeur
Aucune transaction interne pour cette adresse.