enum CoverType { SMART_PROTOCOL_FAILURE, STABLECOIN_DEVALUATION, CUSTODIAN_FAILURE, RUGPULL_LIQUIDITY_SCAM }
enum CurrencyType { USDT, DAI, USDC }
enum InsuredSumRule { PARTIAL, FULL }
// enum ChainType { NON_EVM , EVM }
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module slice | |
| func InterfaceSlice(slice interface{}) []interface{} { | |
| switch slice := slice.(type) { | |
| case []string: | |
| new := make([]interface{}, len(slice)) | |
| for i, v := range slice { | |
| new[i] = v | |
| } | |
| return new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let decimals = 4; | |
| const regexpDecimals = new RegExp(`^\\d*\\.{0,1}\\d{0,${decimals}}$`); | |
| const SignupSchema = Yup.object().shape({ | |
| decimal: Yup.number().test( | |
| 'is-decimal', | |
| 'too many decimals', | |
| value => (value + "").match(regexpDecimals), | |
| ), | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // See: https://github.com/maticnetwork/matic.js/blob/master/examples/POS-client/config.js | |
| const posRootChainManager = '0xBbD7cBFA79faee899Eaf900F13C9065bF03B1A74'; | |
| const posERC20Predicate = '0xdD6596F2029e6233DEFfaCa316e6A95217d4Dc34'; | |
| const accounts = useAccounts(); | |
| const userAddress = accounts?.[0] | |
| const rootDaiContract = useContractContext(DAIDummyContext, 0); | |
| const { send: approve } = useContractFunc(rootDaiContract, "approve"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const path = require('path') | |
| const { readFileSync } = require('fs') | |
| const schemaString = readFileSync(`${__dirname}/data/schema.graphql`, 'utf8') | |
| module.exports = { | |
| root: true, | |
| plugins: [ | |
| // 'jest', | |
| '@typescript-eslint', |
# Install pgp
brew install gnupg
# Write out the hashicorp public pgp key
cat <<EOF > hashicorp.asc
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFMORM0BCADBRyKO1MhCirazOSVwcfTr1xUxjPvfxD3hjUwHtjsOy/bT6p9f
W2mRPfwnq2JB5As+paL3UGDsSRDnK9KAxQb0NNF4+eVhr/EJ18s3wwXXDMjpIifq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const bucketName = ""; | |
| const bucketEnpoint = ""; | |
| const s3 = new AWS.S3({ | |
| params: { Bucket: bucketName }, | |
| endpoint: bucketEndpoint, | |
| s3BucketEndpoint: true, | |
| // s3DisableBodySigning: false, | |
| computeChecksums: true, | |
| correctClockSkew: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react' | |
| import { Switch, Route } from 'react-router-dom' | |
| import { Amplify } from '@aws-amplify/core' | |
| import { amplifyConfig } from './config' | |
| import { AllContextProvider } from './context' | |
| import { |