Skip to content

Instantly share code, notes, and snippets.

@dhananjayhegde
Created December 5, 2021 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhananjayhegde/7ba620df9aa06b8201c5d6e5f7557281 to your computer and use it in GitHub Desktop.
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=
//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