Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ETH: ETH's shit #278

Open
2 tasks done
Tracked by #331
hhstore opened this issue May 20, 2021 · 3 comments
Open
2 tasks done
Tracked by #331

ETH: ETH's shit #278

hhstore opened this issue May 20, 2021 · 3 comments

Comments

@hhstore
Copy link
Owner

hhstore commented May 20, 2021

related:

  • xxx
  • xxx
@hhstore hhstore added the ETH label May 20, 2021
@hhstore
Copy link
Owner Author

hhstore commented May 20, 2021

swap test case:

  • 使用 uniswap 生成的 data, 然后通过 wallet 再次签名后, 广播出交易.
 test('eth token swap:', () async {
    var privateKey = 'your-private-key';

    var walletAddress = '0x9fe1901f3bb6cd21dca275f5e746409bd4ae8861';
    var contractAddress = '0x7a250d5630b4cf539739df2c5dacb4c659f2488d';

    ///
    var amount = BigInt.tryParse('0x314b3d2e4230000') ?? BigInt.from(0);
    var dataStr =
        '0x7ff36ab5000000000000000000000000000000000000000000000012897e29405bf7874500000000000000000000000000000000000000000000000000000000000000800000000000000000000000009fe1901f3bb6cd21dca275f5e746409bd4ae88610000000000000000000000000000000000000000000000000000000060a6486a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c0000000000000000000000004f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa';

    var txID = await cliKovan.swapToken2(
      privateKey: privateKey,
      fromAddress: walletAddress,
      toAddress: contractAddress,
      data: dataStr,
      value: amount,
    );

    print('swap token: txID:$txID');
  });

@hhstore hhstore added the FAQ label Jun 1, 2021
@hhstore
Copy link
Owner Author

hhstore commented Jun 17, 2021

ETH 全节点数据:

使用 openethereum 同步节点:

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant