KS note – Telegram
KS note
495 subscribers
61 photos
2 files
71 links
・ Web3 & etc.

🥷⛓️🍷 @MostPow3rful
Download Telegram
Forwarded from Remedy
Calling all Web3 Security firms

Let us join forces and together fortify our blockchain ecosystems!

We're excited to offer Glider Ethereum mainnet access to all our Web3 cybersecurity comrades. Time to level up our defense game!

Start finding bugs at scale now👉🏼 https://exty84bdiei.typeform.com/gliderpartners
🔥2
KS note
💎 Ethereum API Documentation 🔗 https://ethereum.github.io/execution-apis/api-documentation/ 🔗 https://github.com/ethereum/execution-apis 🔗 https://ethereum.org/en/developers/docs/apis/json-rpc/
const axios = require('axios');

async function MakeCall(_method, _jsonRPCUrl) {
try {
const response = await axios.post(_jsonRPCUrl, {
jsonrpc: '2.0',
method: _method,
params: [],
id: 1,
});

console.log(`[Result] ${response.data.result}`);

} catch (error) {
console.error(`[Error] ${error.message}`);
}
}

MakeCall("eth_blockNumber", "http://localhost:8545");
4👌1
🤓 Do not memorize commands. Understand them
💻 foundry — [cast call]
VS [cast send]


1️⃣ cast call
to call a view/pure function ( non state changing function )
・ required arguments :
RPC URL
Contract Address
Function Name


2️⃣ cast send

to call a non view/pure function ( a state changing function )
・ required arguments :
RPC URL
Contract Address
Function Name
Private Key


👀 where is RPC URL ?
default value for RPC URL is http://127.0.0.1:8545 —> Anvil

👀 why your Private key is plain text ?
it belongs to anvil. so, not important


🔗https://book.getfoundry.sh/cast/
👌51
🥷 Becoming a Security Researcher - Live on X

🔗 https://x.com/HatsFinance/status/1806284016254902592
5
🔗 X
🏆31
3
💻 How to calculate the Address of Contract using WalletAddress and WalletNonce using ethers.js

when a contract is going to be deployed, the address of contract will be generated using 2 argument :
1️⃣ address of deployer's wallet
2️⃣ value of nonce variable
so, you can calculate the address of a contract which is going to be deployed and in other side, you can calculate & find when you can deploy a contract whose address is XXX.

🔗 docs of ethers.js
🔗 github repo of ethers.js
🔥62🍾1
we have contract A which the balance of contract is 10 ether and there is a function in it which call selfdestruct() and we pass an payable address to the function. but, there is no deployed contract on that address. what will be happen to the ethers ?
Anonymous Quiz
18%
the contract will raise an error and the ethers are not going to lose
27%
all of the ethers are going to lose
55%
ethers will be in pending mode and waiting for the contract to be deployed on that address
👏4🔥1