Deploying a smart-contract Taiko

A quick guide to deploying the Taiko smart contract:

  • Go to this site.

  • Create a new file with the extension .sol (any name).

Creating a smart contract file
Creating a smart contract file
  • Copy and paste the following code into the file:

    // SPDX-License-Identifier: MIT
    
    pragma solidity ^0.8.0;
    
    
    contract ProfitMafia{
    
        address public owner;
        mapping (address => uint) public payments;
    
        constructor() {
            owner = msg.sender;
        }
    
        function Donate() public payable {
            payments[msg.sender] = msg.value;
        }
    
        function MoneyBack() public {
            address payable _to = payable(owner);
            address _thisContract = address(this);
            _to.transfer(_thisContract.balance);
        }
    }
    
    • Do not pay attention to the warning, press OK.

    • Press Ctrl+S.

    • Go to this tab, select the latest version of the compiler and click Compile.

Compiling smart contract code
Compiling smart contract code
  • Go to the next tab, select Injected Provider - MetaMask and check the wallet address.
    Important! The network in the wallet must be Taiko (Alpha-2 Testnet).
  • Click the Deploy button and sign the transaction.

    Done!

    Twitter

Subscribe to Avelder
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.