Skip to content

Commit f389ed8

Browse files
authored
Merge pull request #22 from flare-foundation/upgrade-fixes
fixes after upgrade
2 parents 7694c6e + 383f14d commit f389ed8

File tree

15 files changed

+56
-39
lines changed

15 files changed

+56
-39
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ rosetta-data
1919
data
2020
.vscode*
2121
__debug_bin*
22-
build_docker.sh
22+
build_docker.sh
23+
.idea

server/constants/network.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,9 @@ package constants
22

33
import (
44
"github.com/ava-labs/avalanchego/utils/constants"
5-
"github.com/ava-labs/coreth/params"
65
)
76

87
const (
9-
MainnetChainID = 43114
10-
MainnetAssetID = "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z"
118
MainnetNetwork = constants.MainnetName
12-
13-
FujiChainID = 43113
14-
FujiAssetID = "U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK"
15-
FujiNetwork = constants.FujiName
16-
)
17-
18-
var (
19-
MainnetAP5Activation = *params.AvalancheMainnetChainConfig.ApricotPhase5BlockTimestamp
20-
FujiAP5Activation = *params.AvalancheFujiChainConfig.ApricotPhase5BlockTimestamp
9+
TestnetNetwork = constants.TestnetName
2110
)

server/mapper/helper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ func EqualFoldContains(arr []string, str string) bool {
3232
func GetHRP(networkIdentifier *types.NetworkIdentifier) (string, error) {
3333
var hrp string
3434
switch strings.ToLower(networkIdentifier.Network) {
35-
case rosConst.FujiNetwork:
36-
hrp = constants.GetHRP(constants.FujiID)
35+
case rosConst.TestnetNetwork:
36+
hrp = constants.GetHRP(constants.TestnetID)
3737
case rosConst.MainnetNetwork:
3838
hrp = constants.GetHRP(constants.MainnetID)
3939
default:

server/mapper/transaction_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ func TestCrossChainImportedInputs(t *testing.T) {
256256
tx = &evm.Tx{}
257257

258258
networkIdentifier = &types.NetworkIdentifier{
259-
Network: constants.FujiNetwork,
259+
Network: constants.TestnetNetwork,
260260
}
261261
chainIDToAliasMapping = map[ids.ID]constants.ChainIDAlias{
262262
ids.Empty: constants.PChain,
@@ -309,7 +309,7 @@ func TestCrossChainExportedOuts(t *testing.T) {
309309
tx = &evm.Tx{}
310310

311311
networkIdentifier = &types.NetworkIdentifier{
312-
Network: constants.FujiNetwork,
312+
Network: constants.TestnetNetwork,
313313
}
314314
chainIDToAliasMapping = map[ids.ID]constants.ChainIDAlias{
315315
ids.Empty: constants.PChain,

server/rosetta-cli-conf/costwo/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
},
2525
"prefunded_accounts": [
2626
{
27-
"privkey": "",
27+
"privkey": "private-key-for-that-address",
2828
"account_identifier": {
29-
"address": "0xcb00566863A90DBa5fE56e9a7e4Cf310c24e6506"
29+
"address": "public-address-prefunded-with-faucet"
3030
},
3131
"curve_type": "secp256k1",
3232
"currency": {

server/rosetta-cli-conf/costwo/costwo.ros

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ transfer(10){
5555
// Set the recipient_amount as some value <= sender.balance-max_fee
5656
max_fee = "4725000000000000"; // 0.004725 FLR
5757
available_amount = {{sender.balance.value}} - {{max_fee}};
58-
recipient_amount = random_number({"minimum": "1", "maximum": {{available_amount}}});
58+
recipient_amount = random_number({"minimum": "1", "maximum": "10000"});
5959
print_message({"recipient_amount":{{recipient_amount}}});
6060

6161
// Find recipient and construct operations

server/rosetta-cli-conf/costwo/server-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"mode": "online",
3-
"rpc_endpoint": "http://127.0.0.1:9650",
3+
"rpc_base_url": "http://127.0.0.1:9650",
44
"network_name": "testnet",
55
"genesis_block_hash": "0xc47d9c5d19d9cde5316780d1b0896ce2f20a0bc09c9ce2c86fbfafc0742b1e63",
66
"chain_id": 114

server/rosetta-cli-conf/flare/exempt_accounts.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,32 @@
5252
"symbol": "FLR",
5353
"decimals": 18
5454
}
55+
},
56+
{
57+
"account_identifier": {
58+
"address": "0xbe653C54DF337F13Fcb726101388F4a4803049F3"
59+
},
60+
"currency": {
61+
"symbol": "FLR",
62+
"decimals": 18
63+
}
64+
},
65+
{
66+
"account_identifier": {
67+
"address": "0xF09fc2658270ac5494fa365dc5e29E0a2c636413"
68+
},
69+
"currency": {
70+
"symbol": "FLR",
71+
"decimals": 18
72+
}
73+
},
74+
{
75+
"account_identifier": {
76+
"address": "0xbe653C54DF337F13Fcb726101388F4a4803049F3"
77+
},
78+
"currency": {
79+
"symbol": "FLR",
80+
"decimals": 18
81+
}
5582
}
5683
]

server/rosetta-cli-conf/flare/server-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"mode": "online",
3-
"rpc_endpoint": "http://127.0.0.1:9650",
3+
"rpc_base_url": "http://127.0.0.1:9650",
44
"network_name": "mainnet",
55
"genesis_block_hash": "0xf501834f1cfce08939acb0feadb11ca0a94d806c5bedb6700a771fc27d2f1068",
66
"chain_id": 14

server/service/backend/cchainatomictx/backend_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
func TestShouldHandleRequest(t *testing.T) {
1818
cChainNetworkIdentifier := &types.NetworkIdentifier{
1919
Blockchain: service.BlockchainName,
20-
Network: constants.FujiNetwork,
20+
Network: constants.TestnetNetwork,
2121
}
2222

2323
bech32AccountIdentifier := &types.AccountIdentifier{Address: "C-avax1us3us4s4mv0g85vxjm8va04ewdl27wcwnqwejf"}

0 commit comments

Comments
 (0)