Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
gofman8 committed Oct 4, 2024
2 parents 229c086 + f6db362 commit 23c7429
Show file tree
Hide file tree
Showing 563 changed files with 22,262 additions and 13,947 deletions.
2 changes: 1 addition & 1 deletion .env.custom
Original file line number Diff line number Diff line change
@@ -1 +1 @@
APPLICATION_VERSION=1.40.0
APPLICATION_VERSION=1.52.0
18 changes: 18 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
# (default is 100)
# NATIVE_COINS_PRICES_TTL_SECONDS=

# RPC Provider
# The RPC provider to be used.
# INFURA_API_KEY=

# Balances Provider - Zerion API
# Chain ids configured to use this provider. (comma-separated numbers)
# (default='')
Expand All @@ -31,13 +35,24 @@
# The API Key to be used. If none is set, balances cannot be retrieved using this provider.
#ZERION_API_KEY=

# Push Notifications Provider - Firebase Cloud Messaging
# Firebase API URL
# (default=https://fcm.googleapis.com/v1/projects)
# PUSH_NOTIFICATIONS_API_BASE_URI=
# Firebase project
# PUSH_NOTIFICATIONS_API_PROJECT=
# Firebase service account details for authenticating with Google
# PUSH_NOTIFICATIONS_API_SERVICE_ACCOUNT_CLIENT_EMAIL=
# PUSH_NOTIFICATIONS_API_SERVICE_ACCOUNT_PRIVATE_KEY=

# Relay Provider
# The relay provider to be used.
# (default='https://api.gelato.digital')
# RELAY_PROVIDER_API_BASE_URI=
# (default=5)
# RELAY_THROTTLE_LIMIT=
# The API key to be used per chain.
# RELAY_PROVIDER_API_KEY_ARBITRUM_ONE=
# RELAY_PROVIDER_API_KEY_GNOSIS_CHAIN=
# RELAY_PROVIDER_API_KEY_SEPOLIA=

Expand Down Expand Up @@ -134,3 +149,6 @@

# Enable human description feature
#FF_HUMAN_DESCRIPTION=

# Enable CowSwap TWAPs decoding feature
#FF_TWAPS_DECODING=
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ lerna-debug.log*
data

