Skip to content

Instantly share code, notes, and snippets.

View harshkumarchourasia's full-sized avatar
🦀

harshkumarchourasia

🦀
View GitHub Profile
# dependency inversion principle
##########################################
class FXConverter:
def convert(self, from_currency, to_currency, amount):
print(f'{amount} {from_currency} = {amount * 1.2} {to_currency}')
return amount * 1.2
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface OracleInterface{
function receiveRequest() external returns (uint256);
}
contract BaseContract{
uint public randomNumber = 0;
OracleInterface public obj;
mapping(uint256=>bool) myRequests;