Skip to content

Instantly share code, notes, and snippets.

View nCally's full-sized avatar
👋
Hey

Cally Nnamani nCally

👋
Hey
View GitHub Profile
@nCally
nCally / currency-symbols.xml
Created January 30, 2018 13:11 — forked from bzerangue/currency-symbols.xml
World currencies with their symbols
<?xml version="1.0" encoding="UTF-8"?>
<!--
## SOURCE: xe.com
-->
<currency-symbol count="115">
<entry code="ALL" unicode-decimal="76, 101, 107" unicode-hex="4c, 65, 6b">Albania Lek</entry>
<entry code="AFN" unicode-decimal="1547" unicode-hex="60b">Afghanistan Afghani</entry>
<entry code="ARS" unicode-decimal="36" unicode-hex="24">Argentina Peso</entry>
<entry code="AWG" unicode-decimal="402" unicode-hex="192">Aruba Guilder</entry>
<entry code="AUD" unicode-decimal="36" unicode-hex="24">Australia Dollar</entry>
Skip to content
Search or jump to…
Pull requests
Issues
Marketplace
Explore
@nCally
0
/* eslint-disable */
import $ from "jquery"
import { HubConnectionBuilder } from "@aspnet/signalr/dist/esm/HubConnectionBuilder";
import * as Logger from "@aspnet/signalr/dist/esm/Loggers"
import { LogLevel } from "@aspnet/signalr/dist/esm/ILogger";
export default class SignalRPlugin {
static connection = null;
static isConnected = false;
var jwt = require('jsonwebtoken');
var moment = require("moment");
function AdminLogin(req, res){
var { username, password } = req.body;
if(username === 'admin@sportshq'){
if(password === 'goodWordRep'){
res.status(200).json({
message:"logged in",
data:{
var jwt = require('jsonwebtoken');
function authorizationController(req, res, next){
var header = req.headers['authorization'];
let token;
if(typeof header !== 'undefined'){
const bearer = header.split(' ');
token = bearer[1];
}
if(!token){
{
"model": {
"paymentcode": "90106", Required
"customerId": "08034699322", Required
"amount": 200, Required
"emailAddress": "sam@gmail.com",
"phoneNumber": "08034699322", Required
"billerId": "901", Required
"meterNo": "",
"publicKey": "pk_test_5ntwb77rwnjl4k4ts0qk8tfdkgwedpjb", Required
@nCally
nCally / Groups.json
Last active November 11, 2020 10:11
Groups.json
{
"contractName": "Groups",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "oracle",
"type": "address"
}
@nCally
nCally / gist:87d6c27aff4ef5448ec737845e52194a
Created November 11, 2020 10:13
Where I call contract
import createEsusuContract from "./contract-creator";
import Groups from './abis/Groups.json';
import ADDRESS from "./abis/addresses";
async function getGroupsCount() {
const contract = await createEsusuContract(Groups.abi, ADDRESS.GROUPS);
@nCally
nCally / example.js
Last active June 27, 2021 18:59
Line 30 and 31 - Example how to use the function
import createContract from "../create.contract";
import EsusuService from '../abis/EsusuService.json';
import DAITokenAbi from '../abis/DaiContract.json';
import sendSignedTransaction from '../../utils/sendSignedTransaction';
import esusuInfo from './info';
export default async function (
cycleId: number,
provider: string,
export const sendSignedTransaction = async (tx, contractAddress) => {
const privatekey = ""; // your wallets secret key (very private, don't keep online)
const client = "";
const networkId = await web3.eth.net.getId();
const nonce = await web3.eth.getTransactionCount(client);
const gas = await tx.estimateGas({ from: client, nonce });
const gasPrice = await web3.eth.getGasPrice();
const data = tx.encodeABI();