
Networks
bấm next qua 2 cái trên ảnh1. đáp án CALLBACK FUNCTIONS/** * Runs a callback function immediately * @param {function} callbackFunction */ function runCallback(callbackFunction) { callbackFunction(); } module.exports = runCallback; /** * Runs a callback function immediately * @param {function} callbackFunction */ function runCallback(callbackFunction) { setTimeout(callbackFunction, 1000); } module.exports = runCallback; class Dialog { onClose(callbackFunction) { this.carr = this.carr || []; th...

Sui Name Service ($SNS)
twitter :discord :Discord - Group Chat That's All Fun & GamesDiscord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.https://discord.comIt's finally here! Join our Crew3 and earn your spot in the $SNS DAO ➤ http://snsdomains.crew3.xyz ➤ New Quests added Daily! 10 people to Like/RT this tweet will also be selected for the Stork role - Winners selected below. #Sui isn't ready. Let&a...

tương tác Harpie
liên kết víxem ví mình dùng cái nào thì chọn - ví hold token thì chọn cái trên , ví chơi nft thì chọn cái dưới hoặc chọn cả 2 cũng đcchọn cái nào muốn bảo vệđợi cho nó load xong và import token mạng eth hoặc nft nào mà mình muốn bảo vệadd bn token hay nft tùy thích - sau đó chọn protecttốn chút fee ethnhư vậy là xong bước 1tiếp theo chọn setupnhập địa chỉ ví - tốn fee eth - nhập 1 địa chỉ ví khác ví đang dùngtiếp theo đến bước 3chọn mint FAU - tốn fee ethBẤM protect faucet token - tốn fee eth...
vui vẻ

Networks
bấm next qua 2 cái trên ảnh1. đáp án CALLBACK FUNCTIONS/** * Runs a callback function immediately * @param {function} callbackFunction */ function runCallback(callbackFunction) { callbackFunction(); } module.exports = runCallback; /** * Runs a callback function immediately * @param {function} callbackFunction */ function runCallback(callbackFunction) { setTimeout(callbackFunction, 1000); } module.exports = runCallback; class Dialog { onClose(callbackFunction) { this.carr = this.carr || []; th...

Sui Name Service ($SNS)
twitter :discord :Discord - Group Chat That's All Fun & GamesDiscord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.https://discord.comIt's finally here! Join our Crew3 and earn your spot in the $SNS DAO ➤ http://snsdomains.crew3.xyz ➤ New Quests added Daily! 10 people to Like/RT this tweet will also be selected for the Stork role - Winners selected below. #Sui isn't ready. Let&a...

tương tác Harpie
liên kết víxem ví mình dùng cái nào thì chọn - ví hold token thì chọn cái trên , ví chơi nft thì chọn cái dưới hoặc chọn cả 2 cũng đcchọn cái nào muốn bảo vệđợi cho nó load xong và import token mạng eth hoặc nft nào mà mình muốn bảo vệadd bn token hay nft tùy thích - sau đó chọn protecttốn chút fee ethnhư vậy là xong bước 1tiếp theo chọn setupnhập địa chỉ ví - tốn fee eth - nhập 1 địa chỉ ví khác ví đang dùngtiếp theo đến bước 3chọn mint FAU - tốn fee ethBẤM protect faucet token - tốn fee eth...
vui vẻ

Subscribe to meteosrds

Subscribe to meteosrds
Share Dialog
Share Dialog
<100 subscribers
<100 subscribers




const provider = require('./provider');
async function getBlockNumber() {
const ret = await provider.send({
jsonrpc: "2.0",
id: 1,
method: "eth_blockNumber",
});
return ret.result;
}
module.exports = getBlockNumber;

const provider = require('./provider');
async function getBalance(address) {
const ret = await provider.send({
jsonrpc: "2.0",
id: 1,
method: "eth_getBalance",
params: [address, "latest"],
});
return ret.result;
}
module.exports = getBalance;

const provider = require('./provider');
async function getNonce(address) {
const ret = await provider.send({
jsonrpc: "2.0",
id: 1,
method: "eth_getTransactionCount",
params: [address, "latest"],
});
return ret.result;
}
module.exports = getNonce;

const provider = require('./provider');
async function getTotalTransactions(blockNumber) {
const ret = await provider.send({
jsonrpc: "2.0",
id: 1,
method: "eth_getBlockByNumber",
params: [blockNumber, false],
});
return ret.result.transactions.length;
}
module.exports = getTotalTransactions;

const provider = require('./provider');
async function getTotalBalance(addresses) {
let reqs = [];
for (let i = 0; i < addresses.length; i++) {
reqs.push({
jsonrpc: "2.0",
id: 1,
method: "eth_getBalance",
params: [addresses[i], "latest"],
});
}
const resps = await provider.send(reqs);
let t = 0;
for (let i = 0; i < resps.length; i++) {
t = t + parseInt(resps[i].result);
}
return t;
}
module.exports = getTotalBalance;


const ethers = require('ethers');
const { Wallet } = ethers;
// create a wallet with a private key
const wallet1 = new Wallet("0xf2f48ee19680706196e2e339e5da3491186e0c4c5030670656b0e0164837257d");
// create a wallet from mnemonic
const wallet2 = Wallet.fromMnemonic("plate lawn minor crouch bubble evidence palace fringe bamboo laptop dutch ice");
module.exports = {
wallet1,
wallet2,
}

const ethers = require('ethers');
const { Wallet, utils } = ethers;
const { wallet1 } = require('./wallets');
const signaturePromise = wallet1.signTransaction({
value: utils.parseEther('1', 'ether'),
to: "0xdD0DC6FB59E100ee4fA9900c2088053bBe14DE92",
gasLimit: utils.parseUnits('21000', 'wei'),
});
module.exports = signaturePromise;

const { Wallet, utils, providers } = require('ethers');
const { ganacheProvider, PRIVATE_KEY } = require('./config');
const provider = undefined;
const wallet = new Wallet(PRIVATE_KEY);
async function sendEther({ value, to }) {
const rawTx = await wallet.signTransaction({
value, to,
gasLimit: 0x5208,
gasPrice: 0x3b9aca00
});
const provider = new providers.Web3Provider(ganacheProvider);
resp = await provider.sendTransaction(rawTx);
return resp;
}
module.exports = sendEther;

const { Wallet, utils, providers } = require('ethers');
const { ganacheProvider, PRIVATE_KEY } = require('./config');
const provider = new providers.Web3Provider(ganacheProvider);
const wallet = new Wallet(PRIVATE_KEY, provider);
async function sendEther({ value, to }) {
return wallet.sendTransaction({ value, to });
}
module.exports = sendEther;

const { Wallet, providers } = require('ethers');
const { ganacheProvider } = require('./config');
const provider = new providers.Web3Provider(ganacheProvider);
function findMyBalance(privateKey) {
const wallet = new Wallet(privateKey, provider);
return wallet.getBalance();
}
module.exports = findMyBalance;

const { utils, providers, Wallet } = require('ethers');
const { ganacheProvider } = require('./config');
const provider = new providers.Web3Provider(ganacheProvider);
/**
* Donate at least 1 ether from the wallet to each charity
* @param {string} a hex string private key for a wallet with 10 ETH
* @param {array} an array of ethereum charity addresses
*
* @returns {Promise} a promise that resolves after all donations have been sent
*/
async function donate(privateKey, charities) {
const wallet = new Wallet(privateKey, provider);
let resps = [];
nonce = await wallet.getTransactionCount();
for (let i = 0; i < charities.length; i++) {
const rawTx = await wallet.signTransaction({
value: utils.parseEther('1', 'ether'),
to: charities[i],
gasLimit: utils.parseUnits('21000', 'wei'),
nonce: nonce + i
});
resps.push(provider.sendTransaction(rawTx));
}
return Promise.all(resps);
}
module.exports = donate;

const { providers } = require('ethers');
const { ganacheProvider } = require('./config');
const provider = new providers.Web3Provider(ganacheProvider);
/**
* Given an ethereum address find all the addresses
* that were sent ether from that address
* @param {string} address - The hexidecimal address for the sender
* @async
* @returns {Array} all the addresses that receieved ether
*/
async function findEther(address) {
let addrs = [];
let blockNum = await provider.getBlockNumber();
for (let i = 0; i <= blockNum; i++) {
let block = await provider.getBlockWithTransactions(i);
block.transactions.forEach((tx) => {
if (tx.from === address) {
addrs.push(tx.to);
}
});
}
return addrs;
}
module.exports = findEther;


const provider = require('./provider');
async function getBlockNumber() {
const ret = await provider.send({
jsonrpc: "2.0",
id: 1,
method: "eth_blockNumber",
});
return ret.result;
}
module.exports = getBlockNumber;

const provider = require('./provider');
async function getBalance(address) {
const ret = await provider.send({
jsonrpc: "2.0",
id: 1,
method: "eth_getBalance",
params: [address, "latest"],
});
return ret.result;
}
module.exports = getBalance;

const provider = require('./provider');
async function getNonce(address) {
const ret = await provider.send({
jsonrpc: "2.0",
id: 1,
method: "eth_getTransactionCount",
params: [address, "latest"],
});
return ret.result;
}
module.exports = getNonce;

const provider = require('./provider');
async function getTotalTransactions(blockNumber) {
const ret = await provider.send({
jsonrpc: "2.0",
id: 1,
method: "eth_getBlockByNumber",
params: [blockNumber, false],
});
return ret.result.transactions.length;
}
module.exports = getTotalTransactions;

const provider = require('./provider');
async function getTotalBalance(addresses) {
let reqs = [];
for (let i = 0; i < addresses.length; i++) {
reqs.push({
jsonrpc: "2.0",
id: 1,
method: "eth_getBalance",
params: [addresses[i], "latest"],
});
}
const resps = await provider.send(reqs);
let t = 0;
for (let i = 0; i < resps.length; i++) {
t = t + parseInt(resps[i].result);
}
return t;
}
module.exports = getTotalBalance;


const ethers = require('ethers');
const { Wallet } = ethers;
// create a wallet with a private key
const wallet1 = new Wallet("0xf2f48ee19680706196e2e339e5da3491186e0c4c5030670656b0e0164837257d");
// create a wallet from mnemonic
const wallet2 = Wallet.fromMnemonic("plate lawn minor crouch bubble evidence palace fringe bamboo laptop dutch ice");
module.exports = {
wallet1,
wallet2,
}

const ethers = require('ethers');
const { Wallet, utils } = ethers;
const { wallet1 } = require('./wallets');
const signaturePromise = wallet1.signTransaction({
value: utils.parseEther('1', 'ether'),
to: "0xdD0DC6FB59E100ee4fA9900c2088053bBe14DE92",
gasLimit: utils.parseUnits('21000', 'wei'),
});
module.exports = signaturePromise;

const { Wallet, utils, providers } = require('ethers');
const { ganacheProvider, PRIVATE_KEY } = require('./config');
const provider = undefined;
const wallet = new Wallet(PRIVATE_KEY);
async function sendEther({ value, to }) {
const rawTx = await wallet.signTransaction({
value, to,
gasLimit: 0x5208,
gasPrice: 0x3b9aca00
});
const provider = new providers.Web3Provider(ganacheProvider);
resp = await provider.sendTransaction(rawTx);
return resp;
}
module.exports = sendEther;

const { Wallet, utils, providers } = require('ethers');
const { ganacheProvider, PRIVATE_KEY } = require('./config');
const provider = new providers.Web3Provider(ganacheProvider);
const wallet = new Wallet(PRIVATE_KEY, provider);
async function sendEther({ value, to }) {
return wallet.sendTransaction({ value, to });
}
module.exports = sendEther;

const { Wallet, providers } = require('ethers');
const { ganacheProvider } = require('./config');
const provider = new providers.Web3Provider(ganacheProvider);
function findMyBalance(privateKey) {
const wallet = new Wallet(privateKey, provider);
return wallet.getBalance();
}
module.exports = findMyBalance;

const { utils, providers, Wallet } = require('ethers');
const { ganacheProvider } = require('./config');
const provider = new providers.Web3Provider(ganacheProvider);
/**
* Donate at least 1 ether from the wallet to each charity
* @param {string} a hex string private key for a wallet with 10 ETH
* @param {array} an array of ethereum charity addresses
*
* @returns {Promise} a promise that resolves after all donations have been sent
*/
async function donate(privateKey, charities) {
const wallet = new Wallet(privateKey, provider);
let resps = [];
nonce = await wallet.getTransactionCount();
for (let i = 0; i < charities.length; i++) {
const rawTx = await wallet.signTransaction({
value: utils.parseEther('1', 'ether'),
to: charities[i],
gasLimit: utils.parseUnits('21000', 'wei'),
nonce: nonce + i
});
resps.push(provider.sendTransaction(rawTx));
}
return Promise.all(resps);
}
module.exports = donate;

const { providers } = require('ethers');
const { ganacheProvider } = require('./config');
const provider = new providers.Web3Provider(ganacheProvider);
/**
* Given an ethereum address find all the addresses
* that were sent ether from that address
* @param {string} address - The hexidecimal address for the sender
* @async
* @returns {Array} all the addresses that receieved ether
*/
async function findEther(address) {
let addrs = [];
let blockNum = await provider.getBlockNumber();
for (let i = 0; i <= blockNum; i++) {
let block = await provider.getBlockWithTransactions(i);
block.transactions.forEach((tx) => {
if (tx.from === address) {
addrs.push(tx.to);
}
});
}
return addrs;
}
module.exports = findEther;
No activity yet