From ed5595a177d4fc8ebf4e1aefa234b01b482447ae 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 cb81d1fa..b234b925 100644 --- a/clients/go/compat.go +++ b/clients/go/compat.go @@ -48,6 +48,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. @@ -59,6 +65,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(),