const Web3 = require('web3');
const web3 = new Web3(
'https://{your-node-name}.quiknode.pro/{your-token}/'
);
web3.eth.getBlock('latest').then(
answer => console.log(answer)
);
web3.eth.getBlockNumber().then(
blockNum => console.log(blockNum)
);
const Web3 = require('web3');
const web3 = new Web3(
'https://{your-node-name}.quiknode.pro/{your-token}/'
);
web3.eth.getBlock('latest').then(
answer => console.log(answer)
);
web3.eth.getBlockNumber().then(
blockNum => console.log(blockNum)
);
const HDWalletProvider = require('@truffle/hdwallet-provider');
const mnemonic = "orange apple banana ...";
module.exports = {
networks: {
mainnet: {
provider: function() {
return new HDWalletProvider(mnemonic, "https://{your-node-name}.quiknode.pro/{your-token}/")
},
gas: 5000000,
gasPrice: 5e9,
network_id: 1
}
}
};
const HDWalletProvider = require('@truffle/hdwallet-provider');
const mnemonic = "orange apple banana ...";
module.exports = {
networks: {
mainnet: {
provider: function() {
return new HDWalletProvider(mnemonic, "https://{your-node-name}.quiknode.pro/{your-token}/")
},
gas: 5000000,
gasPrice: 5e9,
network_id: 1
}
}
};
from web3 import Web3
w3 = Web3(
Web3.HTTPProvider(
"https://{your-node-name}.quiknode.pro/{your-token}/"
)
)
# get latest block details
w3.eth.getBlock('latest')
# get latest block number
w3.eth.blockNumber
from web3 import Web3
w3 = Web3(
Web3.HTTPProvider(
"https://{your-node-name}.quiknode.pro/{your-token}/"
)
)
# get latest block details
w3.eth.getBlock('latest')
# get latest block number
w3.eth.blockNumber
import { Drizzle } from 'drizzle';
const options = {
web3: {
fallback: {
url: 'wss://{your-node-name}.quiknode.pro/{your-token}/'
}
}
};
const drizzle = new Drizzle(options);
import { Drizzle } from 'drizzle';
const options = {
web3: {
fallback: {
url: 'wss://{your-node-name}.quiknode.pro/{your-token}/'
}
}
};
const drizzle = new Drizzle(options);
require 'eth'
client = Eth::Client.create 'https://{your-node-name}.quiknode.pro/{your-token}/'
balance = client.get_balance('0x8D97689C9818892B700e27F316cc3E41e17fBeb9')
puts balance
require 'eth'
client = Eth::Client.create 'https://{your-node-name}.quiknode.pro/{your-token}/'
balance = client.get_balance('0x8D97689C9818892B700e27F316cc3E41e17fBeb9')
puts balance