-
Notifications
You must be signed in to change notification settings - Fork 17
Conversation
39cd0fa
to
b38ab13
Compare
so right now |
The approach Web3 determines whether the transaction is native transafer tx: https://github.com/nervosnetwork/godwoken-web3/pull/505/files#diff-9b0dee551144978abbf32f56e4753f613c673ca1fce488d1d3f754556500f399R486-R500 /**
* Determine whether the transaction is a native transfer transaction.
*
* When tx.to refers to an EOA account or an account that doesn't exist, it is considered a native transfer transaction.
*/
async function isEthNativeTransfer(
{ to: toAddress }: { to: HexString },
rpc: GodwokenClient
): Promise<boolean> {
if (toAddress.length === 42) {
const toId = await getAccountIdByEthAddress(toAddress, rpc);
return toId == null || isEthEOA(toAddress, toId, rpc);
}
return false;
} For a tx that calling existed contract, the I have not test " |
yes, but both |
Yes, we should use tests to enforce the compatibility. Later, I'll test it manually and give you feedback. |
b38ab13
to
4646ff7
Compare
4646ff7
to
1887a83
Compare
Success to transfer to a payable contact. |
1887a83
to
088e110
Compare
146e9a8
to
0c4ddf8
Compare
0c4ddf8
to
1db0157
Compare
Web3 supports native transfer
When sending a native transfer transaction, appends
to_address
to polyjuice_args, uses POLYJUICE_CREATOR_ACCOUNT_ID asto_id
;when getting a native transfer transaction, extract
to_address
from polyjuice_args.Indexer supports native transfer
For a native transfer transaction, extract
to_address
from polyjuice_args.Related PRs