Contrat

Contrat Token WRC-721
0x78d64baa7e…3038e60b0f

Solde WTG

0 WTG

0,00 FCFA (@ 23,09 FCFA/WTG)

Avoirs en tokens

0 token

≈ 0,00 FCFA

Plus d'infos

Transactions envoyées1
Dernière activitéil y a 54 s
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
0x548560e5b4… Mint NFT 40 924 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1130 0.00043184 WTG
0xbdaf6b7dcd… Mint NFT 40 921 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1129 0.00046042 WTG
0x4a6c77358b… Mint NFT 40 917 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1128 0.0004522 WTG
0xfefb816e79… Mint NFT 40 883 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1127 0.00061914 WTG
0x6b4ae10d0b… Mint NFT 40 866 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1126 0.00046963 WTG
0x382ac7c52b… Mint NFT 40 849 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1125 0.00046468 WTG
0xfa06bb2938… Mint NFT 40 833 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1124 0.00077601 WTG
0x23c29a269a… Mint NFT 40 732 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1123 0.0004243 WTG
0x2cbe1303d3… Mint NFT 40 678 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1122 0.00051109 WTG
0xa59e40f219… Mint NFT 40 673 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1121 0.00067242 WTG
0x771bc6af5a… Mint NFT 40 647 il y a 1 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1120 0.00052129 WTG
0xd51397efa6… Mint NFT 40 469 il y a 2 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1119 0.00043395 WTG
0x9c4bfe7652… Mint NFT 40 439 il y a 2 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1118 0.00053779 WTG
0x2ff61f38c0… Mint NFT 40 434 il y a 2 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1117 0.0004266 WTG
0x56fe173a00… Mint NFT 40 431 il y a 2 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1116 0.00050101 WTG
0x7751fe5818… Mint NFT 40 401 il y a 2 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1115 0.00056599 WTG
0xde2d48e91f… Mint NFT 40 378 il y a 2 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1114 0.00047194 WTG
0xf07b9a63e2… Mint NFT 40 371 il y a 2 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1113 0.00047387 WTG
0xa9614b4f29… Mint NFT 40 362 il y a 2 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1112 0.00047693 WTG
0xae4e4c78d6… Mint NFT 40 349 il y a 2 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1111 0.00050999 WTG
0x4e99e6edb0… Mint NFT 40 280 il y a 2 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1110 0.00057543 WTG
0xc109a940a1… Mint NFT 40 252 il y a 2 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1109 0.00049327 WTG
0x393cd8cdc0… Mint NFT 40 225 il y a 2 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1108 0.000473 WTG
0x2f0bb38397… Mint NFT 40 167 il y a 2 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1107 0.00047194 WTG
0xc587b955b1… Mint NFT 40 159 il y a 2 h 0x835164…ee75cc ENTR. 0x78d64b…e60b0f NFT #1106 0.00045639 WTG
Aucun transfert de token.
Tx parenteTypeDeÀValeur
Aucune transaction interne pour cette adresse.