Created
December 5, 2021 16:50
-
-
Save dhananjayhegde/7ba620df9aa06b8201c5d6e5f7557281 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.1+commit.df193b15.js&optimize=undefined&runs=undefined&gist=
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SPDX-License-Identifier: MIT | |
pragma solidity >=0.6.0 <0.9.0; | |
contract FundMe { | |
mapping(address => uint256) public addressToAmountFunded; | |
// "payable" function -> accespts payment | |
// Every transaction has some inbuilt variables | |
// "msg" | |
// msg.sender => Sender of the transaction | |
// msg.value => amount of the transaction | |
function fund() public payable { | |
addressToAmountFunded[msg.sender] += msg.value; | |
// Get the conversion rate of ETH -> USD | |
// Need to solve the Oracle problem | |
// -> avoid having a central place to get information from | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment