MetaMask / MetaMask/metamask-extension
I failed to send ether with some memo(custom data) to some NON-CONTRACT account by calling sendTransaction
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
Hi,
I failed to send ether with some memo(custom data) to some NON-CONTRACT account by calling sendTransaction
web3.eth.sendTransaction({
from: web3.givenProvider.selectedAddress,
to: "0xXXXXXXXXXXXXXXX",
value: 0.01,
data: web3.toHex("Some Memo")
}).then(function (receipt) {
}).catch(function (e) {console.error(e)})
#### Expected behavior
successfully done, and the input data field of the receipt should include the memo(custom data)
#### Actual behavior
error: Error: TxGasUtil - Trying to call a function on a non-contract address
{
"originalError": {
"errorKey": "transactionErrorNoContract",
"getCodeResponse": "0x"
}
}
The message "TxGasUtil - Trying to call a function on a non-contract address" is returned by the inpage.js of Metamask.
Actually, the transaction is done successfully.
Just the exception "TxGasUtil - Trying to call a function on a non-contract address" was caught by Metamask and thrown to web3.js.
So, I think it's a bug obviously.
And, this(attaching custom data while sending ether) is a really necessary feature.
For example, in the case that I need to send ether with attached message, such as a message specifying the beneficiary address(based on another chain that is different from ethereum) to receive some tokens.
Without this feature, how can I do to make the recipient that received the ether trust the beneficiary address?? By sending mail, off chain ???
#### Logs
error: Error: TxGasUtil - Trying to call a function on a non-contract address
{
"originalError": {
"errorKey": "transactionErrorNoContract",
"getCodeResponse": "0x"
}
}
#### Environment
Chrome Browser, MetaMask, Web3js, Rinkeby Testnet
Contributor guide
Research direction
Start by reproducing the sendTransaction call on the Rinkeby testnet with custom data sent to a non-contract address, then trace the MetaMask inpage.js path that emits the TxGasUtil error. Done means the transaction completes without the exception and the receipt retains the memo data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100