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

Introduce Proxy Colonies #1285

Draft
wants to merge 60 commits into
base: feat/fund-domains-directly
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
a6a869b
Wormhole Relayer WIP
area May 21, 2024
106242f
Add Shell contracts WIP
kronosapiens Jun 26, 2024
3b8d42d
Make bridging messages only valid on one chain
area Aug 6, 2024
0f75acd
Deploy colony shells
area Aug 8, 2024
eda2f78
Track tokens received on foreign chain
area Aug 8, 2024
bd1684f
Give pots ability to track tokens on other chains
area Aug 8, 2024
59d0422
Allow proxy colonies to pay funds
area Aug 9, 2024
dc78053
Arbitrary transactions through proxy colonies
area Aug 9, 2024
4244dc2
Remove ColonyNetworkShells
area Aug 9, 2024
ad7a941
Multiple arbitrary transactions at once through shells
area Aug 9, 2024
98f8c44
Shell -> Proxy
area Aug 9, 2024
b301228
Add hardhat deploy-proxy-network
area Aug 9, 2024
d787ca8
Move bridge data setting functions to setup-bridging-contracts
area Aug 10, 2024
5597a67
setup-bridging-contracts can handle multiple remote chains
area Aug 12, 2024
5fae75b
Add ability to call ProxyNetwork cross-chain; remove old cross-chain …
area Aug 27, 2024
f81b395
Add docs
area Aug 27, 2024
e1d7bd7
Get coverage tests working with bridge both ways
area Aug 28, 2024
dc62004
Update storage-layouts for proxy contracts
area Aug 28, 2024
2b41e15
Continue trying to get a green CircleCI build on branch
area Aug 28, 2024
d7520b0
Vaguely port chainid-based-behaviour tests (needs more work)
area Aug 28, 2024
9b86323
Streamline deployments for two chains
area Aug 29, 2024
7efe074
ChainID tests still valid for Xdai and Arbitrum
area Aug 29, 2024
c9715eb
More bridging tests
area Aug 29, 2024
0f72ec7
Continue tidying up proxy contracts
area Sep 2, 2024
136d611
More proxy-colony permission tests
area Sep 3, 2024
51548d9
Continue removing code from old cross-chain system
area Sep 3, 2024
901368b
More proxy-colony permission tests (and others)
area Sep 4, 2024
152d4ab
Allow funds to be sent directly to domains
area Sep 11, 2024
35e2902
Respect reward pots for domain-level claims; add event
area Sep 16, 2024
35d937e
First pass at cross-chain domain-level token swaps
area Sep 18, 2024
2df3a91
Fixes post-rebase
area Sep 19, 2024
790bdc8
Respect reward pots for domain-level claims; add event
area Sep 16, 2024
8e1aa10
Fix up build checks
area Sep 20, 2024
6658e86
More tests for DomainTokenReceiver
area Sep 20, 2024
8e524e9
Extra tests, mostly around permissions
area Sep 20, 2024
27bbb8e
Add metatransactions to ProxyColony
area Sep 20, 2024
64dfd02
Proxy-held to proxy-held token swapping
area Oct 1, 2024
096ddc7
Relayer actually uses destination chain to make decisions
area Oct 4, 2024
ecd962e
Post-rebase fixing
area Oct 16, 2024
ffbf03a
Introduce increment/decrement funding pot for stack size reasons
area Oct 16, 2024
630ea27
Start using viaIR
area Oct 16, 2024
70a3328
OneTxPayment cross-chain support
area Oct 16, 2024
13ee0a0
Add events for Proxy Colony deployment
area Oct 21, 2024
f494a91
Update docs post-rebase
area Nov 8, 2024
c197148
Fixes post-rebase on fund-domains-directly
area Nov 8, 2024
81b960c
makeArbitraryTransactions to singular on ProxyColony
area Nov 21, 2024
80c5377
Same-chain token swapping test
area Nov 22, 2024
cefc2d4
More LiFi guards/tests
area Nov 25, 2024
e59b07f
Guard against LiFi spending otherwise approved tokens
area Nov 26, 2024
cf187d2
For now, prevent proxy colony calling self
area Nov 27, 2024
b9fb4b2
Add Wormholescan API mock
area Nov 29, 2024
5c7b490
Use reworked domain receiving logic
area Dec 16, 2024
105c474
Have colony emit ProxyColonyRequested as well
area Jan 7, 2025
33b286d
Add VAA to operations endpoint for self-bridging scenarios
area Jan 9, 2025
1b72830
Fix function name changed after rebase
area Jan 13, 2025
0c713cf
Add agent to ProxyColonyRequested
area Jan 13, 2025
f9c499d
Easy changes following review
area Jan 20, 2025
fcf19d2
Single LiFi function
area Jan 20, 2025
9235f74
checkDomainTokenReceiverDeployed in line with previous PRs
area Jan 21, 2025
4a99667
Add common/mixins directory
area Jan 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ step_compile_mock_spy: &step_compile_mock_spy
cd ./../.. && npx hardhat compile
cp ./packages/wormhole-relayer/config.example.js ./packages/wormhole-relayer/config.js
npx tsc
step_generate_wormhole_types: &step_generate_wormhole_types
run:
name: "Generate wormhole API types for mock endpoint"
command: sudo apt install default-jre && cd ./helpers/wormholescanMock && pnpm i && npm run generate-types

