Address Details
contract

0x7e7e0F9a9927512969a07A288F59797a36715792

Contract Name
CyberBurnTest
Creator
0xc09cf2–0915af at 0xccbbab–ac8fb5
Balance
0 CELO ( )
Locked CELO Balance
0.00 CELO
Voting CELO Balance
0.00 CELO
Pending Unlocked Gold
0.00 CELO
Tokens
Fetching tokens...
Transactions
1 Transactions
Transfers
3 Transfers
Gas Used
125,149
Last Balance Update
13581103
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
CyberBurnTest




Optimization enabled
false
Compiler version
v0.8.3+commit.8d00100c




EVM Version
istanbul




Verified at
2022-06-17T16:52:27.468321Z

contracts/carbonBurn.sol

// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.8.3;

import {ControlledSideToken} from "./Carbon/ControlledSideToken.sol";
import "./Uniswap/uniswpv2.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract CyberBurnTest {

    address public CARBOM = 0x32A9FE697a32135BFd313a6Ac28792DaE4D9979d;
    address private constant UNISWAP_V2_ROUTER = 0xE3D8bd6Aed4F159bc8000a9cD47CffDb95F96121;
    address private constant WETH = 0x471EcE3750Da237f93B8E339c536989b8978a438;

    constructor(
    ) public {
    }

    function uniwapCarbon(uint256 _amountIn) public returns (uint256[] memory amounts){
        IERC20(WETH).approve(UNISWAP_V2_ROUTER, _amountIn);
        address[] memory path = new address[](2);
        path[0] = WETH;
        path[1] = CARBOM;
        return IUniswapV2Router(UNISWAP_V2_ROUTER).swapExactTokensForTokens(_amountIn, 0, path, address(this), block.timestamp);
    }

    function mintMonthNFT() external payable {
        uint256[] memory amounts = uniwapCarbon(msg.value);
        uint256 co2Value = amounts[amounts.length - 1];

        // ControlledSideToken(CARBOM).burn(co2Value);
    }
}
        

/_openzeppelin/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}
          

/contracts/Carbon/ControlledSideToken.sol

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.3;

/// @author FlowCarbon LLC
/// @title The common interface of carbon credit tokens
contract ControlledSideToken {

    function burn(uint256 amount_) public virtual {}
}
          

/contracts/Uniswap/uniswpv2.sol

// SPDX-License-Identifier: AGPL-3.0-or-later

pragma solidity 0.8.3;
pragma experimental ABIEncoderV2;

interface IUniswapV2Router {
  function getAmountsOut(uint256 amountIn, address[] memory path)
    external
    view
    returns (uint256[] memory amounts);
  
  function swapExactTokensForTokens(
  
    //amount of tokens we are sending in
    uint256 amountIn,
    //the minimum amount of tokens we want out of the trade
    uint256 amountOutMin,
    //list of token addresses we are going to trade in.  this is necessary to calculate amounts
    address[] calldata path,
    //this is the address we are going to send the output tokens to
    address to,
    //the last time that the trade is valid for
    uint256 deadline
  ) external returns (uint256[] memory amounts);
}

interface IUniswapV2Pair {
  function token0() external view returns (address);
  function token1() external view returns (address);
  function swap(
    uint256 amount0Out,
    uint256 amount1Out,
    address to,
    bytes calldata data
  ) external;
}

interface IUniswapV2Factory {
  function getPair(address token0, address token1) external returns (address);
}
          

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"CARBOM","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"mintMonthNFT","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256[]","name":"amounts","internalType":"uint256[]"}],"name":"uniwapCarbon","inputs":[{"type":"uint256","name":"_amountIn","internalType":"uint256"}]}]
              

Contract Creation Code

