Skip to content
Merged
Changes from 1 commit
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
Next Next commit
extract NEON_CHAIN_ID from elf symbols
  • Loading branch information
ivanl committed Nov 4, 2021
commit f8c6c39dea5aab1148130005e6d519afe7af25da
9 changes: 6 additions & 3 deletions proxy/plugin/solana_rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
modelInstanceLock = threading.Lock()
modelInstance = None

chainId = os.environ.get("NEON_CHAIN_ID", "0x6e") # default value 110
EXTRA_GAS = int(os.environ.get("EXTRA_GAS", "0"))

class PermanentAccounts:
Expand Down Expand Up @@ -107,10 +106,14 @@ def web3_clientVersion(self):
return self.neon_config_dict['web3_clientVersion']

def eth_chainId(self):
return chainId
neon_config_load(self)
# NEON_CHAIN_ID is a string in decimal form
return hex(int(self.neon_config_dict['NEON_CHAIN_ID']))

def net_version(self):
return str(int(chainId,base=16))
neon_config_load(self)
# NEON_CHAIN_ID is a string in decimal form
return self.neon_config_dict['NEON_CHAIN_ID']

def eth_gasPrice(self):
return hex(MINIMAL_GAS_PRICE)
Expand Down