jobs:
build-checks:
Expand All @@ -83,10 +87,10 @@ jobs:
- run:
name: "Checking contract storage layout hasn't had additions made"
command: rm -rf .storage-layouts-normalized && npx hardhat storage-layout --update && npm run normalize:storageSlots && test -z "$(git status --porcelain)"
- <<: *step_compile_mock_spy
- run:
name: "Linting JavaScript"
command: pnpm run eslint
- <<: *step_compile_mock_spy
- run:
name: "Linting Solidity"
command: pnpm run solhint
Expand Down Expand Up @@ -310,32 +314,26 @@ jobs:
- <<: *step_pull_solc_docker
- <<: *step_setup_global_packages
- run:
name: "Running chainid tests with coverage for mainnet"
command: CHAIN_ID=1 pnpm run test:contracts:chainid:coverage
environment:
NODE_OPTIONS: --max-old-space-size=6144
- run:
name: "Running chainid tests with coverage for goerli"
command: CHAIN_ID=5 pnpm run test:contracts:chainid:coverage
name: "Running chainid tests for Arbitrum One"
command: CHAIN_ID=42161 pnpm run test:contracts:chainid:coverage
environment:
NODE_OPTIONS: --max-old-space-size=6144
- run:
name: "Running chainid tests with coverage for xDai"
name: "Running chainid tests for Xdai"
command: CHAIN_ID=100 pnpm run test:contracts:chainid:coverage
environment:
NODE_OPTIONS: --max-old-space-size=6144
- run:
name: "Running chainid tests with coverage for an unsupported network"
command: CHAIN_ID=777 pnpm run test:contracts:chainid:coverage
name: "Running chainid tests for Mainnet"
command: CHAIN_ID=1 pnpm run test:contracts:chainid:coverage
environment:
NODE_OPTIONS: --max-old-space-size=6144
- persist_to_workspace:
root: ./
paths:
- coverage-chainid-1
- coverage-chainid-5
- coverage-chainid-100
- coverage-chainid-777
- coverage-chainid-42161
- coverage-chainid-1
coverage-test-bridging:
<<: *job_common
resource_class: large
Expand All @@ -348,6 +346,7 @@ jobs:
- <<: *step_setup_global_packages
- <<: *step_install_lsof
- <<: *step_compile_mock_spy
- <<: *step_generate_wormhole_types
- run:
name: "Installing the safe-contracts dependencies"
command: cd ./lib/safe-contracts && pnpm i --ignore-scripts
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ keys/*
lib/*
packages/**/node_modules
scripts/mockGuardianSpy.js
helpers/wormholescanMock/dist/*
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"error",
"ignorePackages",
{
"": "never",
"js": "never",
"jsx": "never",
"ts": "never",
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ coverage-extensions/
.pnpm-store
.storage-layouts
scripts/mockGuardianSpy.js
helpers/wormholescanMock/src/encodeMockVAA.js
3 changes: 2 additions & 1 deletion .soliumrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"error-reason": "error",
"max-len": "error",
"no-trailing-whitespace": "error",
"blank-lines": "error"
"blank-lines": "error",
"custom-errors": "off"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"storage": [
{
"contract": "contracts/bridging/ProxyColony.sol:ProxyColony",
"label": "authority",
"offset": 0,
"slot": "0",
"type": {
"encoding": "inplace",
"label": "contract DSAuthority",
"numberOfBytes": "20"
}
},
{
"contract": "contracts/bridging/ProxyColony.sol:ProxyColony",
"label": "owner",
"offset": 0,
"slot": "1",
"type": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
}
},
{
"contract": "contracts/bridging/ProxyColony.sol:ProxyColony",
"label": "resolver",
"offset": 0,
"slot": "2",
"type": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
}
},
{
"contract": "contracts/bridging/ProxyColony.sol:ProxyColony",
"label": "metatransactionNonces",
"offset": 0,
"slot": "3",
"type": {
"encoding": "mapping",
"key": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"label": "mapping(address => uint256)",
"numberOfBytes": "32",
"value": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
},
{
"contract": "contracts/bridging/ProxyColony.sol:ProxyColony",
"label": "tokenBalances",
"offset": 0,
"slot": "4",
"type": {
"encoding": "mapping",
"key": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"label": "mapping(address => uint256)",
"numberOfBytes": "32",
"value": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"storage": [
{
"contract": "contracts/bridging/ProxyColonyNetwork.sol:ProxyColonyNetwork",
"label": "authority",
"offset": 0,
"slot": "0",
"type": {
"encoding": "inplace",
"label": "contract DSAuthority",
"numberOfBytes": "20"
}
},
{
"contract": "contracts/bridging/ProxyColonyNetwork.sol:ProxyColonyNetwork",
"label": "owner",
"offset": 0,
"slot": "1",
"type": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
}
},
{
"contract": "contracts/bridging/ProxyColonyNetwork.sol:ProxyColonyNetwork",
"label": "resolver",
"offset": 0,
"slot": "2",
"type": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
}
},
{
"contract": "contracts/bridging/ProxyColonyNetwork.sol:ProxyColonyNetwork",
"label": "colonyBridgeAddress",
"offset": 0,
"slot": "3",
"type": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
}
},
{
"contract": "contracts/bridging/ProxyColonyNetwork.sol:ProxyColonyNetwork",
"label": "homeChainId",
"offset": 0,
"slot": "4",
"type": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
},
{
"contract": "contracts/bridging/ProxyColonyNetwork.sol:ProxyColonyNetwork",
"label": "proxyColonyResolverAddress",
"offset": 0,
"slot": "5",
"type": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
}
},
{
"contract": "contracts/bridging/ProxyColonyNetwork.sol:ProxyColonyNetwork",
"label": "proxyColonies",
"offset": 0,
"slot": "6",
"type": {
"encoding": "mapping",
"key": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"label": "mapping(address => bool)",
"numberOfBytes": "32",
"value": {
"encoding": "inplace",
"label": "bool",
"numberOfBytes": "1"
}
}
},
{
"contract": "contracts/bridging/ProxyColonyNetwork.sol:ProxyColonyNetwork",
"label": "domainTokenReceiverResolver",
"offset": 0,
"slot": "7",
"type": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
}
}
]
}
Loading