귀하의 USDC는 어제 적용된 이자율을 적용받아 이자를 적립 중입니다.Quicknode 이를 오늘의 최고 Morpho 금고로 자동으로 이동시킵니다. 7개 체인에서 운영 중입니다.
전략 수립하기Run your own Ethereum Node
With the evolution of Web3, developers are rapidly building decentralized applications on Ethereum. Building Dapps on ethereum are cool, though they come with some infrastructure setup drawbacks.

December 3, 2018 — 7 min read

With the evolution of Web3, developers are rapidly building decentralized applications on Ethereum. Building Dapps on Ethereum is cool, though they come with some infrastructure setup drawbacks. You need to set up an ethereum node to interact with the blockchain and this setup needs time, infra and skills. Quicknode solves this problem by providing Ethereum node as Service.
As Quicknode website quotes:
Running your own private Ethereum node is cumbersome. There are three problems with that:
Infra — Blockchains are distributed Ledgers and a full node means the entire copy of the ledger, that maybe not possible on the home computer anymore as ethereum blockchain size is around 4TB now, even fast/full sync is around 300 GB.
Time — First time syncing takes time and syncing Ethereum MainNet can take days, depending on the internet speed.
Skills — Node clients are cranky, you'll need to tune your environment and keep a close eye on them. You'll also need to consider the security of your node. You need to have some cybersecurity skills to secure your node.
Quicknode solves this problem by providing you a full node on a click of a button. Instead of using shared public nodes, Quicknode provides you a dedicated node. Quicknode is optimized for performance, speed, and flexibility. Let's see how Quicknode achieves this.
Dedicated Node- With the use of dedicated nodes helps you increase performance for your blockchain queries as it’s only taking queries for your DApp.
Multiple Zones- Quicknode supports 8 different Zones. That helps in optimizing networks call time which boosts speed and performance for your DApp.
Multiple Testnet support — Quicknode support almost all famous ethereum testnets. That gives immense flexibility to a developer by testing application on their preferred testnet.
Archive Nodes — Quicknode provide Parity archive nodes too. An archive node keeps full copy of blockchain ledger in comparison to full nodes who may do pruning for obvious infra reasons. This is very important feature for businesses benefit from blockchain analysis and research. You can learn more about Quicknode archive nodes here.
Also, Quicknode support Parity and Geth both client. Isn’t it cool? 😃
Let’s sign up for the Quicknode. Once you have completed registration, you can configure your node. You can choose Network, Zone, Client, and Synchronization mode. After launch, you will see your nodes and status for each in your dashboard:

I have created a Kovan Testnet and my zone is Bangalore (India). Remember, your node has to be in READY, otherwise, it will not work. You can rebuild your node or contact Quicknode team if you face any problem.
Connection URI
Quicknode supports both HTTPProvider and Websockets (we will see them later). You can find these links at the top of the Node dashboard:

Now Let’s deep dive in some code.
Let's test Quicknode and see how it works. To start, let’s broadcast a raw transaction with Quicknode using web3js.
Let’s create a node js project and install Web3js. Create a project directory and run below commands.
mkdir quicknode cd quicknode npm init npm install web3
Setup Web3 using Quicknode
Let’s create an Index.js file and setup web3. As you can see we add using Quicknode HttpProvider link. We will connect to our node using this link. Now all the commands we will run will be going through this node and will use Kovan Network.
const Web3 = require('web3')
const httpProvider = "https://mistakenly-smart-jay.quicknode.io/86d9e35e-8cdb-47ad-80a4-84f9e9537afa/C0_tKUunhUc0rM_i1HMxHA==/"
var web3 = new Web3(new Web3.providers.HttpProvider(httpProvider));
To test the network add these line and check the network id, Kovan network Id is 42.
web3.eth.net.getId(function(err, data){console.log(data);})Creating an account
Let’s create a new ethereum account on Kovan network.
web3.eth.getBalance('0x75E18d32f2DbEEfaF4055aD709BDe98eCB57C379', (err, wei) => {
balance = web3.utils.fromWei(wei, 'ether')console.log(balance);});This will give us a private key and address, using which we will create a raw transaction.
You can check the balance using below
web3.eth.getBalance('0x75E18d32f2DbEEfaF4055aD709BDe98eCB57C379', (err, wei) => {
balance = web3.utils.fromWei(wei, 'ether')console.log(balance);});Signing an Ethereum transaction
Let’s get some Test ethers using Kovan network faucet and sign a transaction. Ethier, you can generate a new address as a recipient or just use any address from Kovan block explorer.
web3.eth.accounts.signTransaction({
from: address, // our address
to: address2, // any other kovan network address you want to send
value: '2000000000000000',
gas: '8000000'},privateKey, function(err, data) { console.log(data);
});Sending transaction
Now let’s broadcast this signed transaction using Quicknode.
web3.eth.accounts.signTransaction({
from: address,
to: address2,
value: '2000000000000000',
gas: '8000000'
}, privateKey, function(err, data) {
web3.eth.sendSignedTransaction(data.rawTransaction, function(err, receipt) {
console.log("receipt", receipt);
web3.eth.getTransaction(receipt, function(err, data) {
console.log("transaction", data);
})
});
});We have successfully sent a transaction using Quicknode on Kovan network, you can check this transaction on Kovan block explorer.
Quicknode supports WebSockets too. You can find a web socket connection link under Dev Tools. Either you can use it with HTTPs Auth or Token Auth. Token auth link will look like something below.
- Token auth: wss://mistakenly-smart-jay.quicknode.io/86d9e35e-8cdb-47ad-80a4-84f9e9537afa/C0_tKUunhUc0rM_i1HMxHA==/
WebSockets allow both the server and the client to push messages at any time without any relation to a previous request as opposed to HTTP where the client creates a connection with the server every time. In WebSocket connection get created once, server and client push messages using the connection. Websockets are best for an event-based system. Websockets are supported by almost every browser.

