Created
September 14, 2021 16:46
Star
You must be signed in to star a gist
This file contains 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 characters
from erdpy.accounts import Account, Address | |
from erdpy.proxy import ElrondProxy | |
from erdpy.transactions import BunchOfTransactions | |
from erdpy.transactions import Transaction | |
from erdpy.wallet import signing | |
proxy = ElrondProxy("https://devnet-gateway.elrond.com") | |
sender = Account(pem_file="test-wallet.pem") | |
sender.sync_nonce(proxy) | |
tx = Transaction() | |
tx.nonce = sender.nonce | |
tx.value = str(0.05 * 10**18) # 0.05 ERD, as required for issuing a token according to the documentation | |
tx.sender = sender.address.bech32() | |
# System contract address to issue out the new token as per | |
# https://docs.elrond.com/developers/esdt-tokens/#issuance-of-fungible-esdt-tokens | |
tx.receiver = "erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u" | |
tx.gasPrice = 1000000000 | |
tx.gasLimit = 50000 | |
tx.data = "" | |
tx.chainID = "D" # For devnet https://devnet-gateway.elrond.com/network/config | |
tx.version = 1 # No idea where this should come from, because the lack of documentation | |
tx.signature = signing.sign_transaction(tx, sender) | |
tx.send(proxy) | |
# Error | |
# ProxyRequestError: Proxy request error for url [https://devnet-gateway.elrond.com/transaction/send]: {'data': None, 'error': 'transaction generation failed: invalid value', 'code': 'internal_issue'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment