CryptoFly.us | CRYPTOCURRENCY BITCOIN SHIRTS CLOTHING APPAREL HATS

CRYPTO NEWS

ERC-20 Token Transfer Error – Eth subtracted from contract but not added to a wallet

While testing NFT contract on Rinkeby I encountered a situation where I cannot transfer eth from my contract. I had 0.01 Eth on the contract and then I called transfer to withdraw 0.008 Eth (transaction)

    function transfer(address payable _to, uint256 _amount) public onlyOwner {         (bool success, ) = _to.call{value: _amount}("");         require(success, "Failed to send Ether");     } 

The transaction is successful, it deducts Eth from the contract but my wallet does not receive the value. Only thing that indicates any error is

ERC-20 Token Transfer Error (Unable to locate corresponding Transfer Event Logs), Check with Sender.

But according to my understanding I should not emit this event on my own, because it is not necessary in the official tutorials, e.g. in https://solidity-by-example.org/payable/.

Might there be a problem with the fact that the contract is inherited from ERC721?

Manage multiple users wallets for web wallet service

This already summaries the issue I’m currently trying to figure out to calculate the transaction fee to prevent negative balance. (testnet) I tried using createrawtransaction answered. When I tried to send all balance to an address, the txid was created successfully using createrawtransaction but when I ran the fundrawtranaction on that txid it showed error::Listen

This already summaries the issue I’m currently trying to figure out to calculate the transaction fee to prevent negative balance.

(testnet) I tried using createrawtransaction answered. When I tried to send all balance to an address, the txid was created successfully using createrawtransaction but when I ran the fundrawtranaction on that txid it showed

error code: -4 error message: Insufficient funds 

The goal is to calculate transaction fee before hand to check either sufficient balance is available of an account using sendfrom

To manage multiple users to isolate users’ balances as this.

EDIT1:

If using estimatesmartfee it is showing the fee:

bitcoin-cli -testnet estimatesmartfee 6 {   "feerate": 0.00501921,   "blocks": 6 } 

When calling sendfrom for total balance transfer:

bitcoin-cli -testnet sendfrom <account> <address> <amount> error code: -4 error message: Error: This transaction requires a transaction fee of at least 0.00067257 

Is there a way to get 0.00067257 the fee part before send the transaction amount and set it so that account balance won’t go negative for multi accounts wallet.

Edit 2:

I found out that accounts are deprecated.

And multi wallet creation/load/unload on runtime is underway to 0.17.0

So what would be the best approach to handle multiple users bitcoins in isolation on a full node to prevent negative balance.

Crypto Hats, Crypto Shirts, Crypto Socks, Crypto Clothing

ERC-20 Token Transfer Error – Eth subtracted from contract but not added to a wallet

Shopping cart
There are no products in the cart!
Continue shopping
0