storj / crypto-batch-payment

A high volume ERC20 token payment application.
GNU Affero General Public License v3.0
5 stars 0 forks source link

Initial support of Zksync2 payment #2

Closed elek closed 1 year ago

elek commented 1 year ago

This branch (or relation chain) contains multiple modifications to support ZkSync2 payment.

Half of the patches just make it easier to implement and test:

Right the new zksync2 is tested with:

crybapy payer transfer ./safe1.key --node-address https://zksync2-testnet.zksync.dev --contract 0x787BE80167b052A317B5Af24ed6C0abFdafB96dB --type zksync2 --chain-id 280 --amount 1 --price 1 --destination 0x4C466C61cf8cEEa6c7365f6F6490fcF765deC6cD --max-gas 200000000000

This command creates an in-memory SQL database and imports the required transaction to the db before executing the transfer.

One missing part is the audit. Until now we didn't do proper audit of transaction, but with ZkSync2 we need more time between the submission of transaction and the confirmation (when tx is confirmed on ETH chain).

Therefore we need to improve the audit process and make it an important step in the workflow.

elek commented 1 year ago

Merged manually with keeping the commit history...