Skip to content

Commit

Permalink
Match network configuration with Chainlist
Browse files Browse the repository at this point in the history
  • Loading branch information
zkokelj committed Oct 3, 2023
1 parent 22e6311 commit cb61ace
Show file tree
Hide file tree
Showing 18 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion contracts/config/networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
]
},
"localObscuro": {
"chainId": 777,
"chainId": 443,
"url": "http://127.0.0.1:3000/v1",
"obscuroEncRpcUrl": "ws://127.0.0.1:81",
"gasPrice": 2000000000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ release). An arbitrary `gasPrice` should be given e.g. the current price on the
'nonce': w3.eth.getTransactionCount(account.address),
'gasPrice': 1499934385,
'gas': 720000,
'chainId': 777
'chainId': 443
}
)
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def run():
'nonce': w3.eth.getTransactionCount(account.address),
'gasPrice': 1499934385,
'gas': 720000,
'chainId': 777
'chainId': 443
}
)

Expand Down
2 changes: 1 addition & 1 deletion docs/_docs/testnet/deploying-a-smart-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ You can now go ahead and deploy your smart contract to the Obscuro Testnet.

1. Log in to MetaMask and confirm you are connected to Obscuro Testnet network. The parameters for the Obscuro Testnet can be found [here](https://docs.obscu.ro/testnet/essentials/).

1. In the _Deploy & Run Transactions_ section of Remix change the Environment to _Injected Web3_. This tells Remix to use the network settings currently configured in your MetaMask wallet, which in this case is the Obscuro Testnet. If the connection to Obscuro Testnet is successful you will see the text _Custom (777) network_ displayed under _Injected Web3_.
1. In the _Deploy & Run Transactions_ section of Remix change the Environment to _Injected Web3_. This tells Remix to use the network settings currently configured in your MetaMask wallet, which in this case is the Obscuro Testnet. If the connection to Obscuro Testnet is successful you will see the text _Custom (443) network_ displayed under _Injected Web3_.

1. Click the _Deploy_ button to deploy your smart contract to the Obscuro Testnet.

Expand Down
2 changes: 1 addition & 1 deletion docs/_docs/testnet/example-dapps.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Building the guessing game in Obscuro addresses both scenarios described above.
1. Start up the wallet extension. Follow instructions [here](https://docs.obscu.ro/wallet-extension/wallet-extension).
1. For the moment, the Guessing Game includes an ERC20 token (called OGG, short for Obscuro Guessing Game). This is partly because OGG is modified to have a built-in faucet: It allocates tokens to addresses as they make a request to allow other addresses to take tokens from their account.
1. If you want to see this balance in your wallet, you have to import a new Token with the address: ``0x5FbDB2315678afecb367f032d93F642f64180aa3``
1. Browse to [the number guessing game](http://obscuronet.github.io/sample-applications/number-guessing-game). Check you see `Network ID: 777` at the top of the game window to confirm you are connected to Obscuro Testnet.
1. Browse to [the number guessing game](http://obscuronet.github.io/sample-applications/number-guessing-game). Check you see `Network ID: 443` at the top of the game window to confirm you are connected to Obscuro Testnet.
1. MetaMask will open and ask to connect your account. Click `Next` then click `Connect`.
1. Approve the payment of 1 or more token units to play the game (this will be added to the prize pool) by clicking the `Approve game fee` button.
1. MetaMask will ask for your account to sign a transaction specifying the Guess contract address as the approval delegate. This means that you're giving permission for the game to take the participation fee. Click `Confirm`. Once approved you will see a confirmation popup. Click `OK`.
Expand Down
4 changes: 2 additions & 2 deletions docs/_docs/wallet-extension/configure-metamask.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ To keep data encrypted between MetaMask and the Obscuro network, MetaMask needs

* Network Name: Obscuro Testnet
* New RPC URL: `http://127.0.0.1:3000/`
* Chain ID: 777
* Currency Symbol: OBX
* Chain ID: 443
* Currency Symbol: ETH

It should look like this:

Expand Down
2 changes: 1 addition & 1 deletion go/config/enclave_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,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 @@ -237,7 +237,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 go/enclave/container/cli_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func getFlagUsageMap() map[string]string {
addressName: "The address on which to serve the Obscuro enclave service",
nodeTypeName: "The node's type (e.g. sequencer, validator)",
l1ChainIDName: "An integer representing the unique chain id of the Ethereum chain used as an L1 (default 1337)",
obscuroChainIDName: "An integer representing the unique chain id of the Obscuro chain (default 777)",
obscuroChainIDName: "An integer representing the unique chain id of the Obscuro chain (default 443)",
willAttestName: "Whether the enclave will produce a verified attestation report",
validateL1BlocksName: "Whether to validate incoming blocks using the hardcoded L1 genesis.json config",
ManagementContractAddressName: "The management contract address on the L1",
Expand Down
2 changes: 1 addition & 1 deletion go/enclave/container/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ hostAddress = "127.0.0.1:10000"
address = "127.0.0.1:11000"
nodeType = "sequencer"
l1ChainID = 1377
obscuroChainID = 777
obscuroChainID = 443
willAttest = false
validateL1Blocks = false
managementContractAddress = "0x0000000000000000000000000000000000000000"
Expand Down
2 changes: 1 addition & 1 deletion go/host/container/cli_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func getFlagUsageMap() map[string]string {
logPathName: "The path to use for the host's log file",
privateKeyName: "The private key for the L1 host account",
l1ChainIDName: "An integer representing the unique chain id of the Ethereum chain used as an L1 (default 1337)",
obscuroChainIDName: "An integer representing the unique chain id of the Obscuro chain (default 777)",
obscuroChainIDName: "An integer representing the unique chain id of the Obscuro chain (default 443)",
profilerEnabledName: "Runs a profiler instance (Defaults to false)",
l1StartHashName: "The L1 block hash where the management contract was deployed",
sequencerIDName: "The ID of the sequencer",
Expand Down
2 changes: 1 addition & 1 deletion go/host/container/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ LogLevel = 3
LogPath = ""
PrivateKeyString = "0000000000000000000000000000000000000000000000000000000000000001"
L1ChainID = 1337
ObscuroChainID = 777
ObscuroChainID = 443
ProfilerEnabled = false
DebugNamespaceEnabled = false
BatchInterval = "1.0s"
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
8 changes: 4 additions & 4 deletions tools/walletextension/api/staticOG/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,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 Down Expand Up @@ -40,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

0 comments on commit cb61ace

Please sign in to comment.