Skip to content

Commit

Permalink
feat: prepare for mainnet process
Browse files Browse the repository at this point in the history
  • Loading branch information
kunstmusik committed Feb 20, 2025
1 parent 25cde06 commit 679522b
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 38 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.1.0] - 2025-02-20

### Changed

- Application configured for mainnet process
- Featured Domains
- Updated for metalinks and arlink
- Replaced ar-io.dev with ar.io gateway
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"dependencies": {
"@ant-design/icons": "5.4.0",
"@ar.io/sdk": "^3.6.0-alpha.6",
"@ar.io/sdk": "^3.7.1-alpha.1",
"@permaweb/aoconnect": "^0.0.59",
"@radix-ui/react-radio-group": "^1.2.1",
"@radix-ui/react-select": "^2.1.4",
Expand Down
14 changes: 14 additions & 0 deletions src/components/devtools/ArNSRegistrySettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { useGlobalState } from '@src/state/contexts/GlobalState';
import { useWalletState } from '@src/state/contexts/WalletState';
import { VALIDATION_INPUT_TYPES } from '@src/types';
import { isArweaveTransactionID } from '@src/utils';
import { ARIO_MAINNET_PROCESS_ID } from '@src/utils/constants';
import { Collapse, Space } from 'antd';
import Arweave from 'arweave';
import { useEffect, useState } from 'react';
Expand Down Expand Up @@ -113,6 +114,19 @@ function ArNSRegistrySettings() {
>
testnet
</button>

<button
className={
'center ' +
(arioProcessId?.toString() === ARIO_MAINNET_PROCESS_ID
? 'button-primary'
: 'button-secondary')
}
style={{ padding: '4px' }}
onClick={() => confirmSetting(ARIO_MAINNET_PROCESS_ID)}
>
mainnet
</button>
<button
className="outline-button center"
style={{
Expand Down
22 changes: 17 additions & 5 deletions src/components/pages/Settings/ArNSSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { ArweaveTransactionID } from '@src/services/arweave/ArweaveTransactionID
import { SimpleArweaveDataProvider } from '@src/services/arweave/SimpleArweaveDataProvider';
import { useGlobalState, useWalletState } from '@src/state';
import { isArweaveTransactionID } from '@src/utils';
import { ARIO_PROCESS_ID } from '@src/utils/constants';
import { ARIO_MAINNET_PROCESS_ID, ARIO_PROCESS_ID } from '@src/utils/constants';
import { Input } from 'antd';
import Arweave from 'arweave';
import { RotateCcw } from 'lucide-react';
Expand Down Expand Up @@ -105,6 +105,17 @@ function ArNSSettings() {
className="flex flex-row max-w-fit text-sm"
style={{ gap: '10px' }}
>
<button
className={
(arioProcessId == ARIO_DEVNET_PROCESS_ID
? 'bg-primary text-black'
: ' bg-dark-grey text-light-grey') +
` flex px-3 py-2 rounded hover:bg-primary-thin hover:text-primary transition-all`
}
onClick={() => confirmSetting(ARIO_DEVNET_PROCESS_ID)}
>
Devnet
</button>
<button
className={
(arioProcessId == ARIO_TESTNET_PROCESS_ID
Expand All @@ -116,16 +127,17 @@ function ArNSSettings() {
>
Testnet
</button>

<button
className={
(arioProcessId == ARIO_DEVNET_PROCESS_ID
(arioProcessId == ARIO_MAINNET_PROCESS_ID
? 'bg-primary text-black'
: ' bg-dark-grey text-light-grey') +
` flex px-3 py-2 rounded hover:bg-primary-thin hover:text-primary transition-all`
` flex px-3 py-2 rounded hover:bg-primary-thin hover:text-primary transition-all`
}
onClick={() => confirmSetting(ARIO_DEVNET_PROCESS_ID)}
onClick={() => confirmSetting(ARIO_MAINNET_PROCESS_ID)}
>
Devnet
Mainnet
</button>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,7 @@ export const PERMANENT_DOMAIN_MESSAGE = 'Indefinite';

export const METAMASK_URL = 'https://metamask.io/';
export const ANT_CHANGELOG = antChangelog;

// TODO: Replace with final mainnet process ID from SDK
export const ARIO_MAINNET_PROCESS_ID =
'PklI5-ORsL310QNAwh-LMcFycFxPkJ67MmoriUCaL3I';
39 changes: 7 additions & 32 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@
plimit-lit "^3.0.1"
warp-contracts "1.4.45"

"@ar.io/sdk@^3.6.0-alpha.6":
version "3.6.0-alpha.6"
resolved "https://registry.yarnpkg.com/@ar.io/sdk/-/sdk-3.6.0-alpha.6.tgz#0621e58d257358631dee68a4d446dbeb8a693774"
integrity sha512-d9j5fMJR0YcZM99jZHIUXgodPoskSi/07qNDerbQu2tNpq/TMQYHvJFPCTCOt/DUDQs31go4974bBgy9p+ZaEA==
"@ar.io/sdk@^3.7.1-alpha.1":
version "3.7.1"
resolved "https://registry.yarnpkg.com/@ar.io/sdk/-/sdk-3.7.1.tgz#87e83aff3c545b1c956f9b7810154a1404c37b88"
integrity sha512-q1/j3cGdFpYJnx0DcKmEbFnUtuLI12UHK+ZfvrlGugt0gwdlVUj/sbl+3CDhgbV3C0/GqmWf61gNkGovfFADXQ==
dependencies:
"@dha-team/arbundles" "^1.0.1"
"@permaweb/aoconnect" "^0.0.57"
Expand Down Expand Up @@ -13533,16 +13533,7 @@ string-length@^4.0.1:
char-regex "^1.0.2"
strip-ansi "^6.0.0"

"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -13636,14 +13627,7 @@ string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -14938,7 +14922,7 @@ word-wrap@^1.2.5:
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34"
integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -14956,15 +14940,6 @@ wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.0.1, wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down

0 comments on commit 679522b

Please sign in to comment.