This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.createTransaction = async (to, wallet, token) => { | |
const account = new Accounts(); | |
const web3 = new Web3(new Web3.providers.HttpProvider(token.networkUrl)); | |
const acc = account.privateKeyToAccount(wallet.privateKey); | |
const nonce = wallet.nonce; | |
const isCoin = !token.isToken; | |
const amount = token.maxSupplyAllowed; | |
const gasPrice = token.gasPrice; | |
const gas = token.gas; | |
const timestamp = Date.now() * 1000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Web3 = require('web3'); | |
const rp = require('request-promise'); | |
//npm install requiered dependencies | |
const web3 = new Web3(new Web3.providers.HttpProvider("https://ropsten.infura.io/v3/aeedec09cc774ad0a10200d34374b965")); //my infura key use in good health | |
const privateKey = 'input your private key'; | |
const hash = async () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ethers = require('ethers'); | |
const { ADDRESS, ABI, PRIVATE_KEY } = require('./consensysBountyCredentials'); | |
let provider = new ethers.getDefaultProvider('homestead') | |
const wallet = new ethers.Wallet(PRIVATE_KEY, provider) | |
const contract = new ethers.Contract(ADDRESS, ABI, provider) | |
const challange = contract.connect(wallet) | |
console.log(challange) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ethers = require('ethers') | |
const { PRIVATE_KEY } = require('./credentials') | |
const provider = new ethers.getDefaultProvider('kovan'); | |
const acc = new ethers.Wallet(PRIVATE_KEY, provider); | |
const amount = ethers.utils.bigNumberify(2000000000000000); | |
const gasPrice = ethers.utils.bigNumberify(6000000000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.1; | |
contract count { | |
uint counter; | |
constructor () public { | |
counter = 0; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.1; | |
contract count { | |
uint counter; | |
address paid; | |
struct counting { | |
address counter; | |
string message; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { ApiPromise } = require("@polkadot/api"); | |
const WsProvider = require("@polkadot/rpc-provider").WsProvider; | |
const { Keyring } = require("@polkadot/keyring"); | |
const keyring = new Keyring(); | |
const address = "5CdPxYGJvhL8EmK5vK9snmws1mjHJTQEtUAx2ihtdBne5fAF"; | |
const sender = "5DXnxgx4EAWc3d39gZmfUEw4g8NUMdiwFvWbwYsQuH72nRFj"; | |
const pk = keyring.addFromMnemonic( | |
"mneumoinc goes here" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const StellarSdk = require('stellar-sdk'); | |
const checkIfAccountExists = async (to, server) => { | |
try { | |
await server | |
.accounts() | |
.accountId(to) | |
.call(); | |
return true; | |
} catch (err) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Iota = require('@iota/core'); | |
exports.createTransaction = async (to, wallet, token) => { | |
const iota = Iota.composeAPI({ | |
provider: token.networkUrl | |
}); | |
const value = parseInt(token.maxSupplyAllowed); | |
// generates current account to send funds from |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { ApiPromise } = require("@polkadot/api"); | |
const WsProvider = require("@polkadot/rpc-provider").WsProvider; | |
const { Keyring } = require("@polkadot/keyring"); | |
exports.createTransaction = async (to, wallet, token) => { | |
const provider = new WsProvider(token.networkUrl); | |
const keyring = new Keyring({ type: wallet.keyType }); | |
const pk = keyring.addFromMnemonic(wallet.privateKey); | |
const api = await ApiPromise.create(provider); |
OlderNewer