# ABIs
/abis
/abis/*
38 changes: 0 additions & 38 deletions .yarn/patches/postgres-shift-npm-0.1.0-9342b5f6f6.patch

This file was deleted.

1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ ENV NODE_ENV production
ENV YARN_CACHE_FOLDER /root/.yarn
WORKDIR /app
COPY --chown=node:node .yarn/releases ./.yarn/releases
COPY --chown=node:node .yarn/patches ./.yarn/patches
COPY --chown=node:node package.json yarn.lock .yarnrc.yml tsconfig*.json ./
COPY --chown=node:node scripts/generate-abis.js ./scripts/generate-abis.js
RUN --mount=type=cache,target=/root/.yarn yarn
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ services:
EMAIL_TEMPLATE_UNKNOWN_RECOVERY_TX: ${EMAIL_TEMPLATE_UNKNOWN_RECOVERY_TX-example_template_unknown_recovery_tx}
EMAIL_TEMPLATE_RECOVERY_TX: ${EMAIL_TEMPLATE_RECOVERY_TX-example_template_recovery_tx}
EMAIL_TEMPLATE_VERIFICATION_CODE: ${EMAIL_TEMPLATE_VERIFICATION_CODE-example_template_verification_code}
INFURA_API_KEY: ${INFURA_API_KEY-example_api_key}
JWT_ISSUER: ${JWT_ISSUER-example_issuer}
JWT_TOKEN: ${JWT_TOKEN-example_token}
RELAY_PROVIDER_API_KEY_ARBITRUM_ONE: ${RELAY_PROVIDER_API_KEY_ARBITRUM_ONE-example_api_key}
RELAY_PROVIDER_API_KEY_GNOSIS_CHAIN: ${RELAY_PROVIDER_API_KEY_GNOSIS_CHAIN-example_api_key}
RELAY_PROVIDER_API_KEY_SEPOLIA: ${RELAY_PROVIDER_API_KEY_SEPOLIA-example_api_key}
depends_on:
Expand Down
4 changes: 0 additions & 4 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,10 @@ export default tseslint.config(
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-floating-promises': 'warn',
// TODO: Address these rules: (added to update to ESLint 9)
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/unbound-method': 'off',
},
},
Expand Down
32 changes: 32 additions & 0 deletions migrations/00001_accounts/index.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
DROP TABLE IF EXISTS groups,
accounts CASCADE;

CREATE TABLE
groups (
id SERIAL PRIMARY KEY,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);

CREATE TABLE
accounts (
id SERIAL PRIMARY KEY,
group_id INTEGER REFERENCES groups (id) ON DELETE SET NULL,
address CHARACTER VARYING(42) NOT NULL,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
UNIQUE (address)
);

CREATE OR REPLACE FUNCTION update_updated_at_column()
RETURNS TRIGGER AS $$
BEGIN
NEW.updated_at = NOW();
RETURN NEW;
END;
$$ LANGUAGE plpgsql;

CREATE OR REPLACE TRIGGER update_accounts_updated_at
BEFORE UPDATE ON accounts
FOR EACH ROW
EXECUTE FUNCTION update_updated_at_column();
45 changes: 0 additions & 45 deletions migrations/00001_initial/index.sql

This file was deleted.

20 changes: 20 additions & 0 deletions migrations/00002_account-data-types/index.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
DROP TABLE IF EXISTS account_data_types CASCADE;

CREATE TABLE account_data_types (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
description TEXT,
is_active BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);

CREATE OR REPLACE TRIGGER update_account_data_types_updated_at
BEFORE UPDATE ON account_data_types
FOR EACH ROW
EXECUTE FUNCTION update_updated_at_column();

INSERT INTO account_data_types (name, description, is_active) VALUES
('CounterfactualSafes', 'Counterfactual Safes', true),
('AddressBook', 'Address Book', false),
('Watchlist', 'Watchlist', false);
17 changes: 17 additions & 0 deletions migrations/00003_account-data-settings/index.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
DROP TABLE IF EXISTS account_data_settings CASCADE;

CREATE TABLE account_data_settings (
account_id INTEGER NOT NULL,
account_data_type_id INTEGER NOT NULL,
enabled BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
PRIMARY KEY (account_id, account_data_type_id),
FOREIGN KEY (account_id) REFERENCES accounts(id) ON DELETE CASCADE,
FOREIGN KEY (account_data_type_id) REFERENCES account_data_types(id) ON DELETE CASCADE
);

CREATE OR REPLACE TRIGGER update_account_data_settings_updated_at
BEFORE UPDATE ON account_data_settings
FOR EACH ROW
EXECUTE FUNCTION update_updated_at_column();
23 changes: 23 additions & 0 deletions migrations/00004_counterfactual-safes/index.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
DROP TABLE IF EXISTS counterfactual_safes CASCADE;

CREATE TABLE counterfactual_safes (
id SERIAL PRIMARY KEY,
chain_id VARCHAR(32) NOT NULL,
creator VARCHAR(42) NOT NULL,
fallback_handler VARCHAR(42) NOT NULL,
owners VARCHAR(42)[] NOT NULL,
predicted_address VARCHAR(42) NOT NULL,
salt_nonce VARCHAR(255) NOT NULL,
singleton_address VARCHAR(42) NOT NULL,
threshold INTEGER NOT NULL,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
account_id INTEGER NOT NULL,
FOREIGN KEY (account_id) REFERENCES accounts(id) ON DELETE CASCADE,
CONSTRAINT unique_chain_address UNIQUE (account_id, chain_id, predicted_address)
);

CREATE OR REPLACE TRIGGER update_counterfactual_safes_updated_at
BEFORE UPDATE ON counterfactual_safes
FOR EACH ROW
EXECUTE FUNCTION update_updated_at_column();
Loading

0 comments on commit 23c7429

Please sign in to comment.