Skip to content

Commit

Permalink
Merge pull request 0xPolygon#2 from 0xPolygon/sc-rename
Browse files Browse the repository at this point in the history
Renamed contract names
  • Loading branch information
arnaubennassar authored Jul 10, 2023
2 parents d983927 + f8ce734 commit a59d0c7
Show file tree
Hide file tree
Showing 16 changed files with 955 additions and 955 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
go-version: [ 1.19.x ]
goarch: [ "amd64" ]
e2e-group: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, -supernets2-1 ]
e2e-group: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, supernets2-1 ]
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
4 changes: 2 additions & 2 deletions ci/e2e-group10/forced_batches_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/ethereum/go-ethereum/core/types"

"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/polygonzkevmglobalexitroot"
"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2"
"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2globalexitroot"
"github.com/0xPolygon/supernets2-node/log"
"github.com/0xPolygon/supernets2-node/state"
"github.com/0xPolygon/supernets2-node/test/constants"
Expand Down Expand Up @@ -145,7 +145,7 @@ func sendForcedBatch(t *testing.T, txs []byte, opsman *operations.Manager) (*sta
managerAddress, err := supernets2.GlobalExitRootManager(&bind.CallOpts{Pending: false})
require.NoError(t, err)

manager, err := supernets2globalexitroot.NewSupernets2globalexitroot(managerAddress, ethClient)
manager, err := polygonzkevmglobalexitroot.NewPolygonzkevmglobalexitroot(managerAddress, ethClient)
require.NoError(t, err)

rootInContract, err := manager.GetLastGlobalExitRoot(&bind.CallOpts{Pending: false})
Expand Down
6 changes: 3 additions & 3 deletions etherman/etherman.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (
"github.com/0xPolygon/supernets2-node/etherman/etherscan"
"github.com/0xPolygon/supernets2-node/etherman/ethgasstation"
"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/matic"
"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/polygonzkevmglobalexitroot"
"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2"
"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2datacommittee"
"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2globalexitroot"
ethmanTypes "github.com/0xPolygon/supernets2-node/etherman/types"
"github.com/0xPolygon/supernets2-node/log"
"github.com/0xPolygon/supernets2-node/state"
Expand Down Expand Up @@ -132,7 +132,7 @@ type externalGasProviders struct {
type Client struct {
EthClient ethereumClient
Supernets2 *supernets2.Supernets2
GlobalExitRootManager *supernets2globalexitroot.Supernets2globalexitroot
GlobalExitRootManager *polygonzkevmglobalexitroot.Polygonzkevmglobalexitroot
Matic *matic.Matic
DataCommittee *supernets2datacommittee.Supernets2datacommittee
SCAddresses []common.Address
Expand All @@ -156,7 +156,7 @@ func NewClient(cfg Config, l1Config L1Config) (*Client, error) {
if err != nil {
return nil, err
}
globalExitRoot, err := supernets2globalexitroot.NewSupernets2globalexitroot(l1Config.GlobalExitRootManagerAddr, ethClient)
globalExitRoot, err := polygonzkevmglobalexitroot.NewPolygonzkevmglobalexitroot(l1Config.GlobalExitRootManagerAddr, ethClient)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions etherman/etherman_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"testing"
"time"

"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/polygonzkevmbridge"
"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2"
"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2bridge"
"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2datacommittee"
ethmanTypes "github.com/0xPolygon/supernets2-node/etherman/types"
"github.com/0xPolygon/supernets2-node/log"
Expand Down Expand Up @@ -38,7 +38,7 @@ func newTestingEnv() (
ethBackend *backends.SimulatedBackend,
auth *bind.TransactOpts,
maticAddr common.Address,
br *supernets2bridge.Supernets2bridge,
br *polygonzkevmbridge.Polygonzkevmbridge,
da *supernets2datacommittee.Supernets2datacommittee,
) {
privateKey, err := crypto.GenerateKey()
Expand Down
10 changes: 5 additions & 5 deletions etherman/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (

"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/matic"
"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/mockverifier"
"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/polygonzkevmbridge"
"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/polygonzkevmglobalexitroot"
"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2"
"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2bridge"
"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2datacommittee"
"github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2globalexitroot"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/accounts/abi/bind/backends"
"github.com/ethereum/go-ethereum/common"
Expand All @@ -24,7 +24,7 @@ func NewSimulatedEtherman(cfg Config, auth *bind.TransactOpts) (
etherman *Client,
ethBackend *backends.SimulatedBackend,
maticAddr common.Address,
br *supernets2bridge.Supernets2bridge,
br *polygonzkevmbridge.Polygonzkevmbridge,
da *supernets2datacommittee.Supernets2datacommittee,
err error,
) {
Expand Down Expand Up @@ -77,11 +77,11 @@ func NewSimulatedEtherman(cfg Config, auth *bind.TransactOpts) (
const posPoE = 2
calculatedPoEAddr := crypto.CreateAddress(auth.From, nonce+posPoE)
genesis := common.HexToHash("0xfd3434cd8f67e59d73488a2b8da242dd1f02849ea5dd99f0ca22c836c3d5b4a9") // Random value. Needs to be different to 0x0
exitManagerAddr, _, globalExitRoot, err := supernets2globalexitroot.DeploySupernets2globalexitroot(auth, client, calculatedPoEAddr, calculatedBridgeAddr)
exitManagerAddr, _, globalExitRoot, err := polygonzkevmglobalexitroot.DeployPolygonzkevmglobalexitroot(auth, client, calculatedPoEAddr, calculatedBridgeAddr)
if err != nil {
return nil, nil, common.Address{}, nil, nil, err
}
bridgeAddr, _, br, err := supernets2bridge.DeploySupernets2bridge(auth, client)
bridgeAddr, _, br, err := polygonzkevmbridge.DeployPolygonzkevmbridge(auth, client)
if err != nil {
return nil, nil, common.Address{}, nil, nil, err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
},
{
"inputs": [],
"name": "OnlySupernets2",
"name": "OnlyPolygonZkEVM",
"type": "error"
},
{
Expand Down Expand Up @@ -546,7 +546,7 @@
"name": "globalExitRootManager",
"outputs": [
{
"internalType": "contract IBaseSupernets2GlobalExitRoot",
"internalType": "contract IBasePolygonZkEVMGlobalExitRoot",
"name": "",
"type": "address"
}
Expand All @@ -562,13 +562,13 @@
"type": "uint32"
},
{
"internalType": "contract IBaseSupernets2GlobalExitRoot",
"internalType": "contract IBasePolygonZkEVMGlobalExitRoot",
"name": "_globalExitRootManager",
"type": "address"
},
{
"internalType": "address",
"name": "_supernets2address",
"name": "_polygonZkEVMaddress",
"type": "address"
}
],
Expand Down Expand Up @@ -635,6 +635,19 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "polygonZkEVMaddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
Expand Down Expand Up @@ -674,19 +687,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "supernets2address",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
60c060405234801561001057600080fd5b506040516103f83803806103f883398101604081905261002f91610062565b6001600160a01b0391821660a05216608052610095565b80516001600160a01b038116811461005d57600080fd5b919050565b6000806040838503121561007557600080fd5b61007e83610046565b915061008c60208401610046565b90509250929050565b60805160a0516103316100c76000396000818160e901526101bd015260008181610135015261017401526103316000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806333d6247d1161005b57806333d6247d146100c75780633ed691ef146100dc5780635ec6a8df146100e4578063a3c573eb1461013057600080fd5b806301fd904414610082578063257b36321461009e578063319cf735146100be575b600080fd5b61008b60005481565b6040519081526020015b60405180910390f35b61008b6100ac3660046102e2565b60026020526000908152604090205481565b61008b60015481565b6100da6100d53660046102e2565b610157565b005b61008b6102a6565b61010b7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610095565b61010b7f000000000000000000000000000000000000000000000000000000000000000081565b60005460015473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036101a65750600182905581610222565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036101f0576000839055829150610222565b6040517fb49365dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051602080820184905281830185905282518083038401815260609092019092528051910120600090600081815260026020526040812054919250036102a05760008181526002602052604080822042905551849184917f61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce39190a35b50505050565b60006102dd600154600054604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b905090565b6000602082840312156102f457600080fd5b503591905056fea26469706673582212203c4d2d0547a17af6dc140c2a13674ce2911241efa8d9600104536fdae5d3693664736f6c63430008110033
60c060405234801561001057600080fd5b506040516103f83803806103f883398101604081905261002f91610062565b6001600160a01b0391821660a05216608052610095565b80516001600160a01b038116811461005d57600080fd5b919050565b6000806040838503121561007557600080fd5b61007e83610046565b915061008c60208401610046565b90509250929050565b60805160a0516103316100c76000396000818160e901526101bd015260008181610135015261017401526103316000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806333d6247d1161005b57806333d6247d146100c75780633ed691ef146100dc5780635ec6a8df146100e4578063a3c573eb1461013057600080fd5b806301fd904414610082578063257b36321461009e578063319cf735146100be575b600080fd5b61008b60005481565b6040519081526020015b60405180910390f35b61008b6100ac3660046102e2565b60026020526000908152604090205481565b61008b60015481565b6100da6100d53660046102e2565b610157565b005b61008b6102a6565b61010b7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610095565b61010b7f000000000000000000000000000000000000000000000000000000000000000081565b60005460015473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036101a65750600182905581610222565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036101f0576000839055829150610222565b6040517fb49365dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051602080820184905281830185905282518083038401815260609092019092528051910120600090600081815260026020526040812054919250036102a05760008181526002602052604080822042905551849184917f61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce39190a35b50505050565b60006102dd600154600054604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b905090565b6000602082840312156102f457600080fd5b503591905056fea2646970667358221220bc23c6d5d3992802bdfd06ef45362230dcda7d33db81b1dc3ef40d86219e81c864736f6c63430008110033
Loading

0 comments on commit a59d0c7

Please sign in to comment.