0x60806040527332a9fe697a32135bfd313a6ac28792dae4d9979d6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555034801561006457600080fd5b506109e5806100746000396000f3fe6080604052600436106100345760003560e01c806331d9387c146100395780636ede110714610064578063b3c89747146100a1575b600080fd5b34801561004557600080fd5b5061004e6100ab565b60405161005b91906106d0565b60405180910390f35b34801561007057600080fd5b5061008b60048036038101906100869190610570565b6100cf565b6040516100989190610714565b60405180910390f35b6100a96103ce565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606073471ece3750da237f93b8e339c536989b8978a43873ffffffffffffffffffffffffffffffffffffffff1663095ea7b373e3d8bd6aed4f159bc8000a9cd47cffdb95f96121846040518363ffffffff1660e01b81526004016101349291906106eb565b602060405180830381600087803b15801561014e57600080fd5b505af1158015610162573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101869190610547565b506000600267ffffffffffffffff8111156101ca577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156101f85781602001602082028036833780820191505090505b50905073471ece3750da237f93b8e339c536989b8978a4388160008151811061024a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16816001815181106102df577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505073e3d8bd6aed4f159bc8000a9cd47cffdb95f9612173ffffffffffffffffffffffffffffffffffffffff166338ed17398460008430426040518663ffffffff1660e01b815260040161036f959493929190610736565b600060405180830381600087803b15801561038957600080fd5b505af115801561039d573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906103c69190610506565b915050919050565b60006103d9346100cf565b9050600081600183516103ec9190610853565b81518110610423577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190505050565b600061044461043f846107b5565b610790565b9050808382526020820190508285602086028201111561046357600080fd5b60005b85811015610493578161047988826104f1565b845260208401935060208301925050600181019050610466565b5050509392505050565b600082601f8301126104ae57600080fd5b81516104be848260208601610431565b91505092915050565b6000815190506104d681610981565b92915050565b6000813590506104eb81610998565b92915050565b60008151905061050081610998565b92915050565b60006020828403121561051857600080fd5b600082015167ffffffffffffffff81111561053257600080fd5b61053e8482850161049d565b91505092915050565b60006020828403121561055957600080fd5b6000610567848285016104c7565b91505092915050565b60006020828403121561058257600080fd5b6000610590848285016104dc565b91505092915050565b60006105a583836105c9565b60208301905092915050565b60006105bd83836106b2565b60208301905092915050565b6105d281610887565b82525050565b6105e181610887565b82525050565b60006105f282610801565b6105fc8185610831565b9350610607836107e1565b8060005b8381101561063857815161061f8882610599565b975061062a83610817565b92505060018101905061060b565b5085935050505092915050565b60006106508261080c565b61065a8185610842565b9350610665836107f1565b8060005b8381101561069657815161067d88826105b1565b975061068883610824565b925050600181019050610669565b5085935050505092915050565b6106ac816108cf565b82525050565b6106bb816108c5565b82525050565b6106ca816108c5565b82525050565b60006020820190506106e560008301846105d8565b92915050565b600060408201905061070060008301856105d8565b61070d60208301846106c1565b9392505050565b6000602082019050818103600083015261072e8184610645565b905092915050565b600060a08201905061074b60008301886106c1565b61075860208301876106a3565b818103604083015261076a81866105e7565b905061077960608301856105d8565b61078660808301846106c1565b9695505050505050565b600061079a6107ab565b90506107a682826108e1565b919050565b6000604051905090565b600067ffffffffffffffff8211156107d0576107cf610941565b5b602082029050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061085e826108c5565b9150610869836108c5565b92508282101561087c5761087b610912565b5b828203905092915050565b6000610892826108a5565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006108da826108c5565b9050919050565b6108ea82610970565b810181811067ffffffffffffffff8211171561090957610908610941565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b61098a81610899565b811461099557600080fd5b50565b6109a1816108c5565b81146109ac57600080fd5b5056fea2646970667358221220cc7468d38309216999c0dcbb7b3877e63dd7beba8d9ff940699bccb9412f44d164736f6c63430008030033

Deployed ByteCode

