Skip to content

Commit

Permalink
Merge pull request #9 from Once-Upon/feature/lowercase-actions
Browse files Browse the repository at this point in the history
Lowercase context action in types
  • Loading branch information
pcowgill authored Nov 30, 2023
2 parents 9cd5c82 + 0710ebe commit 1ebc940
Show file tree
Hide file tree
Showing 18 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/heuristics/contractDeployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function generateContractDeploymentContext(
variables: {
deployed: {
type: 'contextAction',
value: 'Deployed',
value: 'deployed',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/heuristics/erc1155Purchase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function generateERC1155PurchaseContext(transaction: Transaction): Transaction {
variables: {
bought: {
type: 'contextAction',
value: 'Bought',
value: 'bought',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/heuristics/erc1155Swap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function generateERC1155SwapContext(transaction: Transaction): Transaction {
variables: {
swapped: {
type: 'contextAction',
value: 'Swapped',
value: 'swapped',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/heuristics/erc20Swap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function generateERC20SwapContext(transaction: Transaction): Transaction {
variables: {
swapped: {
type: 'contextAction',
value: 'Swapped',
value: 'swapped',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/heuristics/erc721Purchase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function generateERC21PurchaseContext(transaction: Transaction): Transaction {
variables: {
bought: {
type: 'contextAction',
value: 'Bought',
value: 'bought',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/heuristics/ethTransfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function generateETHTransferContext(
variables: {
sent: {
type: 'contextAction',
value: 'Sent',
value: 'sent',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/heuristics/idm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function generateIdmContext(transaction: Transaction): Transaction {
variables: {
sentMessage: {
type: 'contextAction',
value: 'Sent message',
value: 'sent message',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/heuristics/superchainFaucet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function generateSuperchainFaucetTransaction(
variables: {
received: {
type: 'contextAction',
value: 'Received',
value: 'received',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/heuristics/tokenAirdrop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function generateTokenAirdropContext(transaction: Transaction): Transaction {
variables: {
receivedAirdrop: {
type: 'contextAction',
value: 'Received airdrop',
value: 'received airdrop',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/heuristics/tokenApproval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function generateTokenApprovalContext(transaction: Transaction): Transaction {
variables: {
gaveAccessTo: {
type: 'contextAction',
value: 'Gave access to',
value: 'gave access to',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/heuristics/tokenMint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/heuristics/tokenTransfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function generateTokenTransferContext(
variables: {
sent: {
type: 'contextAction',
value: 'Sent',
value: 'sent',
},
},
},
Expand Down
6 changes: 3 additions & 3 deletions src/protocol/ens/registrar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const generateENSContext = (transaction: Transaction): Transaction => {
variables: {
registered: {
type: 'contextAction',
value: 'Registered',
value: 'registered',
},
},
},
Expand Down Expand Up @@ -84,7 +84,7 @@ export const generateENSContext = (transaction: Transaction): Transaction => {
variables: {
committedTo: {
type: 'contextAction',
value: 'Committed to',
value: 'committed to',
},
},
},
Expand Down Expand Up @@ -114,7 +114,7 @@ export const generateENSContext = (transaction: Transaction): Transaction => {
variables: {
renewed: {
type: 'contextAction',
value: 'Renewed',
value: 'renewed',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/protocol/ens/reverse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const generateENSReverseContext = (
variables: {
reversed: {
type: 'contextAction',
value: 'Set reverse ens to',
value: 'set reverse ens to',
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions src/protocol/weth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
},
},
},
Expand Down Expand Up @@ -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' },
},
},
},
Expand Down
34 changes: 17 additions & 17 deletions src/types/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1ebc940

Please sign in to comment.