Skip to content

Commit

Permalink
Merge from develop to master (#111)
Browse files Browse the repository at this point in the history
* Resolved merge conflicts

* add diamond contract (#71)

* add diamond contract

* update compiler version in .solhint

* typo

* fix typo

* Update package.json (#76)

- Changed version to 1.8.0

* Fuse support to etherspot (#79)

* PRO-295 setup constants and update package.json

* PRO-295 Fuse Sparknet deployments

* update version and add network details

* update compiled code

* FUSE mainnet deployments

* Updated deployments

Co-authored-by: zincoshine <[email protected]>

* Update package release (#80)

* update release

* change release number

* Support for SuperTokens in BalancesHelperV2 contract (#68) (#81)

* Mainnet deployments

* 1.7.0

* Resolved merge conflicts

Co-authored-by: Luke Wickens <[email protected]>
Co-authored-by: Luke Wickens <[email protected]>

Co-authored-by: Parthasarathy Ramanujam <[email protected]>
Co-authored-by: Luke Wickens <[email protected]>
Co-authored-by: Luke Wickens <[email protected]>

* integration of connext amarok (#74)

* add diamond contract
* add connext amarok integration
* fix package-lock

* Feature/pro 305 integrate layerzero stargate (#88)

* WIP - Integration of Stargate

- Smart contract being written, some issue with logic of swap fn call on IStargateRouter.
- Added functionality into contract to be able to decide which router address to use on destination chain dynamically.
- Reduced amount of accounts created in hardhat config as causing issues with forking newer blocks with alchemy (too many requests error).
- Set up basic testing environment and added in some testing of functionality - 1 failing test due to issue with swap fn call failing to execute.
- Added in x2 more utils, one to move forward blocks and another to move forward in time (secs).

* Update StargateFacet.sol

- Changed position of getStorage() in contract

* WIP - Stargate integration

- Smart contract written
- Most functionality test except for the actual swap - some testing issues

* Stargate bridging contract /w tests and deployment scripts

- Stargate contract with preloaded existing pool information (for USDC, USDT and BUSD)
- Complete test suite (tested swapping on two separate networks)
- Deployment script

* Added natspec comments to contract

- Added natspec comments to StargateFacet.sol

* Added sgRetrievePoolId fn to contract

- sgRetrievePoolId replaces sgCheckPoolId functionality in sgBridgeTokens fn. Should now get the pool ids without having to be passed into fn
- Added testing for new fn and ensured test suite still passing

* Removed console.log contract import from facet

* Removed console.log from smart contract

* Modified ReentrancyGuard contract and moved

- Changed the contract name to DiamondReentrancyGuard.sol
- Moved the contract into common/helpers and updated the path in the facet
- Amended the NAMESPACE constant to something that better reflects the code

* Added ReentrancyGuard into Stargate facet to test typings issue

* Typing issue resolved

* Fixed issue with msg.value for swapping

- Issue with msg.value and not using quoteLayerZeroFee for msg.value being passed in - FIXED

* Removed payable from data struct to test backend issue

* compiled and built

* Some changes to facet contract and added tests

- Changed sgCheckPoolId fn to external from public.
- Added SPDX License to DiamondReentrancyGuard.
- Added tests for StargateFacet to check for deducting from user balance correctly.
- Ran slither on both StargateFacet and DiamondReentrancyGuard.
- Documentation on facet added to README.md.

Co-authored-by: Luke Wickens <[email protected]>

* update connext integration & make bridges contracts deployment separate (#90)

* update connext integration & make bridges contracts deployment separate

* feat: add hop protocol (#91)

* Feature/pro 284 integration of cbridge (#78)

* Structure setup

Set up of contract and testing file and folder structure

* cBridge smart contract and testing

- Updated hardhat version to latest and added support for issue with EIP when testing.
- Added hardhat-tracer plugin for extra visibility of events and transactions and EVM opcodes.
- Added mainnet forking to hardhat.config to reduce testing deployments.
- Added logic for cBridge integration in smart contract.
- Added new test util for checking emitted event information.
- Added new test util for checking last emitted event in a multicall function.
- Tested smart contract.
- Slither check performed.

* Amended test suite to integrate diamond functionality

- Integrated Diamond Proxy functionality into CBridgeFacet test suite.
- Added in checks to ensure some contract functions can only be called by Diamond Proxy owner.
- Created deployment script.
- Removed 0.8.13 compiler version from hardhat.config as no longer used.
- Turned off forking for deployment testing.
- HH Addr: 0xD9a9Ee6B79fBa90dA738735C85bdAf43ae1E2B60

* Updated cBridgeFacet

- Removed chainId from the contract and replaced with block.chainid and removed contract variable.
- Amended test suite to reflect the changes.

* Edited deployment script and tested CREATE2 deployment

- Edited deployment script to reflect removal of chain id.
- Tested deterministic deployment on Goerli, OptimismKovan & ArbitrumTest (0x3054F79f18AecC4aAe249fd9C8ca23D93d635504)

* Fixed linting issue

- Removed chainId variable from deployment script.

* Smart contract and test suite changes

- Added storage struct into smart contract.
- Added namespace storage pointer.
- Updated cBridge address updating function name to be more specific.
- Updated test suite to reflect smart contract changes.

* Replaced OpenZeppelin contracts

- Removed imports from OpenZeppelin
- Manually added contracts that were removed

* Reinstated IERC20 OpenZeppelin import

- Reinstated IERC20 OpenZeppelin import

* Updated CBridgeFacet to include slippage

- Added default slippage into facet
- Added functionality to update slippage tolerance
- Changed function and event names to relate more bridge type
- Added SafeERC20 functionality for standard approvals and transfers
- Removed need for LibAsset helper functions
- Updated test suite to reflect changes and confirm all still passing
- Added custom CBridge errors

* Added further tests and amended deployment script to match contract changes

- Added more revert requirements in cbBridgeTokens and added to test suite
- Changed deployment script to match new initialise fn name
- Added tests for cbWithdraw fn

* Modified ReentrancyGuard contract and moved

- Changed the contract name to DiamondReentrancyGuard.sol
- Moved the contract into common/helpers and updated the path in the facet
- Amended the NAMESPACE constant to something that better reflects the code

* Updated typings - issue with pulling through Stargate typings

* Fix for unneeded typings

- Running 'npx hardhat coverage' seemed to remove unwanted typings

* Update 204_deploy_cbridge_facet.ts

- Changed tags on deployment script in line with new diamond deployments.

* Removed receive fn from facet contract

* Update StargateFacet.sol

- Removed receive() from StargateFacet

* Removal of withdraw from CBridge and Stargate facets

- Removed withdraw fn from CBridge and Stargate facets
- Updated test suite to remove testing for withdraw fn

* Fix merge conflicts

* Update hardhat.config.ts

- Added new compiler version to hardhat.config to fix issue with @connext imported contracts

* Update package-lock.json

- Rerun of npm to install latest packages for connext libs

* Updated connext lib

* Removed 0.8.15 compiler version

* Re-added 0.8.15 compiler version

Co-authored-by: Luke Wickens <[email protected]>

* remove exceptions from deployments script (#99)

* deploy diamond contracts to testnets (#101)

deploy diamond contracts to testnets

* Feature/pro 463 arbitrum nova support (#100)

* Added Arbitrum Nova configs

- Added config information for Arbitrum Nova

* Added support for Arbitrum Nitro testnet (Goerli)

* Deployed contracts to Arbitrum Nitro testnet

- Deployed contracts to Arbitrum Nitro
- Issues with Diamond deployment not following deterministic deployment

* Amended deployment script for CBridge

- Added in error handling if network is not supported

* Reverted amendments to cbridge deployment script

* Added deployment information for diamond contracts on Arbitrum Nitro

* Added error handling for unsupported CBridge networks

Co-authored-by: Luke Wickens <[email protected]>

* Deployed on Arbitrum Nova and removed deployments from .gitignore

* Updated deployments

* add diamond contracts deployments (#105)

* Fix typo and bump version (#106)

* recompile artifacts & bump version

* Resolved merge conflict

* Resolved merge conflicts

* Changed package version number

* Pipeline improvements (#109)

* Pipeline improvements

* Change mumbai RPC

* Downgrade node

Co-authored-by: zincoshine <[email protected]>
Co-authored-by: Utkir S <[email protected]>
Co-authored-by: Luke Wickens <[email protected]>
Co-authored-by: riccardopillar <[email protected]>
Co-authored-by: Parthasarathy Ramanujam <[email protected]>
Co-authored-by: Luke Wickens <[email protected]>
Co-authored-by: Luke Wickens <[email protected]>
Co-authored-by: Ardian <[email protected]>
  • Loading branch information
9 people authored Sep 29, 2022
1 parent 327ec22 commit 3d07a84
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
install:
working_directory: ~/etherspot-contracts
docker:
- image: circleci/node:14.17.0
- image: cimg/node:14.17.0
auth:
username: $DOCKERHUB_USER
password: $DOCKERHUB_PASSWORD
Expand All @@ -33,7 +33,7 @@ jobs:
publish:
working_directory: ~/etherspot-contracts
docker:
- image: circleci/node:14.17.0
- image: cimg/node:14.17.0
auth:
username: $DOCKERHUB_USER
password: $DOCKERHUB_PASSWORD
Expand Down Expand Up @@ -88,6 +88,8 @@ workflows:
- master
- publish-github-release:
context: general-vars
requires:
- publish
filters:
branches:
only:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run-linter-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ jobs:

- name: Run tests
run: npm run test -- --report-gas

- name: Dry run build
run: npm run build
2 changes: 1 addition & 1 deletion extensions/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const NETWORK_CONFIGS: {
},
[NetworkNames.Mumbai]: {
chainId: 80001,
defaultProviderUrl: "https://rpc-mumbai.maticvigil.com",
defaultProviderUrl: "https://matic-mumbai.chainstacklabs.com",
defaultGasPrice: 5,
explorer: "https://mumbai.polygonscan.com",
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@etherspot/contracts",
"version": "1.9.0",
"version": "1.9.1",
"description": "Etherspot Solidity contracts",
"keywords": [
"ether",
Expand Down
26 changes: 26 additions & 0 deletions pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->
-

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
-

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
-
-
-

## Screenshots (if appropriate):

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

0 comments on commit 3d07a84

Please sign in to comment.