Created
April 11, 2021 06:19
-
-
Save dendisuhubdy/dfda6921940c0c65a51699c7207a094c to your computer and use it in GitHub Desktop.
Revisions
-
dendisuhubdy created this gist
Apr 11, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ token_from = "0x0d0707963952f2fba59dd06f2b425ace40b492fe" token_to = "0x763015f098cf18cfa28baf25653955f271fb63ff" token_to_private_key = "0x0000000000000000000000000000000" my_provider = Web3.IPCProvider("~/.local/share/io.parity.ethereum/docker/jsonrpc.ipc") w3 = Web3(my_provider) contractAddress = "0xdac17f958d2ee523a2206206994597c13d831ec7" token = w3.eth.contract(Web3.toChecksumAddress(contractAddress), abi=usdtABI) transaction = { 'from': token_from, 'to': token_to, 'nonce': w3.eth.getTransactionCount(Web3.toChecksumAddress(token_from)), 'gas': 2000000, 'gasPrice': 234567897654321, 'data' : token.caller.transfer(Web3.toChecksumAddress(token_to), 10000000), 'chainId': 1, } signed = w3.eth.account.signTransaction(transaction, token_to_private_key)