Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

MintAndBurnTokenManager (and possibly others) do not revert when you ask them to transfer to an unknown destination. #24

Open
rrw-zilliqa opened this issue Dec 23, 2024 · 0 comments
Assignees

Comments

@rrw-zilliqa
Copy link
Contributor

When we're asked to transfer tokens, we look up the remote token address in our lookup table. If the table doesn't include an address, we get 0x0 and attempt to transfer tokens to address 0x0 on the remote chain.

Two problems - first, this will credit native tokens if the chain id exists. Second, it will eat the source tokens.

@rrw-zilliqa rrw-zilliqa self-assigned this Dec 23, 2024
rrw-zilliqa added a commit that referenced this issue Dec 24, 2024
…o long as we have enough validators agreeing) "bad" transactions like those arising from #24
rrw-zilliqa added a commit that referenced this issue Jan 22, 2025
* (feat) Zilbridge compatibility contracts.
(feat) Documentation for zilbridge compatibility contracts.
(feat) Scilla deployment scripts for zilbridge compatibility contracts.

* (feat) Update trunk in an attempt to get it to obey the configuration file.

* (fix) Trunk now complains about its own auto-generated default config file.

* (feat) Allow the UI to use zilbridge compatibility test tokens.

* (fix) Fix typescript compile

* (feat) A LockProxyProxy contract which limits access to the LockProxy extension to nominated tokens.

* Start of zilbridge migration

* (fix) Remove spurious transfer function

* (feat) DummyLockProxyProxy
(feat) Misc deployment scripts

* (feat) Deploy token managers to zilliqa

* (feat) more docs

* Update scripts

* (feat) Deploy token managers to bsc.

* (feat) Deploy to polygon

* (feat) Managers deployed to everything other than eth, I think. Now routing.

* (fix) You should never use the Zilliqa mainnet unrestricted lockproxyproxy, since the Zilliqa LockProxy isn't EVM
(fix) Mark the Zilliqa LockAndReleaseTokenManager as not to use , since if you try to get it to lock native tokens, it won't.

* (fix) Check that the remote token manager exists before trying to use it.

* (fix) Fixes for deployment scripts to account for renaming in mainnetConfig.s.sol
(fix) Use custom errors and more standard error handling in V4 token managers.
(feat) Tests for V4 token managers.

* (feat) Start of an exception list

* (feat) An exceptions facility so that we can retroactively correct (so long as we have enough validators agreeing) "bad" transactions like those arising from #24

* (feat) Allow zero value transfers, for special effects.

* (fix) Bring broadcast back in so we have a record of what was broadcast.
(feat) Mainnet config updates

* (feat) Add polygon routing.

* (feat) more zilbridge transition scripts
(feat) don't try to trace history from zero
(feat) doc fixes

* (feat) Add polygon bridging

* (feat) Add a scale factor to the V4 token maanager

* (feat) Update storage layout.
(feat) Start to adapt tests

* (feat) Ability to remove tokens.
(fix) Fix behaviour when scale == 0
(feat) Start of V4 tests

* (feat) More tests - including a scale test that fails. Next step is to fix it.

* (fix) Fix scaling function
(feat) Refactor errors for visibility.
(feat) Tests for the v4 token manager

* (feat) Overflow test.

* (feat) Deployment scripts and config for upgrading testnet token managers and generating a test scaled token

* (feat) Zilliqa side token manager upgrade script

* (feat) Update (new) token managers on Zilliqa mainnet and Polygon to V4; add scaled routing so that ZIL <-> POL routing works.

* (feat) bridge-web: force Zilliqa to be one of the networks to bridge to - we don't yet support third-party bridging
(feat) arb scripts and routing.
(feat) Add arb tokens to config.ts

* (feat) Deployment scripts for Ethereum
(feat) Fix the long-standing chain switch bug in the UI

* (feat) Go back to the old lockProxyProxy on eth, because it is the one Switcheo registered (and it's fine - same parameters, and now verified)
(feat) Separate legacy and overcommit - ethereum requires legacy = false, overcommit = true.
(fix) Fix odd result of duplicate contract addresses for OPUL and zETH

* (fix) config updates.
(feat) Configure bsc zilbridge routing
(feat) Start of explicit workflow

* (feat) Support for explicitly calling eth_maxPriorityFeePerGas because polygon sometimes requires us to do so

* (fix) Fix trigger

* (feat) Start of a token manager which can cope with Tether

* (feat) A version of the lock and release token manager which copes with old contracts (due to an idea of JH's).
(fix) Remove the ability to construct V4 - you should use V5.

* (feat) Support for USDT.

* (feat) Token logos
(fix) Sensible chain names
(feat) Display source and destination addresses so that users can verify them.
(feat) Only display the "zero allowance" button for tokens where this is actulaly necessary.

* (fix) FEES should have the same name at both ends.
(feat) Link to the block explorer for source and target tokens

* (fix) Fix env vars and rotate keys

* (fix) Routing changes.

* (fix) Use stable foundry to compile contracts (so that it works - nightly currently doesn't)
(fix) Formatting

* (fix) Fix review comments (somewhat)

* (fix) linting

* (feat) Add long-lost trunk config files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant