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

Refactor staking #693

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 1 addition & 7 deletions bindings/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ bindings: \
l2-gov-bindings \
l2-sequencer-bindings \
l2-staking-bindings \
l2-distribute-bindings \
l2-record-bindings \
l2-eth-gateway-bindings \
l2-standard-erc20-gateway-bindings \
l2-gateway-router-bindings \
Expand Down Expand Up @@ -126,10 +124,6 @@ l2-sequencer-bindings: compile
./gen_bindings.sh contracts/l2/staking/Sequencer.sol:Sequencer $(pkg)
l2-staking-bindings: compile
./gen_bindings.sh contracts/l2/staking/L2Staking.sol:L2Staking $(pkg)
l2-distribute-bindings: compile
./gen_bindings.sh contracts/l2/staking/Distribute.sol:Distribute $(pkg)
l2-record-bindings: compile
./gen_bindings.sh contracts/l2/staking/Record.sol:Record $(pkg)

# Gateways
l2-eth-gateway-bindings: compile
Expand Down Expand Up @@ -191,7 +185,7 @@ more: compile-forge
go run ./gen/main.go \
-artifacts ../contracts/artifacts \
-out ./bindings \
-contracts ProxyAdmin,TransparentUpgradeableProxy,L1MessageQueueWithGasPriceOracle,L1USDCGateway,L1Staking,L1CrossDomainMessenger,L1StandardERC20Gateway,L1ETHGateway,L1ERC20Gateway,L1GatewayRouter,L1WETHGateway,L1LidoGateway,Rollup,MultipleVersionRollupVerifier,L2CrossDomainMessenger,GasPriceOracle,L2ToL1MessagePasser,L2TxFeeVault,Sequencer,Gov,Distribute,L2Staking,Record,L2ETHGateway,L2StandardERC20Gateway,L2GatewayRouter,L2WETHGateway,L2ERC20Gateway,L2ERC721Gateway,L2ERC1155Gateway,L2LidoGateway,MorphToken,MorphStandardERC20,MorphStandardERC20Factory,WrappedEther,L2USDCGateway,EnforcedTxGateway,L1ERC721Gateway,L1ERC1155Gateway,L1ReverseCustomGateway,L2WithdrawLockERC20Gateway,L2ReverseCustomGateway,Whitelist,ZkEvmVerifierV1,L2WstETHToken \
-contracts ProxyAdmin,TransparentUpgradeableProxy,L1MessageQueueWithGasPriceOracle,L1USDCGateway,L1Staking,L1CrossDomainMessenger,L1StandardERC20Gateway,L1ETHGateway,L1ERC20Gateway,L1GatewayRouter,L1WETHGateway,L1LidoGateway,Rollup,MultipleVersionRollupVerifier,L2CrossDomainMessenger,GasPriceOracle,L2ToL1MessagePasser,L2TxFeeVault,Sequencer,Gov,L2Staking,L2ETHGateway,L2StandardERC20Gateway,L2GatewayRouter,L2WETHGateway,L2ERC20Gateway,L2ERC721Gateway,L2ERC1155Gateway,L2LidoGateway,MorphToken,MorphStandardERC20,MorphStandardERC20Factory,WrappedEther,L2USDCGateway,EnforcedTxGateway,L1ERC721Gateway,L1ERC1155Gateway,L1ReverseCustomGateway,L2WithdrawLockERC20Gateway,L2ReverseCustomGateway,Whitelist,ZkEvmVerifierV1,L2WstETHToken \
-package bindings

mkdir:
Expand Down
1 change: 0 additions & 1 deletion bindings/bin/distribute_deployed.hex

This file was deleted.

2 changes: 1 addition & 1 deletion bindings/bin/l2staking_deployed.hex

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bindings/bin/morphtoken_deployed.hex

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion bindings/bin/record_deployed.hex

This file was deleted.

1,327 changes: 0 additions & 1,327 deletions bindings/bindings/distribute.go

This file was deleted.

25 changes: 0 additions & 25 deletions bindings/bindings/distribute_more.go

This file was deleted.

1,142 changes: 901 additions & 241 deletions bindings/bindings/l2staking.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions bindings/bindings/l2staking_more.go

