lynnux

Logo

☁️ customer engineer at google
🏂 snowboarder
🍞 carb addict
🏘 real estate investor
💃🏻 dancer
✈️ traveler
📖 learner
👾 ex-gamer with semi-annual relapses
☕️ fueled by caffeine


linkedin github

Journal

15 Nov 2021


TIL

I spent this morning’s deep work session studying more Solidity.

Solidity

Today’s session was pretty difficult. I’m at the point where things start to move faster and are harder to grasp. It’s where I think most beginners give up.

If it’s easy, you’re not learning.

Here’s what I have so far; it’s unfinished code because there was too much to take in at too quick of a pace. I needed to stop and process before moving forward:

// SPDX-License-Identifier: MIT 

solidity >=0.6.6 <0.9.0;

import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol";

contract FundMe {
    
    mapping(address => uint256) public addressToAmountFunded;
    
    function fund() public payable {
        addressToAmountFunded[msg.sender] += msg.value;
        // ETH -> USD conversion rate
    }
    
    function getVersion() public view returns (uint256) {
        AggregatorV3Interface priceFeed = AggregatorV3Interface(0x8A753747A1Fa494EC906cE90E9f37563A8AF630e);
        return priceFeed.version();
    }
    
    function getPrice() public view returns(uint256) {
        AggregatorV3Interface priceFeed = AggregatorV3Interface(0x8A753747A1Fa494EC906cE90E9f37563A8AF630e);
        (,int256 answer,,,) = priceFeed.latestRoundData();
        return uint256(answer * 10000000000); // return in Wei
    }
}


EOSIO

I learned a bit about the EOSIO blockchain platform over the weekend.

My certificate.


General

I’ve been allocating too much time on learning Blockchain that I’ve fallen a bit behind on work. Everything requires such a delicate balance. I don’t do balance though. I’ll just go all-in on work momentarily and crank out a bunch of items. Then I can go back to all-in on blockchain studies!