Skip to content

Instantly share code, notes, and snippets.

View bibekblockchain's full-sized avatar

Bibek Koirala bibekblockchain

View GitHub Profile
#![no_std]
elrond_wasm::imports!();
const EGLD_DECIMALS_VALUE: u64 = 100000000;
#[elrond_wasm::contract]
pub trait CHECKERSale {
/// Necessary configuration when deploying:
/// `max_amount` - max amount of EGLD that can be used to buy $MUNCHKIN.
@bibekblockchain
bibekblockchain / Sales.rs
Created February 14, 2022 10:43
public sale for checkerchain
#![no_std]
elrond_wasm::imports!();
const EGLD_DECIMALS_VALUE: u64 = 100000000;
#[elrond_wasm::contract]
pub trait CHECKERSale {
/// Necessary configuration when deploying:
/// `max_amount` - max amount of EGLD that can be used to buy $MUNCHKIN.
scilla_version 0
library REDC
(* Error events *)
type Error =
| CodeNotAdmin
| CodeNotStagingAdmin
let make_error =
scilla_version 0
import ListUtils BoolUtils
library FlatDistributorProxy
let zero = Uint128 0
(* Error events *)
type Error =
@bibekblockchain
bibekblockchain / FlatDistributorProxy.scilla
Created December 4, 2021 09:48
Flat Sale Proxy for Demons
scilla_version 0
import ListUtils
library FlatDistributorProxy
let zero = Uint128 0
(* Error events *)
type Error =
@bibekblockchain
bibekblockchain / ALMToken.sol
Created July 20, 2021 07: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: MIT
// pragma solidity ^0.8.0;
pragma solidity =0.5.16;
import "./openZeppelin/ERC1155.sol";
import "./openZeppelin/Counters.sol";
import "./openZeppelin/AccessControl.sol";
import "./liquidityPool/core/libraries/SafeMath.sol";
import "./AlbumFungibleToken.sol";
@bibekblockchain
bibekblockchain / ALMToken.sol
Created July 20, 2021 07: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: MIT
// pragma solidity ^0.8.0;
pragma solidity =0.5.16;
import "./openZeppelin/ERC1155.sol";
import "./openZeppelin/Counters.sol";
import "./openZeppelin/AccessControl.sol";
import "./liquidityPool/core/libraries/SafeMath.sol";
import "./AlbumFungibleToken.sol";
@bibekblockchain
bibekblockchain / Election.sol
Created May 8, 2019 17:21
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.5.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity >=0.4.23;
contract Election{
//definition of candidates
struct Candidate{
uint id;
string name;
uint noOfVotes;
}
//mapping of candidates
@bibekblockchain
bibekblockchain / Evolve.sol
Created July 18, 2018 10:03
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.4.24+commit.e67f0147.js&optimize=true&gist=
pragma solidity ^0.4.23;
import "github.com/Arachnid/solidity-stringutils/strings.sol";
contract Polling{
using strings for *;
struct Event{
string name;
mapping(uint => Options) options;
uint optionsCount;