From 4b28ebb3185c5f2bc3ca64fac19d579beed066eb Mon Sep 17 00:00:00 2001 From: Deniz Mert Edincik Date: Wed, 27 Mar 2024 22:04:56 +0100 Subject: [PATCH] add previewnet --- cadence/contracts/AddressUtils.cdc | 3 ++- test/AddressUtils_test.cdc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cadence/contracts/AddressUtils.cdc b/cadence/contracts/AddressUtils.cdc index 6272f6b..add46be 100644 --- a/cadence/contracts/AddressUtils.cdc +++ b/cadence/contracts/AddressUtils.cdc @@ -61,7 +61,8 @@ pub contract AddressUtils { let codeWords: {String: UInt64} = { "MAINNET" : 0, "TESTNET" : 0x6834ba37b3980209, - "EMULATOR": 0x1cb159857af02018 + "EMULATOR": 0x1cb159857af02018, + "PREVIEWNET": 0x5211829e88528817 } let parityCheckMatrixColumns: [UInt64] = [ diff --git a/test/AddressUtils_test.cdc b/test/AddressUtils_test.cdc index 486dc22..fb2cf66 100644 --- a/test/AddressUtils_test.cdc +++ b/test/AddressUtils_test.cdc @@ -99,9 +99,10 @@ fun testIsValidAddress() { let mainnet = AddressUtils.isValidAddress("0xa340dc0a4ec828ab", forNetwork: "MAINNET") let testnet = AddressUtils.isValidAddress("0x31ad40c07a2a9788", forNetwork: "TESTNET") let emulator = AddressUtils.isValidAddress("0xf8d6e0586b0a20c7", forNetwork: "EMULATOR") + let previewnet = AddressUtils.isValidAddress("0x30a71a4767f0e14f", forNetwork: "PREVIEWNET") // Assert - Test.assert(mainnet && testnet && emulator) + Test.assert(mainnet && testnet && emulator && previewnet) // Act var valid = AddressUtils.isValidAddress(1452, forNetwork: "EMULATOR")