diff --git a/.github/workflows/mainnet.yml b/.github/workflows/mainnet.yml index 852fd57f1..f04ab29ff 100644 --- a/.github/workflows/mainnet.yml +++ b/.github/workflows/mainnet.yml @@ -7,7 +7,7 @@ on: # TODO: Use variables when GH supports it for forks. See https://github.com/orgs/community/discussions/44322 env: - RPC_PROVIDER_URL: "https://rpc-mainnet.maticvigil.com" + RPC_PROVIDER_URL: 'https://polygon.llamarpc.com' ENCRYPTOR_PRIVATE_KEY: ${{ secrets.MAINNET_ENCRYPTOR_PRIVATE_KEY }} CONSUMER_PRIVATE_KEY: ${{ secrets.MAINNET_CONSUMER_PRIVATE_KEY }} RITUAL_ID: "9" diff --git a/packages/taco/examples/encrypt-decrypt.ts b/packages/taco/examples/encrypt-decrypt.ts index cfa835025..c7e2b99df 100644 --- a/packages/taco/examples/encrypt-decrypt.ts +++ b/packages/taco/examples/encrypt-decrypt.ts @@ -1,6 +1,6 @@ +import { ChainId } from '@nucypher/shared'; import { ethers } from 'ethers'; -import { ChainId } from '@nucypher/shared'; import { conditions, decrypt, @@ -8,6 +8,7 @@ import { encrypt, getPorterUri, initialize, + isAuthorized, ThresholdMessageKit, toBytes, } from '../src'; @@ -35,6 +36,17 @@ const run = async () => { ritualId, web3Provider.getSigner(), ); + + // Calling it after the encryption because we need material from messageKit + const isEncryptorAuthenticated = await isAuthorized( + web3Provider, + domains.TESTNET, + messageKit, + ritualId, + ); + if (!isEncryptorAuthenticated) { + throw new Error('Not authorized'); + } return messageKit; };