0xpolygon / edge-contracts Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Add state sender contract to send data to Polygon chain.
V3 node will listen to these states and relay them on Polygon chain.
Some sections are duplicated or misplaced. Most likely when we merged branches last time.
Currently, there is no support for bridging the native token between rootchain and childchain.
For example, on Ethereum, the native token is Ether, i.e. not an ERC20. This means the RootERC20Predicate
contract cannot be used to facilitate the deposit and withdrawal of Ether.
This Github issue proposes adding new contracts RootNativePredicate
and ChildNativePredicate
which can be used to facilitate the deposit and withdrawal of Ether. (Open to naming convention changes)
One could argue that users can deposit WETH (an ERC20 wrapper of Ether) however, this causes significant UX friction, requiring users to wrap and unwrap, while also introducing issues for non-crypto native users who are not familiar with WETH and the need for wrapping.
I will be implementing the contracts required to support Native Token Bridging and ideally, it would be merged back to this repository. I'll share a draft PR as it progresses. Open to discussion here
Before the audit, we should consider using the latest stables for all packages involved and backtesting, as well as run everything on latest LTS (the CI does this) to prevent any tooling pitfalls in the future.
I am trying to run the test suite out of the box (clone, install deps, run) but Im getting the following errors:
~/d/core-contracts/test forge test --via-ir ok 1m 5s slither-venv py
[⠒] Compiling...
[⠆] Compiling 258 files with 0.8.19
[⠔] Solc 0.8.19 finished in 34.64s
Error:
Compiler run failed:
Error: Yul exception:Cannot swap Variable var_pt1yy with Variable expr_11679_component_1: too deep in the stack by 2 slots in [ var_pt3_mpos RET var_pt1yy var_pt1yx var_pt1yy var_pt1yx var_pt2zy var_pt2zx var_pt1zy var_pt1zx var_pt3_mpos var_pt1xy var_pt1zx var_pt2xy var_pt1xx var_pt2xx var_pt1zy var_pt2zx var_pt2zy expr_11679_component expr_11679_component_1 ]
No memoryguard was present. Consider using memory-safe assembly only and annotating it via 'assembly ("memory-safe") { ... }'.
No memoryguard was present. Consider using memory-safe assembly only and annotating it via 'assembly ("memory-safe") { ... }'.
As you can see Im running the forge test
command which results in the above error.
Is it a known issue that the test suites fail or that just misconfiguration on my side?
ERC 20 Bridges / withdraws to Ethereum: To withdraw a token to Ethereum, the withdrawal contract on Ethereum is RootERC20Predicate. At present, this contract has the following features:
I suggest the creation of an extension to RootERC20Predicate that does the following:
The goal of all of the suggestions is to have a way for us to slow down / stop an in progress attack.
Maybe the new contract could be called RootERC20PredicateLimits.
I am happy to commence work on this. However, before I start, I would like to have a discussion to ensure we have alignment on how this could be added to the repo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.