0x6080604052600436106100345760003560e01c806331d9387c146100395780636ede110714610064578063b3c89747146100a1575b600080fd5b34801561004557600080fd5b5061004e6100ab565b60405161005b91906106d0565b60405180910390f35b34801561007057600080fd5b5061008b60048036038101906100869190610570565b6100cf565b6040516100989190610714565b60405180910390f35b6100a96103ce565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606073471ece3750da237f93b8e339c536989b8978a43873ffffffffffffffffffffffffffffffffffffffff1663095ea7b373e3d8bd6aed4f159bc8000a9cd47cffdb95f96121846040518363ffffffff1660e01b81526004016101349291906106eb565b602060405180830381600087803b15801561014e57600080fd5b505af1158015610162573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101869190610547565b506000600267ffffffffffffffff8111156101ca577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156101f85781602001602082028036833780820191505090505b50905073471ece3750da237f93b8e339c536989b8978a4388160008151811061024a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16816001815181106102df577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505073e3d8bd6aed4f159bc8000a9cd47cffdb95f9612173ffffffffffffffffffffffffffffffffffffffff166338ed17398460008430426040518663ffffffff1660e01b815260040161036f959493929190610736565b600060405180830381600087803b15801561038957600080fd5b505af115801561039d573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906103c69190610506565b915050919050565b60006103d9346100cf565b9050600081600183516103ec9190610853565b81518110610423577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190505050565b600061044461043f846107b5565b610790565b9050808382526020820190508285602086028201111561046357600080fd5b60005b85811015610493578161047988826104f1565b845260208401935060208301925050600181019050610466565b5050509392505050565b600082601f8301126104ae57600080fd5b81516104be848260208601610431565b91505092915050565b6000815190506104d681610981565b92915050565b6000813590506104eb81610998565b92915050565b60008151905061050081610998565b92915050565b60006020828403121561051857600080fd5b600082015167ffffffffffffffff81111561053257600080fd5b61053e8482850161049d565b91505092915050565b60006020828403121561055957600080fd5b6000610567848285016104c7565b91505092915050565b60006020828403121561058257600080fd5b6000610590848285016104dc565b91505092915050565b60006105a583836105c9565b60208301905092915050565b60006105bd83836106b2565b60208301905092915050565b6105d281610887565b82525050565b6105e181610887565b82525050565b60006105f282610801565b6105fc8185610831565b9350610607836107e1565b8060005b8381101561063857815161061f8882610599565b975061062a83610817565b92505060018101905061060b565b5085935050505092915050565b60006106508261080c565b61065a8185610842565b9350610665836107f1565b8060005b8381101561069657815161067d88826105b1565b975061068883610824565b925050600181019050610669565b5085935050505092915050565b6106ac816108cf565b82525050565b6106bb816108c5565b82525050565b6106ca816108c5565b82525050565b60006020820190506106e560008301846105d8565b92915050565b600060408201905061070060008301856105d8565b61070d60208301846106c1565b9392505050565b6000602082019050818103600083015261072e8184610645565b905092915050565b600060a08201905061074b60008301886106c1565b61075860208301876106a3565b818103604083015261076a81866105e7565b905061077960608301856105d8565b61078660808301846106c1565b9695505050505050565b600061079a6107ab565b90506107a682826108e1565b919050565b6000604051905090565b600067ffffffffffffffff8211156107d0576107cf610941565b5b602082029050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061085e826108c5565b9150610869836108c5565b92508282101561087c5761087b610912565b5b828203905092915050565b6000610892826108a5565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006108da826108c5565b9050919050565b6108ea82610970565b810181811067ffffffffffffffff8211171561090957610908610941565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b61098a81610899565b811461099557600080fd5b50565b6109a1816108c5565b81146109ac57600080fd5b5056fea2646970667358221220cc7468d38309216999c0dcbb7b3877e63dd7beba8d9ff940699bccb9412f44d164736f6c63430008030033