Large diffs are not rendered by default.

59 changes: 14 additions & 45 deletions bindings/bindings/morphtoken.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bindings/bindings/morphtoken_more.go

Large diffs are not rendered by default.

1,726 changes: 0 additions & 1,726 deletions bindings/bindings/record.go

This file was deleted.

25 changes: 0 additions & 25 deletions bindings/bindings/record_more.go

This file was deleted.

11 changes: 5 additions & 6 deletions bindings/predeploys/addresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ const (
GasPriceOracle = "0x530000000000000000000000000000000000000F"
L2WETHGateway = "0x5300000000000000000000000000000000000010"
L2WETH = "0x5300000000000000000000000000000000000011"
Record = "0x5300000000000000000000000000000000000012"
_ = "0x5300000000000000000000000000000000000012"
MorphToken = "0x5300000000000000000000000000000000000013"
Distribute = "0x5300000000000000000000000000000000000014"
_ = "0x5300000000000000000000000000000000000014"
L2Staking = "0x5300000000000000000000000000000000000015"
L2CustomERC20Gateway = "0x5300000000000000000000000000000000000016"
Sequencer = "0x5300000000000000000000000000000000000017"
L2ReverseCustomGateway = "0x5300000000000000000000000000000000000018"
L2WithdrawLockERC20Gateway = "0x5300000000000000000000000000000000000019"
L2USDCGateway = "0x5300000000000000000000000000000000000020"
System = "0x5300000000000000000000000000000000000021"
)

var (
Expand All @@ -48,14 +49,13 @@ var (
MorphStandardERC20FactoryAddr = common.HexToAddress(MorphStandardERC20Factory)
L2WETHGatewayAddr = common.HexToAddress(L2WETHGateway)
L2WETHAddr = common.HexToAddress(L2WETH)
RecordAddr = common.HexToAddress(Record)
MorphTokenAddr = common.HexToAddress(MorphToken)
DistributeAddr = common.HexToAddress(Distribute)
L2StakingAddr = common.HexToAddress(L2Staking)
L2CustomERC20GatewayAddr = common.HexToAddress(L2CustomERC20Gateway)
L2ReverseCustomGatewayAddr = common.HexToAddress(L2ReverseCustomGateway)
L2WithdrawLockERC20GatewayAddr = common.HexToAddress(L2WithdrawLockERC20Gateway)
L2USDCGatewayAddr = common.HexToAddress(L2USDCGateway)
SystemAddr = common.HexToAddress(System)

Predeploys = make(map[string]*common.Address)
)
Expand All @@ -67,7 +67,6 @@ func init() {
Predeploys["ProxyAdmin"] = &ProxyAdminAddr
Predeploys["Sequencer"] = &SequencerAddr
Predeploys["Gov"] = &GovAddr
Predeploys["Record"] = &RecordAddr
Predeploys["L2GatewayRouter"] = &L2GatewayRouterAddr
Predeploys["L2ETHGateway"] = &L2ETHGatewayAddr
Predeploys["L2StandardERC20Gateway"] = &L2StandardERC20GatewayAddr
Expand All @@ -76,7 +75,6 @@ func init() {
Predeploys["MorphStandardERC20"] = &MorphStandardERC20Addr
Predeploys["MorphStandardERC20Factory"] = &MorphStandardERC20FactoryAddr
Predeploys["MorphToken"] = &MorphTokenAddr
Predeploys["Distribute"] = &DistributeAddr
Predeploys["L2Staking"] = &L2StakingAddr
Predeploys["L2TxFeeVault"] = &L2TxFeeVaultAddr
Predeploys["L2WETHGateway"] = &L2WETHGatewayAddr
Expand All @@ -85,4 +83,5 @@ func init() {
Predeploys["L2ReverseCustomGateway"] = &L2ReverseCustomGatewayAddr
Predeploys["L2WithdrawLockERC20Gateway"] = &L2WithdrawLockERC20GatewayAddr
Predeploys["L2USDCGateway"] = &L2USDCGatewayAddr
Predeploys["SYSTEM"] = &SystemAddr
}
134 changes: 0 additions & 134 deletions contracts/contracts/Staking.md

This file was deleted.

Loading