Skip to content

Instantly share code, notes, and snippets.

View Blazing-Mike's full-sized avatar
👷
Focusing

Michael Adebambo Blazing-Mike

👷
Focusing
View GitHub Profile
from collections import defaultdict
from test_framework.blocktools import (create_block, create_coinbase)
from test_framework.messages import CInv, MSG_BLOCK
from test_framework.p2p import (
P2PInterface,
msg_block,
msg_getdata,
p2p_lock,
)
pragma solidity 0.6.1;
interface MoneyToken {
function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);
}
contract Loan {
mapping(address => uint256) public loanRegistry;
address owner;
address public ngntTokenAddress;
@perfectmak
perfectmak / MeetupLoan.sol
Created March 1, 2020 11:45
A solidity Loan smart contract built at the blockchain meetup in Lagos
pragma solidity 0.6.1;
interface MoneyToken {
function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);
}
contract Loan {
mapping(address => int256) public loanRegistry;
address owner = 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c;
/**
@rylev
rylev / learn.md
Created March 5, 2019 10:50
How to Learn Rust

Learning Rust

The following is a list of resources for learning Rust as well as tips and tricks for learning the language faster.

Warning

Rust is not C or C++ so the way your accustomed to do things in those languages might not work in Rust. The best way to learn Rust is to embrace its best practices and see where that takes you.

The generally recommended path is to start by reading the books, and doing small coding exercises until the rules around borrow checking become intuitive. Once this happens, then you can expand to more real world projects. If you find yourself struggling hard with the borrow checker, seek help. It very well could be that you're trying to solve your problem in a way that goes against how Rust wants you to work.