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

Match network configuration with Chainlist #1511

Merged
merged 4 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion go/config/enclave_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func DefaultEnclaveConfig() *EnclaveConfig {
Address: "127.0.0.1:11000",
NodeType: common.Sequencer,
L1ChainID: 1337,
ObscuroChainID: 777,
ObscuroChainID: 443,
WillAttest: false, // todo (config) - attestation should be on by default before production release
ValidateL1Blocks: false,
GenesisJSON: nil,
Expand Down
2 changes: 1 addition & 1 deletion go/config/host_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func DefaultHostParsedConfig() *HostInputConfig {
LogPath: "",
PrivateKeyString: "0000000000000000000000000000000000000000000000000000000000000001",
L1ChainID: 1337,
ObscuroChainID: 777,
ObscuroChainID: 443,
ProfilerEnabled: false,
L1StartHash: common.L1BlockHash{}, // this hash will not be found, host will log a warning and then stream from L1 genesis
SequencerID: gethcommon.BytesToAddress([]byte("")),
Expand Down
2 changes: 1 addition & 1 deletion integration/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ const (

const (
EthereumChainID = 1337
ObscuroChainID = 777
ObscuroChainID = 443
)
2 changes: 1 addition & 1 deletion integration/manualtests/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var (

l2Wallet = wallet.NewInMemoryWalletFromConfig(
"4bfe14725e685901c062ccd4e220c61cf9c189897b6c78bd18d7f51291b2b8f8",
777,
443,
gethlog.New())
l2Host = "localhost"
l2Port = 37900
Expand Down
2 changes: 1 addition & 1 deletion tools/faucet/cmd/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ func parseCLIArgs() *faucet.Config {
PK: *faucetPK,
JWTSecret: *jwtSecret,
ServerPort: *serverPort,
ChainID: big.NewInt(777), // TODO make this configurable
ChainID: big.NewInt(443), // TODO make this configurable
}
}
2 changes: 1 addition & 1 deletion tools/hardhatdeployer/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const (

var (
defaultL1ChainID = big.NewInt(1337)
defaultL2ChainID = big.NewInt(777)
defaultL2ChainID = big.NewInt(443)
)

// DefaultConfig stores the contract client default config
Expand Down
2 changes: 1 addition & 1 deletion tools/hardhatdeployer/cli_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const (
privateKeyUsage = "The private key for the node account"

chainIDName = "chainID"
chainIDUsage = "The ID of the chain (defaults to 777 for L2 deployment and 1337 for L1)"
chainIDUsage = "The ID of the chain (defaults to 443 for L2 deployment and 1337 for L1)"

constructorParamsName = "constructorParams"
constructorParamsUsage = "A comma separated list of strings that will be passed to the deployer. Defaults to empty."
Expand Down
12 changes: 6 additions & 6 deletions tools/walletextension/api/staticOG/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const pathJoin = obscuroGatewayVersion + "/join/";
const pathAuthenticate = obscuroGatewayVersion + "/authenticate/";
const pathQuery = obscuroGatewayVersion + "/query/";
const pathRevoke = obscuroGatewayVersion + "/revoke/";
const obscuroChainIDDecimal = 777;
const obscuroChainIDDecimal = 443;
const methodPost = "post";
const methodGet = "get";
const jsonHeaders = {
Expand All @@ -32,7 +32,6 @@ let provider = null;
async function addNetworkToMetaMask(ethereum, userID, chainIDDecimal) {
// add network to MetaMask
let chainIdHex = "0x" + chainIDDecimal.toString(16); // Convert to hexadecimal and prefix with '0x'

try {
await ethereum.request({
method: 'wallet_addEthereumChain',
Expand All @@ -41,12 +40,12 @@ async function addNetworkToMetaMask(ethereum, userID, chainIDDecimal) {
chainId: chainIdHex,
chainName: 'Obscuro Testnet',
nativeCurrency: {
name: 'Obscuro',
symbol: 'OBX',
name: 'Sepolia Ether',
symbol: 'ETH',
decimals: 18
},
rpcUrls: [obscuroGatewayAddress+"/"+obscuroGatewayVersion+'/?u='+userID],
blockExplorerUrls: null
blockExplorerUrls: ['https://testnet.obscuroscan.io'],
},
],
});
Expand Down Expand Up @@ -314,4 +313,5 @@ const initialize = async () => {

}

window.addEventListener(eventDomLoaded, checkIfMetamaskIsLoaded);
window.addEventListener(eventDomLoaded, checkIfMetamaskIsLoaded);