Skip to content

Instantly share code, notes, and snippets.

View viraj124's full-sized avatar
💻
Blockchaining:)

Viraz Malhotra viraj124

💻
Blockchaining:)
View GitHub Profile
yarn install v1.22.4
info No lockfile found.
[1/4] Resolving packages...
warning @skalenetwork/filestorage.js > web3 > web3-core > @types/bignumber.js@5.0.0: This is a stub types definition for bignumber.js (https://github.com/MikeMcl/bignumber.js/). bignumber.js provides its own type definitions, so you don't need @types/bignumber.js installed!
warning @skalenetwork/filestorage.js > web3 > web3-bzz > swarm-js > mkdirp-promise@5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
warning @skalenetwork/filestorage.js > web3 > web3-eth > web3-eth-accounts > @web3-js/scrypt-shim@0.1.0: This package is deprecated, for a pure JS implementation please use scrypt-js
warning @skalenetwork/filestorage.js > web3 > web3-core > web3-core-requestmanager > web3-providers-ws > @web3-js/websocket@1.0.30: The branch for this fork was merged upstream, please update your package to websocket@1.0.31
warning @skalenetwork/filestorage.js > web3 > web3-bzz > swarm-js >
global.XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
const {SpaceClient} = require("@fleekhq/space-client");
const client = new SpaceClient({url: `http://localhost:9998`});
(async () => {
console.log(await client.generateKeyPairWithForce());
const bucket = "personal"
// try {
global.XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
const {SpaceClient} = require("@fleekhq/space-client");
const client = new SpaceClient({url: `http://0.0.0.0:9998`});
(async () => {
const bucket = "buckettoshare" + Date.now();
try {
console.log("creating bucket...");
global.XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
const { SpaceClient } = require('@fleekhq/space-client');
const client = new SpaceClient({
url: `http://0.0.0.0:9998`,
});
(async ()=>{
const bucket = "buckettoshare" + Date.now();
pragma solidity ^0.6.0;
/**
* @title ERC20 interface
* @dev see https://eips.ethereum.org/EIPS/eip-20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
import React from "react";
import ReactDOM from "react-dom";
import "./style.css";
class IncorporationForm extends React.Component {
constructor() {
super();
this.state = {
name: "",
import React from "react";
import ReactDOM from "react-dom";
import "./style.css";
class IncorporationForm extends React.Component {
constructor() {
super();
this.state = {
name: "",
const DSA = require("dsa-sdk");
const Web3 = require("web3");
async function loadBlockchainData() {
const web3 = new Web3(
new Web3.providers.HttpProvider('http://127.0.0.1:8545')
);
// in nodejs
const dsa = new DSA({
web3: web3,
const DSA = require("dsa-sdk");
const Web3 = require("web3");
async function loadBlockchainData() {
const web3 = new Web3(
new Web3.providers.HttpProvider("http://127.0.0.1:8545")
);
// in nodejs
const dsa = new DSA({
web3: web3,
pragma solidity ^0.5.7;
interface ProxyAction {
function open(address manager, bytes32 ilk, address usr) external returns (uint cdp);
function lockETH(address manager, address ethJoin, uint cdp) external payable;
function lockETHAndDraw(address manager, address jug, address ethJoin, address daiJoin, uint cdp, uint wadD) external payable;
}
interface IERC20 {