Internal transactions for polygon
How do you get internal value transfer on polygon since only supported on the Ethereum mainnet?
Posted by Sabz almost 2 years ago
Getting the From and To values of a transaction
Hi - I'm trying to get the "From" and "Interacted With(To)" values of this transaction using Alchemy API: https://etherscan.io/tx/0x945e0df0103789bafe5919e8786c409d7c6878a8e6b15c47c0ce3aea642054b1
Using `getAssetTransfers` function but it only gives the transfers data
Posted by Discord User about 2 years ago
Send All Ether
Hi, How do you send all ether from an address without leaving any left. My calculation is as following.
amountToSend = FullAmount - ((gasPrice + maxPriorityFeePerGas) * gasLimit).
But there still remains some small amount of ether left. Like $0.9 . The transaction look as follow:
const transaction = {
to,
value: Number(value).minus(totalGas).toString(),
gasLimit,
gasPrice,
maxPriorityFeePerGas: Number(feeData.maxPriorityFeePerGas),
maxFeePerGas: gasPrice,
nonce,
type: 2,
chainId: 1,
};
Posted by Jeremy about 2 years ago