Open bitcoinbrisbane opened 18 hours ago
This pull request introduces new smart contracts and modifies existing ones, focusing on token management and integration with the Uniswap V3 protocol. Key additions include the UniswapV3ViaRouterFomo
contract for token swaps, the DynamicEater
contract for token vesting and trading, and the MockToken2
for testing purposes. Additionally, a BondingCurve
library is added to facilitate price calculations in bonding curves. The deployment configuration is updated to reflect the new contract structure and remove obsolete entries.
File Path | Change Summary |
---|---|
contracts/core/adaptors/UniswapV3ViaRouterFomo.sol |
Added contract UniswapV3ViaRouterFomo with functions sell , buy , and sellAndBuy . |
contracts/core/merge/DynamicEater.sol |
Added contract DynamicEater , struct Vesting , and multiple functions for token management and vesting. |
contracts/core/mocks/MockToken.sol |
Added new contract MockToken2 implementing ERC20 with standard functions. |
contracts/interfaces/IMergeV2.sol |
Added struct Vesting with properties amount and end . |
ignition/deployments/chain-8453/artifacts/DynamicEaterModule#DynamicEater.dbg.json |
New debug JSON file for DynamicEater . |
ignition/deployments/chain-8453/artifacts/DynamicEaterModule#DynamicEater.json |
New artifact JSON file for DynamicEater contract. |
ignition/deployments/chain-8453/artifacts/MergeFactoryModule#MergeFactory.json |
Removed artifact JSON for MergeFactory . |
ignition/deployments/chain-8453/deployed_addresses.json |
Updated deployed addresses, removing old entries and adding DynamicEater . |
ignition/modules/DynamicEaterModule.ts |
Added new module DynamicEaterModule for contract initialization. |
package.json |
Updated scripts to use yarn and added TypeScript dependencies. |
test/DynamicEater.test.ts |
Added tests for DynamicEater functionality. |
contracts/core/BondingCurve.sol |
Added library BondingCurve with function calculateTokensOut . |
.husky/pre-commit |
Removed pre-commit hook for code formatting. |
Objective | Addressed | Explanation |
---|---|---|
Merge ratio starts at slight premium (10-20%) (81) | ❓ | Implementation details for the premium calculation are not clear. |
Merge ratio ends at -50% discount (81) | ❓ | The discount mechanism is not explicitly defined in the changes. |
Use virtual balances to achieve this (81) | ✅ | The DynamicEater contract utilizes virtual balances for token management. |
Send merged coins to the WEWE treasury (81) | ❌ | There is no implementation for sending merged coins to the treasury. |
UniswapV3ViaRouterFomo
contract.UniswapV3ViaRouterETH
contract, which is related to the UniswapV3ViaRouterFomo
contract.BaseUniRouter
with a new function for multihop swaps, relevant to the UniswapV3ViaRouterFomo
contract.UniswapV3ViaRouterFomo
contract.UniswapV3ViaRouterFomo
contract.enhancement
, eat-all-the-tokens
Hop, hop, here we go,
Dynamic Eater steals the show!
With tokens merged and rates that sway,
In the garden of swaps, we play all day.
A bunny's dream, a treasure trove,
In this code, our magic wove! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Closes #81
Summary by CodeRabbit
New Features
DynamicEater
contract for managing token vesting and trading.UniswapV3ViaRouterFomo
contract for facilitating token swaps using the Uniswap V3 protocol.MockToken2
, enhancing the mock token functionality with complete ERC20 support.Vesting
struct to improve data structure capabilities.Bug Fixes
MergeFactory
andMergeWithMarket
to streamline functionality.Tests
DynamicEater
contract, including dynamic pricing and whitelist functionality.Chores
package.json
to enhance TypeScript support and modify script commands..husky/pre-commit
file, affecting automatic code formatting during commits.