Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import os
import requests
def getFormatedLine(key,value):
return "define( '"+key+"', '"+value+"' );"
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
library SafeMath {
/**
// server.js
// BASE SETUP
// =============================================================================
const EthereumTx = require('ethereumjs-tx').Transaction;
var BigNumber = require('bignumber.js');
var express = require('express'); // call express
var app = express(); // define our app using express
var bodyParser = require('body-parser');
{
"name": "nexen-reg",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
module.exports={
LISTEN_ADDRESS:"",
PRIVATE_KEY:'',
RPC:"",
RECEIVER_ADDRESS:"",
GAS_MODE:1, // fast 1 medium 2 low 3
}
// server.js
// BASE SETUP
// =============================================================================
const EthereumTx = require('ethereumjs-tx').Transaction;
var BigNumber = require('bignumber.js');
var express = require('express'); // call express
var app = express(); // define our app using express
var bodyParser = require('body-parser');
@shahzeb8285
shahzeb8285 / metadata.json
Created September 7, 2021 13:10
New Project
{"valueParameterDescriptions":[],"slotParameterDescriptions":[],"roleDescriptions":[],"contractType":"O","contractName":"","contractDescription":"","choiceDescriptions":[]}
@shahzeb8285
shahzeb8285 / metadata.json
Created September 7, 2021 13:11
Simple escrow
{"valueParameterDescriptions":[["Price","Amount of Lovelace to be paid by the *Buyer* for the item."]],"slotParameterDescriptions":[["Buyer's deposit timeout","Deadline by which the *Buyer* must deposit the selling *Price* in the contract."],["Buyer's dispute timeout","Deadline by which, if the *Buyer* has not opened a dispute, the *Seller* will be paid."],["Seller's response timeout","Deadline by which, if the *Seller* has not responded to the dispute, the *Buyer* will be refunded."],["Timeout for arbitrage","Deadline by which, if the *Arbiter* has not resolved the dispute, the *Buyer* will be refunded."]],"roleDescriptions":[["Arbiter","The party that will choose who gets the money in the event of a disagreement between the *Buyer* and the *Seller* about the outcome."],["Buyer","The party that wants to buy the item. Payment is made to the *Seller* if they acknowledge receiving the item."],["Seller","The party that wants to sell the item. They receive the payment if the exchange is uneventful."]],"contractTy
@shahzeb8285
shahzeb8285 / metadata.json
Created September 7, 2021 13:16
Swap of Ada and dollar tokens
{"valueParameterDescriptions":[["Amount of Ada","Amount of Ada to be exchanged for dollars."],["Amount of dollars","Amount of dollar tokens to be exchanged for Ada."]],"slotParameterDescriptions":[["Timeout for Ada deposit","Deadline by which Ada must be deposited."],["Timeout for dollar deposit","Deadline by which dollar tokens must be deposited (must be after the deadline for Ada deposit)."]],"roleDescriptions":[["Ada provider","The party that provides the Ada."],["Dollar provider","The party that provides the dollar tokens."]],"contractType":"S","contractName":"Swap of Ada and dollar tokens","contractDescription":"Takes Ada from one party and dollar tokens from another party, and it swaps them atomically.","choiceDescriptions":[]}
{
"name":"SHAHZ",
"symbol":"SHAH",
"description":"Test Token",
"image":"https://i.imgur.com/JXcRJlB.jpeg"
}