diff --git a/.github/workflows/nova-build-temp.yaml b/.github/workflows/nova-build-temp.yaml index b8edfc8d7..530821290 100644 --- a/.github/workflows/nova-build-temp.yaml +++ b/.github/workflows/nova-build-temp.yaml @@ -6,7 +6,7 @@ on: TARGET_COMMIT: description: "Target Commit Hash for the SDK" required: false - default: "7e2b3547851280a310735861241ab3e0d239aa5a" + default: "5d8c3042c87fbde300269f55da90dd4d8c60f2f1" environment: type: choice description: "Select the environment to deploy to" diff --git a/api/package-lock.json b/api/package-lock.json index ed8c32e9f..659028f1c 100644 --- a/api/package-lock.json +++ b/api/package-lock.json @@ -67,7 +67,7 @@ }, "../iota-sdk/bindings/nodejs": { "name": "@iota/sdk-nova", - "version": "1.1.6", + "version": "2.0.0-alpha.1", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { diff --git a/client/package-lock.json b/client/package-lock.json index 45a7a6b82..699b7f3a1 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -100,7 +100,7 @@ }, "../iota-sdk/bindings/wasm": { "name": "@iota/sdk-wasm-nova", - "version": "1.1.3", + "version": "2.0.0-alpha.1", "license": "Apache-2.0", "dependencies": { "class-transformer": "^0.5.1", diff --git a/client/src/app/routes/nova/Block.tsx b/client/src/app/routes/nova/Block.tsx index 6bd6c3366..6ccdf0986 100644 --- a/client/src/app/routes/nova/Block.tsx +++ b/client/src/app/routes/nova/Block.tsx @@ -40,7 +40,7 @@ const Block: React.FC> = ({ params: { network, blockId }, }, }) => { - const { tokenInfo, bech32Hrp } = useNetworkInfoNova((s) => s.networkInfo); + const { tokenInfo, bech32Hrp, protocolInfo } = useNetworkInfoNova((s) => s.networkInfo); const [isFormattedBalance, setIsFormattedBalance] = useState(true); const [block, isLoading, blockError] = useBlock(network, blockId); const [blockMetadata] = useBlockMetadata(network, blockId); @@ -49,6 +49,7 @@ const Block: React.FC> = ({ const [transactionId, setTransactionId] = useState(null); const { transactionMetadata } = useTransactionMetadata(network, transactionId); const [pageTitle, setPageTitle] = useState("Block"); + let blockCost: number | null = null; function updatePageTitle(type: PayloadType | undefined): void { let title = null; @@ -97,6 +98,10 @@ const Block: React.FC> = ({ transferTotal={transferTotal ?? undefined} />, ); + + if (protocolInfo?.parameters?.workScoreParameters) { + blockCost = Utils.blockWorkScore(block, protocolInfo?.parameters.workScoreParameters); + } } if (transactionMetadata) { @@ -137,6 +142,12 @@ const Block: React.FC> = ({
Issuing Time
{DateHelper.formatShort(Number(block.header.issuingTime) / 1000000)}
+ {blockCost !== null && ( +
+
Block cost
+
{formatAmount(blockCost, tokenInfo, true)}
+
+ )}
Slot Commitment
diff --git a/setup_nova.sh b/setup_nova.sh index c33b3ced5..98c3f9285 100755 --- a/setup_nova.sh +++ b/setup_nova.sh @@ -1,6 +1,6 @@ #!/bin/bash SDK_DIR="iota-sdk" -TARGET_COMMIT="7e2b3547851280a310735861241ab3e0d239aa5a" +TARGET_COMMIT="5d8c3042c87fbde300269f55da90dd4d8c60f2f1" if [ ! -d "$SDK_DIR" ]; then git clone -b 2.0 git@github.com:iotaledger/iota-sdk.git