Subscribing pending Transaction events
Let’s subscribe pending transaction of Ethereum blockchain. You can see we are passing Quicknode WebSocket URI while initializing web3.
const Web3 = require('web3') const webSocket = "wss://mistakenly-smart-jay.quicknode.io/86d9e35e-8cdb-47ad-80a4-84f9e9537afa/C0_tKUunhUc0rM_i1HMxHA==/"
var web3 = new Web3(webSocket);
var subscription = web3.eth.subscribe('pendingTransactions', function(error, result) {
if (!error) console.log(result);
}).on("data", function(transaction) {
console.log(transaction);
});Let’s see how we’ll use Quicknode with Truffle and deploy smart contracts. So for that lets download Truffle Petshop. We will simply unbox it and deploy it using Quicknode.
truffle unbox pet-shop
We will use truffle-HD-wallet to deploy our pet-shop smart contracts. So you need to install it too.
npm install truffle-hdwallet-provider
Now let’s see the configuration of our Truffle’s config. We will simply add HttpProvider URI to use Quicknode as mentioned below.
var HDWalletProvider = require("truffle-hdwallet-provider");
var mnemonic = "YOUR_MEMONICS"; // use a funded wallet
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*" // Match any network id
},
kovan: {
provider: function() {
return new HDWalletProvider(mnemonic, "https://mistakenly-smart-jay.quicknode.io/86d9e35e-8cdb-47ad-80a4-84f9e9537afa/C0_tKUunhUc0rM_i1HMxHA==/")
},
network_id: 42
}
}
};Quicknode Stats Features
So now let's talk about Quicknode’s Stat feature which gives you visibility what's happening with your Dapp.
Stats / Node Peers / Node Logs — Quicknode provides different types of stats, by which you can measure your Dapps Usage. You can check the number of requests, Load on your node and WebSocket messages other things. Quicknode also provides peers contacted your node and the logs.
Quicknode Metrics
Quicknode is an awesome and useful addition to the Ethereum ecosystem. It’s fast and completely private. Many high performances DApps will end up running their own node for better performance. Now they don’t need to set up the node. Quicknode’s team is awesome and you can reach them via Slack.
Note: Mentioned Quicknode links will not work, my Quicknode subscription is expired.
프로젝트와 관련해 도움이 필요하거나 궁금한 점이 있으신가요? 이 양식을 통해, 트위터Quicknode 통해, 또는 디스코드에서 저희에게 연락해 주세요!
2017년에 설립된 Quicknode 개발자와 기업을 위해 기관급 블록체인 인프라를 Quicknode . 99.99%의 가동률과 80개 이상의 체인을 지원함으로써, 팀들은 타협 없이 온체인 애플리케이션을 구축하고 확장할 수 있습니다.
최신 엔지니어링 인사이트, 제품 업데이트, 웹3 뉴스를 여러분의 이메일로 바로 받아보세요.
SOC 2 Type II 인증 · ISO 27001