-
Notifications
You must be signed in to change notification settings - Fork 469
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I am trying to send an ERC20 token using "createWriteOperation"
this is transaction
guard let writeOp = contract.createWriteOperation("transfer", parameters: parameters,extraData: Data())else{
print("ERROR3");return;
}
↓print(writeOp.transaction)
Transaction
Type: Legacy
Nonce: 32
Gas price: 30000000000
Gas limit: 100000
To: 0x~
Value: 0
Data: 0x
Resolved chainID: Optional(1)
- Intrinsic chainID: Optional(1)
- Infered chainID: Optional(1)
v: ~
r: ~
s: ~
from: Optional("0x~")
hash: Optional("0x~")
the data certainly exists.
print(transaction.data.toHexString())
→a9059cbb000000000000000000~~
This may represents the transfer method.
But the problem happens when encoding the transaction.
guard let transactionData = writeOp.transaction.encode() else { throw Web3Error.dataError }
print(transactionData.toHexString())
→~f8652.....
Then, when this transaction is decoded using https://flightwallet.github.io/decode-eth-tx/
{
"nonce": 32,
"gasPrice": 30000000000,
"gasLimit": 100000,
"to": "0x~~",
"value": 0,
"data": "",
"from": "0x~~",
"r": "~~",
"v": "~~",
"s": "~~"
}
"data" of member variable of transaction disappears.
TRUST-SMITH
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working