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

Tests use permissionless l1 #641

Merged
merged 37 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
651ee90
basic teleporter test passing
cam-schultz Nov 7, 2024
9a46f4f
bind validator manager interfaces
cam-schultz Nov 7, 2024
9012825
consolidate deploy methods
cam-schultz Nov 7, 2024
a47a345
consolidate validator manager function call helpers
cam-schultz Nov 7, 2024
fb8af19
convert subnet on network creation
cam-schultz Nov 8, 2024
68af482
build fix
cam-schultz Nov 8, 2024
ad53a47
consolidate init and deploy helpers
cam-schultz Nov 8, 2024
f4d418d
vdr churn test uses manager
cam-schultz Nov 8, 2024
41b1f13
fix: use type param
cam-schultz Nov 8, 2024
8a21d86
vdr churn uses manager
cam-schultz Nov 8, 2024
0d8309e
collect signatures using sigagg
cam-schultz Nov 8, 2024
2995f90
skip registry test
cam-schultz Nov 8, 2024
1c9e89f
consolidate delegation helpers
cam-schultz Nov 8, 2024
064f849
convert subnet supports proxy & all manager types
cam-schultz Nov 9, 2024
1fd68ff
lint
cam-schultz Nov 9, 2024
c1fc63c
parameterize initial subnet weights
cam-schultz Nov 9, 2024
f53242c
wait to allow churn period to roll over
cam-schultz Nov 9, 2024
f7629d2
remove bootstrap vdrs from subnet
cam-schultz Nov 12, 2024
8e4025d
go mod tidy
cam-schultz Nov 12, 2024
9c783f5
cleanup
cam-schultz Nov 12, 2024
19f1047
remove unused method
cam-schultz Nov 13, 2024
5b3a79c
parameterize number of primary network validators
cam-schultz Nov 13, 2024
fdd3e57
depend on local relayer
cam-schultz Nov 13, 2024
e632c55
remove local dep
cam-schultz Nov 13, 2024
ea2c4d5
wip
cam-schultz Nov 15, 2024
106a220
wip
cam-schultz Nov 20, 2024
d0fa517
p2p tests passing
cam-schultz Nov 21, 2024
4dab87e
cleanup
cam-schultz Nov 21, 2024
c3e06c8
awm-relayer compat
cam-schultz Nov 21, 2024
452b448
revert local awm-relayer dependent changes
cam-schultz Nov 21, 2024
34d761f
Merge branch 'main' into tests-use-permissionless-l1
cam-schultz Nov 21, 2024
5e57afc
initialize with uptime chain
cam-schultz Nov 21, 2024
1bd1eda
build fix
cam-schultz Nov 21, 2024
226937a
bump to ava go v1.12.0-fuji
cam-schultz Nov 21, 2024
997097c
Merge branch 'main' into tests-use-permissionless-l1
cam-schultz Nov 21, 2024
47ee410
feedback
cam-schultz Nov 21, 2024
24dd273
Merge branch 'main' into tests-use-permissionless-l1
cam-schultz Nov 22, 2024
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

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions contracts/validator-manager/ERC20TokenStakingManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ contract ERC20TokenStakingManager is
return _initializeDelegatorRegistration(validationID, _msgSender(), delegationAmount);
}

/**
* @notice Returns the ERC20 token being staked
*/
function erc20() external view returns (IERC20Mintable) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this to allow the deployment utility to return an IPoSValidatorManager object, and recover the ERC20 instance after the fact. It also seems reasonable that use cases will emerge that will want to access the staked asset programatically.

return _getERC20StakingManagerStorage()._token;
}

/**
* @notice See {PoSValidatorManager-_lock}
* Note: Must be guarded with reentrancy guard for safe transfer from.
Expand Down
36 changes: 31 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ module github.com/ava-labs/teleporter
go 1.22.8

require (
github.com/ava-labs/avalanchego v1.12.0-initial-poc.5
github.com/supranational/blst v0.3.11 // indirect
github.com/ava-labs/avalanchego v1.12.0-initial-poc.8
github.com/supranational/blst v0.3.13 // indirect
)

require (
github.com/ava-labs/awm-relayer v1.4.1-0.20241010161724-2db445c994d6
github.com/ava-labs/awm-relayer v1.4.1-0.20241112172851-472c76dde821
github.com/ava-labs/subnet-evm v0.6.11
github.com/ethereum/go-ethereum v1.13.14
github.com/onsi/ginkgo/v2 v2.21.0
Expand Down Expand Up @@ -48,6 +48,7 @@ require (
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
github.com/dlclark/regexp2 v1.7.0 // indirect
github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect
Expand All @@ -57,12 +58,18 @@ require (
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
github.com/google/renameio/v2 v2.0.0 // indirect
github.com/google/uuid v1.6.0 // indirect
Expand All @@ -82,18 +89,25 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackpal/gateway v1.0.6 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/pointerstructure v1.2.0 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
Expand All @@ -104,7 +118,7 @@ require (
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/rs/cors v1.7.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
Expand Down Expand Up @@ -136,17 +150,29 @@ require (
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/oauth2 v0.22.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/term v0.25.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/time v0.3.0 // indirect
gonum.org/v1/gonum v0.11.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed // indirect
google.golang.org/grpc v1.67.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.29.0 // indirect
k8s.io/apimachinery v0.29.0 // indirect
k8s.io/client-go v0.29.0 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
rsc.io/tmplfunc v0.0.3 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading