Skip to content

Instantly share code, notes, and snippets.

View asmitb127's full-sized avatar
📖

Asmit B asmitb127

📖
View GitHub Profile
@asmitb127
asmitb127 / contracts...1_Storage.sol
Created January 14, 2022 06:38
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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage {
@asmitb127
asmitb127 / .deps...npm...@uniswap...lib...contracts...libraries...Babylonian.sol
Created July 21, 2021 12:20
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.6.6+commit.6c089d02.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.4.0;
// computes square roots using the babylonian method
// https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method
library Babylonian {
// credit for this implementation goes to
// https://github.com/abdk-consulting/abdk-libraries-solidity/blob/master/ABDKMath64x64.sol#L687
function sqrt(uint256 x) internal pure returns (uint256) {
@asmitb127
asmitb127 / ALMToken.sol
Last active July 27, 2021 03:40 — forked from bibekblockchain/ALMToken.sol
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.6.6+commit.6c089d02.js&optimize=false&runs=200&gist=
pragma solidity 0.8.0;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./AlbumFungibleToken.sol";
contract ALM is ERC1155, AccessControl{
using Counters for Counters.Counter;
@asmitb127
asmitb127 / vuze...myrouter.sol
Created July 21, 2021 08:57
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.0+commit.c7dfd78e.js&optimize=false&runs=200&gist=
/**
*Submitted for verification at Etherscan.io on 2020-06-05
*/
pragma solidity =0.8.0;
import './ALMToken.sol';
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
@asmitb127
asmitb127 / vuze...myrouter.sol
Created July 21, 2021 08:56
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.0+commit.c7dfd78e.js&optimize=false&runs=200&gist=
/**
*Submitted for verification at Etherscan.io on 2020-06-05
*/
pragma solidity =0.8.0;
import './ALMToken.sol';
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);