CRYPTO NEWS

Is automating the withdraw of a NFT smart contract a good idea?

Just wondering out ! Something like automatic withdraw after every 24 hours or something like withdraw after every mint on the contract.

If its a good idea, sharing any ways or resources for me to do it out would be helpful !

Would love to hear your perspectives on this !!

Sending an ERC20 tokens from one wallet to another using web3-py not working

I’m trying to send an ERC20 token(USDC) from my ethereum wallet to other wallet, however the transfer happens from my wallet to the smart contract instead of the other wallet. Below is the code w3_client = get_web3_client(3) # ropsten infura client smart_contact_address = "0xFE724a829fdF12F7012365dB98730EEe33742ea2" # ropsten USDC # abi as per https://github.com/carver/ethtoken.py/blob/master/ethtoken/abi.py smart_contract = w3_client.eth.contract(::Listen

I’m trying to send an ERC20 token(USDC) from my ethereum wallet to other wallet, however the transfer happens from my wallet to the smart contract instead of the other wallet.

Below is the code

    w3_client = get_web3_client(3) # ropsten infura client          smart_contact_address = "0xFE724a829fdF12F7012365dB98730EEe33742ea2" # ropsten USDC       # abi as per https://github.com/carver/ethtoken.py/blob/master/ethtoken/abi.py     smart_contract = w3_client.eth.contract(         address=smart_contact_address, abi=EIP20_ABI          )     nonce = w3_client.eth.getTransactionCount(w3_client.toChecksumAddress(my_wallet_address))      txn_dict = smart_contract.functions.transfer(         receiver_wallet_address, 1000     ).build_transaction(         {             "chainId": 3,             "nonce": nonce,             "maxFeePerGas": w3_client.eth.max_priority_fee                             + (2 * w3_client.eth.get_block("latest")["baseFeePerGas"]),             "maxPriorityFeePerGas": w3_client.eth.max_priority_fee,             "type": 2,             "gas": 21584         }     )     signed = w3_client.eth.account.sign_transaction(txn_dict, my_wallet_private_key)     return w3_client.eth.send_raw_transaction(signed.rawTransaction) 

After I execute this. It shows an error on etherscan: https://ropsten.etherscan.io/tx/0x452012fab042528c17bab06595d6e47fa635d0b027083cfbfe94c40e7313e45c

Warning! Error encountered during contract execution [execution reverted]

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

So I wanted to understand what am I missing here?

Thanks,

Is automating the withdraw of a NFT smart contract a good idea?

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