From c74ef181602af8a8dd01a5184cba59ee2c00a708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matev=C5=BE=20Jekovec?= Date: Thu, 22 Feb 2024 15:47:38 +0100 Subject: [PATCH] clients/go: Add support for Sapphire Localnet --- clients/go/compat.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clients/go/compat.go b/clients/go/compat.go index ef204b4b..bdc3c404 100644 --- a/clients/go/compat.go +++ b/clients/go/compat.go @@ -49,6 +49,12 @@ var Networks = map[uint64]NetworkParams{ DefaultGateway: "https://sapphire.oasis.io", RuntimeID: "0x000000000000000000000000000000000000000000000000f80306c9858e7279", }, + 0x5afd: { + Name: "localnet", + ChainID: *big.NewInt(0x5afd), + DefaultGateway: "http://localhost:8545", + RuntimeID: "0x8000000000000000000000000000000000000000000000000000000000000000", + }, } // PackTx prepares a regular Eth transaction for Sapphire. The transaction returned from this function is what must be signed. @@ -60,6 +66,7 @@ func PackTx(tx types.Transaction, cipher Cipher) (*types.Transaction, error) { } func packTx(tx types.Transaction, cipher Cipher) (*types.Transaction, error) { + fmt.Printf("NONCE: %d\n", tx.Nonce()) return types.NewTx(&types.LegacyTx{ Nonce: tx.Nonce(), GasPrice: tx.GasPrice(),