Skip to content

Commit

Permalink
fix readme and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
3q-coder committed Feb 14, 2022
1 parent bb2e418 commit f4df191
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()'
```

Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions test/full.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
])
Expand Down

0 comments on commit f4df191

Please sign in to comment.