mirror of
https://github.com/tornadocash/tornado-nova
synced 2024-02-02 14:53:56 +01:00
fix readme and tests
This commit is contained in:
parent
bb2e4186bf
commit
f4df191ed2
@ -28,11 +28,12 @@ Check config.js for actual values.
|
||||
With `salt` = `0x0000000000000000000000000000000000000000000000000000000047941987` addresses must be:
|
||||
|
||||
1. `L1Unwrapper` - `0xfEADF5e7e453c664D903d1b1945c524c4328e1c5`
|
||||
2. `TornadoPool` - `0xEb314843E39A2D67c7bA31150fA243b30b70e97c`
|
||||
2. `TornadoPool` - `0x6a1c06C4Af066a35291117611fd0418411c0dbD0`
|
||||
|
||||
Check addresses with current config:
|
||||
|
||||
```shell
|
||||
yarn compile
|
||||
node -e 'require("./src/0_generateAddresses").generateWithLog()'
|
||||
```
|
||||
|
||||
@ -42,7 +43,7 @@ Deploy L1Unwrapper:
|
||||
npx hardhat run scripts/deployL1Unwrapper.js --network mainnet
|
||||
```
|
||||
|
||||
Deploy TornadoPool:
|
||||
Deploy TornadoPool Upgrade:
|
||||
|
||||
```shell
|
||||
npx hardhat run scripts/deployTornadoUpgrade.js --network xdai
|
||||
|
@ -46,7 +46,7 @@ describe('TornadoPool', function () {
|
||||
const singletonFactory = await ethers.getContractAt('SingletonFactory', config.singletonFactory)
|
||||
|
||||
let customConfig = Object.assign({}, config)
|
||||
customConfig.omniBridge = amb.address
|
||||
customConfig.omniBridge = omniBridge.address
|
||||
customConfig.weth = l1Token.address
|
||||
const contracts = await generate(customConfig)
|
||||
await singletonFactory.deploy(contracts.unwrapperContract.bytecode, config.salt)
|
||||
@ -350,13 +350,13 @@ describe('TornadoPool', function () {
|
||||
extAmount,
|
||||
onTokenBridgedData,
|
||||
)
|
||||
// emulating bridge. first it sends tokens to amb mock then it sends to the recipient
|
||||
await l1Token.transfer(amb.address, extAmount)
|
||||
// emulating bridge. first it sends tokens to omniBridge mock then it sends to the recipient
|
||||
await l1Token.transfer(omniBridge.address, extAmount)
|
||||
transferTx = await l1Token.populateTransaction.transfer(l1Unwrapper.address, extAmount)
|
||||
|
||||
const senderBalanceBefore = await ethers.provider.getBalance(sender.address)
|
||||
|
||||
let tx = await amb.execute([
|
||||
let tx = await omniBridge.execute([
|
||||
{ who: l1Token.address, callData: transferTx.data }, // send tokens to L1Unwrapper
|
||||
{ who: l1Unwrapper.address, callData: onTokenBridgedTx.data }, // call onTokenBridged on L1Unwrapper
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user