diff --git a/package-lock.json b/package-lock.json index 11816374..a11619c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@once-upon/evm-context", - "version": "0.0.5", + "version": "0.0.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@once-upon/evm-context", - "version": "0.0.5", + "version": "0.0.8", "license": "UNLICENSED", "dependencies": { "ethers": "^5.6.4" diff --git a/package.json b/package.json index acafb061..7dc17bf2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@once-upon/evm-context", - "version": "0.0.6", + "version": "0.0.8", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/heuristics/contractDeployment.ts b/src/heuristics/contractDeployment.ts index 1de89e81..5e935198 100644 --- a/src/heuristics/contractDeployment.ts +++ b/src/heuristics/contractDeployment.ts @@ -39,7 +39,7 @@ function generateContractDeploymentContext( variables: { deployed: { type: 'contextAction', - value: 'Deployed', + value: 'deployed', }, }, }, diff --git a/src/heuristics/erc1155Purchase.ts b/src/heuristics/erc1155Purchase.ts index 8ed275f3..27ab8c68 100644 --- a/src/heuristics/erc1155Purchase.ts +++ b/src/heuristics/erc1155Purchase.ts @@ -140,7 +140,7 @@ function generateERC1155PurchaseContext(transaction: Transaction): Transaction { variables: { bought: { type: 'contextAction', - value: 'Bought', + value: 'bought', }, }, }, diff --git a/src/heuristics/erc1155Swap.ts b/src/heuristics/erc1155Swap.ts index abd98a4f..73d77b86 100644 --- a/src/heuristics/erc1155Swap.ts +++ b/src/heuristics/erc1155Swap.ts @@ -84,7 +84,7 @@ function generateERC1155SwapContext(transaction: Transaction): Transaction { variables: { swapped: { type: 'contextAction', - value: 'Swapped', + value: 'swapped', }, }, }, diff --git a/src/heuristics/erc20Swap.ts b/src/heuristics/erc20Swap.ts index ede34b43..65f711fd 100644 --- a/src/heuristics/erc20Swap.ts +++ b/src/heuristics/erc20Swap.ts @@ -77,7 +77,7 @@ function generateERC20SwapContext(transaction: Transaction): Transaction { variables: { swapped: { type: 'contextAction', - value: 'Swapped', + value: 'swapped', }, }, }, diff --git a/src/heuristics/erc721Purchase.ts b/src/heuristics/erc721Purchase.ts index 3067be0a..c8aad16f 100644 --- a/src/heuristics/erc721Purchase.ts +++ b/src/heuristics/erc721Purchase.ts @@ -139,7 +139,7 @@ function generateERC21PurchaseContext(transaction: Transaction): Transaction { variables: { bought: { type: 'contextAction', - value: 'Bought', + value: 'bought', }, }, }, diff --git a/src/heuristics/ethTransfer.ts b/src/heuristics/ethTransfer.ts index f55d67b4..ff892a27 100644 --- a/src/heuristics/ethTransfer.ts +++ b/src/heuristics/ethTransfer.ts @@ -49,7 +49,7 @@ export function generateETHTransferContext( variables: { sent: { type: 'contextAction', - value: 'Sent', + value: 'sent', }, }, }, diff --git a/src/heuristics/idm.ts b/src/heuristics/idm.ts index f42f4bf9..adf45305 100644 --- a/src/heuristics/idm.ts +++ b/src/heuristics/idm.ts @@ -45,7 +45,7 @@ function generateIdmContext(transaction: Transaction): Transaction { variables: { sentMessage: { type: 'contextAction', - value: 'Sent message', + value: 'sent message', }, }, }, diff --git a/src/heuristics/superchainFaucet.ts b/src/heuristics/superchainFaucet.ts index a832e3ab..6b5a3ee7 100644 --- a/src/heuristics/superchainFaucet.ts +++ b/src/heuristics/superchainFaucet.ts @@ -52,7 +52,7 @@ export function generateSuperchainFaucetTransaction( variables: { received: { type: 'contextAction', - value: 'Received', + value: 'received', }, }, }, diff --git a/src/heuristics/tokenAirdrop.ts b/src/heuristics/tokenAirdrop.ts index 0c455393..e71b8936 100644 --- a/src/heuristics/tokenAirdrop.ts +++ b/src/heuristics/tokenAirdrop.ts @@ -114,7 +114,7 @@ function generateTokenAirdropContext(transaction: Transaction): Transaction { variables: { receivedAirdrop: { type: 'contextAction', - value: 'Received airdrop', + value: 'received airdrop', }, }, }, diff --git a/src/heuristics/tokenApproval.ts b/src/heuristics/tokenApproval.ts index a94ac9ca..e4485358 100644 --- a/src/heuristics/tokenApproval.ts +++ b/src/heuristics/tokenApproval.ts @@ -72,7 +72,7 @@ function generateTokenApprovalContext(transaction: Transaction): Transaction { variables: { gaveAccessTo: { type: 'contextAction', - value: 'Gave access to', + value: 'gave access to', }, }, }, diff --git a/src/heuristics/tokenMint.ts b/src/heuristics/tokenMint.ts index 891522c7..d877d5bd 100644 --- a/src/heuristics/tokenMint.ts +++ b/src/heuristics/tokenMint.ts @@ -91,7 +91,7 @@ function generateTokenMintContext(transaction: Transaction): Transaction { title: 'Token Mint', default: '[[recipient]] [[minted]] [[token]]', variables: { - minted: { type: 'contextAction', value: 'Minted' }, + minted: { type: 'contextAction', value: 'minted' }, }, }, }, diff --git a/src/heuristics/tokenTransfer.ts b/src/heuristics/tokenTransfer.ts index f7d8d52d..5dde543d 100644 --- a/src/heuristics/tokenTransfer.ts +++ b/src/heuristics/tokenTransfer.ts @@ -66,7 +66,7 @@ export function generateTokenTransferContext( variables: { sent: { type: 'contextAction', - value: 'Sent', + value: 'sent', }, }, }, diff --git a/src/protocol/ens/registrar.ts b/src/protocol/ens/registrar.ts index aa78f21d..75dc5b47 100644 --- a/src/protocol/ens/registrar.ts +++ b/src/protocol/ens/registrar.ts @@ -50,7 +50,7 @@ export const generateENSContext = (transaction: Transaction): Transaction => { variables: { registered: { type: 'contextAction', - value: 'Registered', + value: 'registered', }, }, }, @@ -84,7 +84,7 @@ export const generateENSContext = (transaction: Transaction): Transaction => { variables: { committedTo: { type: 'contextAction', - value: 'Committed to', + value: 'committed to', }, }, }, @@ -114,7 +114,7 @@ export const generateENSContext = (transaction: Transaction): Transaction => { variables: { renewed: { type: 'contextAction', - value: 'Renewed', + value: 'renewed', }, }, }, diff --git a/src/protocol/ens/reverse.ts b/src/protocol/ens/reverse.ts index 20e2db2e..f32b422b 100644 --- a/src/protocol/ens/reverse.ts +++ b/src/protocol/ens/reverse.ts @@ -43,7 +43,7 @@ export const generateENSReverseContext = ( variables: { reversed: { type: 'contextAction', - value: 'Set reverse ens to', + value: 'set reverse ens to', }, }, }, diff --git a/src/protocol/weth.ts b/src/protocol/weth.ts index 407dd14e..9edd0353 100644 --- a/src/protocol/weth.ts +++ b/src/protocol/weth.ts @@ -41,7 +41,7 @@ export const generateWethContext = (transaction: Transaction): Transaction => { title: 'WETH', default: `[[from]] [[wrapped]] [[value]]`, variables: { - wrapped: { type: 'contextAction', value: 'Wrapped' }, + wrapped: { type: 'contextAction', value: 'wrapped' }, }, }, }, @@ -81,7 +81,7 @@ export const generateWethContext = (transaction: Transaction): Transaction => { title: 'WETH', default: `[[from]] [[unwrapped]] [[value]]`, variables: { - unwrapped: { type: 'contextAction', value: 'Unwrapped' }, + unwrapped: { type: 'contextAction', value: 'unwrapped' }, }, }, }, diff --git a/src/types/transaction.ts b/src/types/transaction.ts index 27ea803a..8c035ffc 100644 --- a/src/types/transaction.ts +++ b/src/types/transaction.ts @@ -105,23 +105,23 @@ export type TransactionContextType = { }; export type ContextAction = - | 'Bought' - | 'Bridged' - | 'Deployed' - | 'Minted' - | 'Swapped' - | 'Wrapped' - | 'Sent' - | 'Received' - | 'Unwrapped' - | 'Registered' - | 'Renewed' - | 'Committed to' - | 'Received airdrop' - | 'Gave access to' - | 'Interacted with' - | 'Sent message' - | 'Set reverse ens to'; + | 'bought' + | 'bridged' + | 'deployed' + | 'minted' + | 'swapped' + | 'wrapped' + | 'sent' + | 'received' + | 'unwrapped' + | 'registered' + | 'renewed' + | 'committed to' + | 'received airdrop' + | 'gave access to' + | 'interacted with' + | 'sent message' + | 'set reverse ens to'; export type ContextSummaryVariableType = | string