Skip to content

Commit cd8c123

Browse files
chore(scripts): update 3-chars price (#1032)
* chore(scripts): update 3-chars price * update tos * update test * update example * missed one * mainnet prebuilt test * fix test
1 parent 0beef1b commit cd8c123

File tree

5 files changed

+24
-14
lines changed

5 files changed

+24
-14
lines changed

dapp/src/legal/tos.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Name subscriptions may be purchased for a fee by connecting your wallet and comp
2222

2323
All **.iota** names are issued as time-limited subscriptions rather than permanent ownership. The fee structure is based on the length of the name:
2424

25-
- **3-character names**: 500 IOTA/year
25+
- **3-character names**: 1500 IOTA/year
2626
- **4-character names**: 250 IOTA/year
2727
- **5-character names**: 50 IOTA/year
2828

documentation/pages/developer/sdk/querying.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ console.log(priceList);
3636
// ([name_length_from, name_length_to]: price. Prices are in NANOS; 1 IOTA = 1_000_000_000 NANOS)
3737
// Example output:
3838
// {
39-
// [ 3, 3 ] => 500000000000,
39+
// [ 3, 3 ] => 1500000000000,
4040
// [ 4, 4 ] => 250000000000,
4141
// [ 5, 63 ] => 50000000000
4242
// }
@@ -53,7 +53,7 @@ console.log(renewalPriceList);
5353
// ([name_length_from, name_length_to]: price. Prices are in NANOS; 1 IOTA = 1_000_000_000 NANOS)
5454
// Example output:
5555
// {
56-
// [ 3, 3 ] => 500000000000,
56+
// [ 3, 3 ] => 1500000000000,
5757
// [ 4, 4 ] => 250000000000,
5858
// [ 5, 63 ] => 50000000000
5959
// }

scripts/init/packages.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export const Packages = (network: string) => {
104104
[5, 63],
105105
],
106106
prices: [
107-
500 * Number(NANOS_PER_IOTA),
107+
1500 * Number(NANOS_PER_IOTA),
108108
250 * Number(NANOS_PER_IOTA),
109109
50 * Number(NANOS_PER_IOTA),
110110
],
@@ -126,7 +126,7 @@ export const Packages = (network: string) => {
126126
[5, 63],
127127
],
128128
prices: [
129-
500 * Number(NANOS_PER_IOTA),
129+
1500 * Number(NANOS_PER_IOTA),
130130
250 * Number(NANOS_PER_IOTA),
131131
50 * Number(NANOS_PER_IOTA),
132132
],

sdk/test/localnet.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { PackageInfo } from '../src/types';
1818
import { getClient, getGraphQLClient, setupIotaClient, TestToolbox } from './toolbox';
1919

2020
const LOCALNET_PRICING = {
21-
THREE_LETTER: { registration: 500, renewal: 500 },
21+
THREE_LETTER: { registration: 1500, renewal: 1500 },
2222
FOUR_LETTER: { registration: 250, renewal: 250 },
2323
FIVE_PLUS_LETTER: { registration: 50, renewal: 50 },
2424
} as const;
@@ -60,16 +60,16 @@ export const e2eLocalnetDryRunFlow = async (toolbox: TestToolbox) => {
6060
const renewalPriceList = await iotaNamesClient.getRenewalPriceList();
6161

6262
// Expected lists for localnet - these match the configuration in scripts/init/packages.ts
63-
// From packages.ts lines 104-108: [500, 250, 50] * NANOS_PER_IOTA
63+
// From packages.ts lines 104-108: [1500, 250, 50] * NANOS_PER_IOTA
6464
const expectedPriceList = new Map([
65-
[[3, 3], 500 * Number(NANOS_PER_IOTA)], // 500000000000 nanos (500 IOTA)
65+
[[3, 3], 1500 * Number(NANOS_PER_IOTA)], // 1500000000000 nanos (1500 IOTA)
6666
[[4, 4], 250 * Number(NANOS_PER_IOTA)], // 250000000000 nanos (250 IOTA)
6767
[[5, 63], 50 * Number(NANOS_PER_IOTA)], // 50000000000 nanos (50 IOTA)
6868
]);
6969

70-
// From packages.ts lines 126-130: [500, 250, 50] * NANOS_PER_IOTA
70+
// From packages.ts lines 126-130: [1500, 250, 50] * NANOS_PER_IOTA
7171
const expectedRenewalPriceList = new Map([
72-
[[3, 3], 500 * Number(NANOS_PER_IOTA)], // 500000000000 nanos (500 IOTA)
72+
[[3, 3], 1500 * Number(NANOS_PER_IOTA)], // 1500000000000 nanos (1500 IOTA)
7373
[[4, 4], 250 * Number(NANOS_PER_IOTA)], // 250000000000 nanos (250 IOTA)
7474
[[5, 63], 50 * Number(NANOS_PER_IOTA)], // 50000000000 nanos (50 IOTA)
7575
]);

sdk/test/pre-built.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,13 @@ export const e2eLiveNetworkDryRunFlow = async (network_id: Network) => {
3636

3737
// Expected lists
3838
let expectedPriceList;
39-
// TODO: Mainnet
40-
if (network.id === Network.Testnet) {
39+
if (network.id === Network.Mainnet) {
40+
expectedPriceList = new Map([
41+
[[3, 3], 1500000000000],
42+
[[4, 4], 250000000000],
43+
[[5, 63], 50000000000],
44+
]);
45+
} else if (network.id === Network.Testnet) {
4146
expectedPriceList = new Map([
4247
[[3, 3], 500000000000],
4348
[[4, 4], 250000000000],
@@ -52,8 +57,13 @@ export const e2eLiveNetworkDryRunFlow = async (network_id: Network) => {
5257
}
5358

5459
let expectedRenewalPriceList;
55-
// TODO: Mainnet
56-
if (network.id === Network.Testnet) {
60+
if (network.id === Network.Mainnet) {
61+
expectedRenewalPriceList = new Map([
62+
[[3, 3], 1500000000000],
63+
[[4, 4], 250000000000],
64+
[[5, 63], 50000000000],
65+
]);
66+
} else if (network.id === Network.Testnet) {
5767
expectedRenewalPriceList = new Map([
5868
[[3, 3], 500000000000],
5969
[[4, 4], 250000000000],

0 commit comments

Comments
 (0)