Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'CHANGELOG entry secretary'
on:
pull_request:
branches: [main, development]
# The specific activity types are listed here to include "labeled" and "unlabeled"
# (which are not included by default for the "pull_request" trigger).
# This is needed to allow skipping enforcement of the changelog in PRs with specific labels,
# as defined in the (optional) "skipLabels" property.
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

jobs:
# Enforces the update of a changelog file on every pull request
changelog:
runs-on: ubuntu-latest
steps:
- uses: dangoslen/changelog-enforcer@v3
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [[0.0.6-beta.0]](https://github.com/multiversx/mx-sdk-dapp-sc-explorer/pull/34)] - 2025-10-16

- [Update @multiversx Packages](https://github.com/multiversx/mx-sdk-dapp-sc-explorer/pull/33)

## [[0.0.5-beta.0]](https://github.com/multiversx/mx-sdk-dapp-sc-explorer/pull/32)] - 2025-08-12

- [Migrate to @multiversx/sdk-core v15](https://github.com/multiversx/mx-sdk-dapp-sc-explorer/pull/31)
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-dapp-sc-explorer",
"version": "0.0.5-beta.0",
"version": "0.0.6-beta.0",
"description": "A library to hold the main logic for Smart Contract Interactions on the MultiversX blockchain",
"author": "MultiversX",
"license": "GPL-3.0-or-later",
Expand Down Expand Up @@ -32,7 +32,7 @@
"@types/react-syntax-highlighter": "15.5.13",
"@typescript-eslint/eslint-plugin": "8.38.0",
"@typescript-eslint/parser": "8.38.0",
"axios": "^1.11.0",
"axios": "^1.12.0",
"esbuild": "0.25.8",
"esbuild-node-externals": "1.18.0",
"esbuild-plugin-svgr": "1.0.1",
Expand Down Expand Up @@ -75,7 +75,7 @@
"peerDependencies": {
"@multiversx/sdk-core": "^15.x",
"@multiversx/sdk-dapp": "^5.x",
"axios": "^1.11.0",
"axios": "^1.12.0",
"react": ">=18",
"react-dom": ">=18"
},
Expand All @@ -89,12 +89,11 @@
"dependencies": {
"@multiversx/sdk-dapp-form": "^3.x",
"@multiversx/sdk-dapp-ui": "^0.x",
"@multiversx/sdk-network-providers": "2.9.3",
"bignumber.js": "9.x",
"formik": "2.4.6",
"react-bootstrap": "2.8.0",
"react-dropzone": "11.5.1",
"react-syntax-highlighter": "15.6.1",
"react-syntax-highlighter": "15.6.6",
"yup": "1.2.0"
}
}
10 changes: 2 additions & 8 deletions src/components/ContractBuild/ContractBuild.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ export const ContractBuildComponent = ({
globalStyles,
styles
}: WithStylesImportType) => {
const { smartContract, support, icons, customClassNames } =
useSCExplorerContext();
const { smartContract, support, customClassNames } = useSCExplorerContext();
const { rawAbi, verifiedContract } = smartContract;
const { hasBuildInfo } = support;

const { copyIcon = faCopy } = icons ?? {};

if (!hasBuildInfo) {
return null;
}
Expand Down Expand Up @@ -86,10 +83,7 @@ export const ContractBuildComponent = ({
{rawAbi.buildInfo.rustc?.commitHash && (
<CardItem title='Commit Hash' icon={faRust}>
<MvxTrim text={rawAbi.buildInfo.rustc.commitHash} />
<MvxCopyButton
text={rawAbi.buildInfo.rustc.commitHash}
copyIcon={copyIcon}
/>
<MvxCopyButton text={rawAbi.buildInfo.rustc.commitHash} />
</CardItem>
)}
{rawAbi.buildInfo.rustc?.version && (
Expand Down
26 changes: 8 additions & 18 deletions src/components/ContractDetails/ContractDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { memo } from 'react';
import {
faAddressCard,
faArrowUpRightFromSquare,
faCopy,
faClock,
faDollarSign,
faHandshake,
Expand Down Expand Up @@ -30,22 +29,19 @@ import {
explorerUrlBuilder,
getHumanReadableTimeFormat,
MvxCopyButton,
MvxTransactionAge,
MvxTrim
MvxTrim,
timeAgo
} from 'lib';
import { ContractPropertiesEnum } from 'types';

export const ContractDetailsComponent = ({
globalStyles,
styles
}: WithStylesImportType) => {
const { smartContract, support, icons, customClassNames } =
useSCExplorerContext();
const { smartContract, support, customClassNames } = useSCExplorerContext();
const { deployedContractDetails } = smartContract;
const { hasContractDetails } = support;

const { copyIcon = faCopy } = icons ?? {};

if (!hasContractDetails) {
return null;
}
Expand Down Expand Up @@ -88,10 +84,7 @@ export const ContractDetailsComponent = ({
<CardItem title='Address' icon={faPassport}>
<ScAddressIcon initiator={deployedContractDetails.address} />
<MvxTrim text={deployedContractDetails.address} />
<MvxCopyButton
text={deployedContractDetails.address}
copyIcon={copyIcon}
/>
<MvxCopyButton text={deployedContractDetails.address} />
</CardItem>
)}
{deployedContractDetails?.assets?.name && (
Expand Down Expand Up @@ -136,10 +129,7 @@ export const ContractDetailsComponent = ({
initiator={deployedContractDetails.ownerAddress}
/>
<MvxTrim text={deployedContractDetails.ownerAddress} />
<MvxCopyButton
text={deployedContractDetails.ownerAddress}
copyIcon={copyIcon}
/>
<MvxCopyButton text={deployedContractDetails.ownerAddress} />
<ExplorerLink
page={explorerUrlBuilder.accountDetails(
deployedContractDetails.ownerAddress
Expand All @@ -153,9 +143,9 @@ export const ContractDetailsComponent = ({
icon={faClock}
className={classNames(styles?.contractDetailsWrapContainer)}
>
<MvxTransactionAge
age={String(deployedContractDetails.deployedAt)}
/>
<span>
{timeAgo(deployedContractDetails.deployedAt * 1000, true)}
</span>
&nbsp;ago &nbsp;
<span>
(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { useState } from 'react';
import { NativeSerializer } from 'lib/sdkCore';

import { EndpointForm } from 'components';
import { useSCExplorerContext } from 'contexts';
import { useQueryContract } from 'hooks';
import { NativeSerializer } from 'lib/sdkCore';
import {
ContractEndpointMutabilityEnum,
QueryContractResponse,
Expand Down
10 changes: 2 additions & 8 deletions src/components/ContractFiles/ContractFile/ContractFile.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { faFileAlt, faLink, faCopy } from '@fortawesome/free-solid-svg-icons';
import { faFileAlt } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import classNames from 'classnames';
import { Light as SyntaxHighlighter } from 'react-syntax-highlighter';
Expand All @@ -21,11 +21,7 @@ export const ContractFileComponent = (props: ContractFileUIType) => {
const { file, title, entryNumber, totalEntries, className, globalStyles } =
props;
const { path } = file;
const {
contractFileIcon = faFileAlt,
copyIcon = faCopy,
linkIcon = faLink
} = icons ?? {};
const { contractFileIcon = faFileAlt } = icons ?? {};

const fullPath = window.location.href;
const codeString = getContractFileContent(file);
Expand Down Expand Up @@ -56,12 +52,10 @@ export const ContractFileComponent = (props: ContractFileUIType) => {
<MvxCopyButton
text={codeString}
className={classNames(globalStyles?.copyButton)}
copyIcon={copyIcon}
/>
<MvxCopyButton
text={`${fullPath}#${path}`}
className={classNames(globalStyles?.linkButton)}
copyIcon={linkIcon}
/>
</div>
<SyntaxHighlighter
Expand Down
4 changes: 1 addition & 3 deletions src/components/ContractLoadAbi/ContractLoadAbi.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { memo } from 'react';
import {
faCopy,
faCircleCheck,
faCircleNotch
} from '@fortawesome/free-solid-svg-icons';
Expand Down Expand Up @@ -29,7 +28,7 @@ export const ContractLoadAbiComponent = ({
useSCExplorerContext();
const { canLoadAbi } = support;
const { rawAbi, deployedContractDetails, contractAddress } = smartContract;
const { copyIcon = faCopy, loadIcon = faCircleNotch } = icons ?? {};
const { loadIcon = faCircleNotch } = icons ?? {};

const { updateDeployedContractDetails, isContractAddressCheckLoading } =
useUpdateDeployedContractDetails();
Expand Down Expand Up @@ -219,7 +218,6 @@ export const ContractLoadAbiComponent = ({
<MvxCopyButton
text={formattedContent}
className={classNames(globalStyles?.copyButton)}
copyIcon={copyIcon}
/>
</div>
<Code
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import React from 'react';
import {
faCopy,
faPlay,
faCircleNotch
} from '@fortawesome/free-solid-svg-icons';
import { faPlay, faCircleNotch } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import classNames from 'classnames';
import { Formik, Form } from 'formik';
Expand Down Expand Up @@ -52,11 +48,7 @@ export const DeployUpgradeFileFormComponent = (
const endpointDefinition = getDefinition({ abiRegistry, isUpgrade });
const { input } = endpointDefinition ?? { input: [] };

const {
playIcon = faPlay,
loadIcon = faCircleNotch,
copyIcon = faCopy
} = icons ?? {};
const { playIcon = faPlay, loadIcon = faCircleNotch } = icons ?? {};

const initialValues: FormikAbiType = Object.fromEntries([
...input.map((input) => {
Expand Down Expand Up @@ -245,7 +237,6 @@ export const DeployUpgradeFileFormComponent = (
DeployUpgradeFileFormikFieldsEnum.wasmFileContent
].toString()}
className={classNames(globalStyles?.copyButton)}
copyIcon={copyIcon}
/>
</div>
<CodeComponent
Expand Down
9 changes: 2 additions & 7 deletions src/components/Forms/EndpointForm/EndpointForm.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import {
faCopy,
faPlay,
faCircleNotch,
faTriangleExclamation
Expand Down Expand Up @@ -40,11 +39,7 @@ export const EndpointFormComponent = (props: EndpointFormUIType) => {
const { ownerAddress } = deployedContractDetails || {};
const { input, modifiers } = endpoint;
const { mutability } = modifiers;
const {
playIcon = faPlay,
loadIcon = faCircleNotch,
copyIcon = faCopy
} = icons ?? {};
const { playIcon = faPlay, loadIcon = faCircleNotch } = icons ?? {};

const isOwnerConnected = Boolean(
callerAddress && ownerAddress && callerAddress === ownerAddress
Expand Down Expand Up @@ -185,7 +180,7 @@ export const EndpointFormComponent = (props: EndpointFormUIType) => {
className={classNames(globalStyles?.formWarningAddress)}
>
<MvxTrim text={ownerAddress} />
<MvxCopyButton text={ownerAddress} copyIcon={copyIcon} />
<MvxCopyButton text={ownerAddress} />
</div>
<span className={classNames(globalStyles?.formWarningText)}>
to call this endpoint.
Expand Down
8 changes: 1 addition & 7 deletions src/components/Forms/EndpointForm/EndpointOutput.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
import React from 'react';
import { faCopy } from '@fortawesome/free-solid-svg-icons';
import BigNumber from 'bignumber.js';
import classNames from 'classnames';

import { EndpointDefinitionList, Code } from 'components';
import { useSCExplorerContext } from 'contexts';
import { formatOutputDisplayValue } from 'helpers';
import { withStyles } from 'hocs/withStyles';
import { MvxCopyButton } from 'lib';
import { EndpointOutputUIType } from 'types';
import { formatOutputDisplayValue } from 'helpers';

export const EndpointOutputComponent = (props: EndpointOutputUIType) => {
const { output, result, globalStyles, styles } = props;
const { icons } = useSCExplorerContext();
const { copyIcon = faCopy } = icons ?? {};

if (!output || output.length === 0) {
return null;
Expand Down Expand Up @@ -62,7 +57,6 @@ export const EndpointOutputComponent = (props: EndpointOutputUIType) => {
<MvxCopyButton
text={String(output)}
className={classNames(globalStyles?.copyButton)}
copyIcon={copyIcon}
/>
</div>
{output === '' ? (
Expand Down
10 changes: 3 additions & 7 deletions src/components/LoginButton/LoginButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { faCopy, faBolt, faPowerOff } from '@fortawesome/free-solid-svg-icons';
import { faBolt, faPowerOff } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import classNames from 'classnames';

Expand All @@ -21,11 +21,7 @@ export const LoginButtonComponent = (props: LoginButtonUIType) => {

const provider = getAccountProvider();

const {
copyIcon = faCopy,
connectIcon = faBolt,
disconnectIcon = faPowerOff
} = icons ?? {};
const { connectIcon = faBolt, disconnectIcon = faPowerOff } = icons ?? {};

const loginHandler = () => {
// NOT USED. disable autologout
Expand Down Expand Up @@ -58,7 +54,7 @@ export const LoginButtonComponent = (props: LoginButtonUIType) => {
{Boolean(address && isLoggedIn) ? (
<div className={classNames(styles?.connectedWrapper)}>
<MvxTrim text={address} />
<MvxCopyButton text={address} copyIcon={copyIcon} />
<MvxCopyButton text={address} />
<button
type='button'
className={classNames(globalStyles?.button, styles?.buttonLogout)}
Expand Down
Loading