Files
self/sdk/core/scripts/copyAbi.sh
Nesopie 72a7f8177d Fix/sdk (#652)
* fix: sdk build configs

* chore: SelfBackendVerifier (WIP)

* feat: add custom verification

* feat: consider destination chain in user defined data

* chore: export attestation id

* chore: export attestation id

* chore: export config storage

* chore: don't throw an error if the proof is not valid

* chore: trim abi and rm typechain types

* refactor

* chore: rm unnecessary exports

* 📝 Add docstrings to `fix/sdk` (#653)

Docstrings generation was requested by @remicolin.

* https://github.com/selfxyz/self/pull/652#issuecomment-2992046545

The following files were modified:

* `sdk/core/src/utils/hash.ts`
* `sdk/core/src/utils/proof.ts`
* `sdk/core/src/utils/utils.ts`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* review fixes

* chore: fix package.json cjs types

* chore: add minor changes to checks

* feat: add InMemoryConfigStore, allIds constant and verificationResult type

* chore: export Verification config

* feat: change the verification config types

* fix: throw issues early if verification config is null

* fix: update yarn.lock file

* chore: lint

* fix: rm ts expect error directive

* fix: contract tests

* use excluded countries instead forbidden countries list

* chore: change types in constnats

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-06-23 14:25:36 +02:00

39 lines
1.2 KiB
Bash

#!/bin/bash
set -e
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DEST_DIR="$SCRIPT_DIR/../src/abi"
mkdir -p "$DEST_DIR"
SOURCE_REGISTRY="$SCRIPT_DIR/../../../contracts/artifacts/contracts/registry/IdentityRegistryImplV1.sol/IdentityRegistryImplV1.json"
SOURCE_VERIFYALL="$SCRIPT_DIR/../../../contracts/artifacts/contracts/sdk/VerifyAll.sol/VerifyAll.json"
if [ ! -f "$SOURCE_REGISTRY" ]; then
echo "Source JSON file does not exist: $SOURCE_REGISTRY"
exit 1
fi
if [ ! -f "$SOURCE_VERIFYALL" ]; then
echo "Source JSON file does not exist: $SOURCE_VERIFYALL"
exit 1
fi
ABI_JSON_REGISTRY=$(jq '.abi' "$SOURCE_REGISTRY")
ABI_JSON_VERIFYALL=$(jq '.abi' "$SOURCE_VERIFYALL")
OUTPUT_REGISTRY="export const registryAbi = ${ABI_JSON_REGISTRY};"
OUTPUT_VERIFYALL="export const verifyAllAbi = ${ABI_JSON_VERIFYALL};"
DEST_REGISTRY_TS="$DEST_DIR/IdentityRegistryImplV1.ts"
DEST_VERIFYALL_TS="$DEST_DIR/VerifyAll.ts"
echo "$OUTPUT_REGISTRY" > "$DEST_REGISTRY_TS"
echo "Written ABI for IdentityRegistryImplV1 to: $DEST_REGISTRY_TS"
echo "$OUTPUT_VERIFYALL" > "$DEST_VERIFYALL_TS"
echo "Written ABI for VerifyAll to: $DEST_VERIFYALL_TS"
echo "ABI files copied and written successfully."