Skip to content

Instantly share code, notes, and snippets.

@1a35e1
1a35e1 / fetchSubscriberState.ts
Last active January 26, 2024 12:28
withFabric, STPv1 - fetchSubscriberState EthersJS
/**
* Source: https://github.com/withfabricxyz/protocol-sdks/blob/main/src/stpv1/subscription.ts
*/
// From https://docs.withfabric.xyz/stp/contracts/STPV1ABI
import stpV1ABI from './stpv1.json'
// Typedef for reference
type SubscriberState = {
/** The address of the account */
@1a35e1
1a35e1 / truncate-sns-endpoints.sh
Created November 14, 2023 21:25
Quickly truncate endpoints from an SNS application
# This is destructive. Please think before executing.
SOME_ARN="your-arn-here"
aws sns list-endpoints-by-platform-application --platform-application-arn $SOME_ARN | \
jq -r '.Endpoints[].EndpointArn' | \
xargs -I {} aws sns delete-endpoint --endpoint-arn {}