Skip to content

Instantly share code, notes, and snippets.

View prince1456's full-sized avatar

Ali prince1456

  • Builddirect
  • Canada
  • 14:25 (UTC -07:00)
View GitHub Profile
@prince1456
prince1456 / .deps...github...1001-digital...erc721-extensions...contracts...RandomlyAssigned.sol
Created January 6, 2022 11:46
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=true&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./WithLimitedSupply.sol";
/// @author 1001.digital
/// @title Randomly assign tokenIDs from a given set of tokens.
abstract contract RandomlyAssigned is WithLimitedSupply {
// Used for random index assignment
mapping(uint256 => uint256) private tokenMatrix;
@prince1456
prince1456 / service.js
Created July 3, 2021 06:42 — forked from paulsturgess/service.js
An example Service class wrapper for Axios
import axios from 'axios';
class Service {
constructor() {
let service = axios.create({
headers: {csrf: 'token'}
});
service.interceptors.response.use(this.handleSuccess, this.handleError);
this.service = service;
}