Get ready for airdrop by Base!

The network has 4 times fewer active users than zkSync. Learn how to deploy your own contract and make high-quality, inexpensive transactions.

1) First, you need to create a code file.

Go to https://remix.ethereum.org.

Click "Create new file" and name it.

Code:

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

contract Cryppinfluence {

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);

}

}

Copy the code and paste it into the Remix file.

2) Now compile and deploy the contract.

Go to "Solidity compiler", select version 0.8.0, and click on Compile.

Now go to "Deploy & run transactions".

Select "Environment: Metamask" (select Base network in wallet in advance).

Click on "Deploy".

Select low gas.

3) How to interact with the contract:

Enter a value.

Click "Donate".

Now click the "MoneyBack" button.

4) Contract Verification.

Copy the contract address into Remix.

Go to https://basescan.org and paste the address.

Open the Contract tab and click Verify & Publish.

Select the settings as shown in the screenshot below.

Paste the code and click Verify and Publish.

5) Interacting with the contract in BaseScan:

Open your contract page.

Open the Contract -> Write Contract tab.

Click "Connect to Web3."

Use the available functions.