diff --git a/docs/bin/Pipfile b/docs/bin/Pipfile index ab34cac6..22e2ac6d 100644 --- a/docs/bin/Pipfile +++ b/docs/bin/Pipfile @@ -9,4 +9,4 @@ pyparsing = "*" [dev-packages] [requires] -python_version = "3.8" +python_version = "3.10" diff --git a/docs/bin/Pipfile.lock b/docs/bin/Pipfile.lock index e27cb3f6..c47cf065 100644 --- a/docs/bin/Pipfile.lock +++ b/docs/bin/Pipfile.lock @@ -1,11 +1,11 @@ { "_meta": { "hash": { - "sha256": "3d26583ccd5b1a7f9bf8eb9ac2760f8510fd3a46e0fa6593ac9fe3dcac017471" + "sha256": "cbd36df7ddb689d12ace867969b91aac394f639e27242ea90b701e34f0b1a343" }, "pipfile-spec": 6, "requires": { - "python_version": "3.8" + "python_version": "3.10" }, "sources": [ { @@ -18,11 +18,12 @@ "default": { "pyparsing": { "hashes": [ - "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb", - "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc" + "sha256:32c7c0b711493c72ff18a981d24f28aaf9c1fb7ed5e9667c9e84e3db623bdbfb", + "sha256:ede28a1a32462f5a9705e07aea48001a08f7cf81a021585011deba701581a0db" ], "index": "pypi", - "version": "==3.0.9" + "markers": "python_full_version >= '3.6.8'", + "version": "==3.1.1" } }, "develop": {} diff --git a/docs/bin/default.dot b/docs/bin/default.dot index c5c70261..e1fda641 100644 --- a/docs/bin/default.dot +++ b/docs/bin/default.dot @@ -37,6 +37,7 @@ N16; N17; N18; N19; +N20; } @@ -60,6 +61,7 @@ N19; N17[label="MultieraTxCredentialRelationTask"][shape="box"]; N18[label="MultieraAssetMintTask"][shape="box"]; N19[label="MultieraCip25EntryTask"][shape="box"]; + N20[label="MultieraAddressDelegationTask"][shape="box"]; N0 -> N1[label=""]; N2 -> N3[label=""]; N3 -> N4[label=""]; @@ -81,4 +83,5 @@ N19; N8 -> N18[label=""]; N9 -> N19[label=""]; N18 -> N19[label=""]; + N15 -> N20[label=""]; } diff --git a/docs/bin/default.svg b/docs/bin/default.svg index 29434372..00a4a070 100644 --- a/docs/bin/default.svg +++ b/docs/bin/default.svg @@ -4,11 +4,11 @@ - + default - + cluster_Genesis @@ -21,8 +21,8 @@ cluster_Multiera - -Multiera + +Multiera @@ -99,56 +99,56 @@ N7 - -MultieraBlockTask + +MultieraBlockTask N8 - -MultieraTransactionTask + +MultieraTransactionTask N7->N8 - - + + N9 - -MultieraMetadataTask + +MultieraMetadataTask N8->N9 - - + + N10 - -MultieraAddressTask + +MultieraAddressTask N8->N10 - - + + N18 - -MultieraAssetMintTask + +MultieraAssetMintTask N8->N18 - - + + @@ -159,116 +159,128 @@ N9->N19 - - + + N11 - -MultieraOutputTask + +MultieraOutputTask N10->N11 - - + + N16 - -MultieraAddressCredentialRelationTask + +MultieraAddressCredentialRelationTask N10->N16 - - + + N17 - -MultieraTxCredentialRelationTask + +MultieraTxCredentialRelationTask N10->N17 - - + + N12 - -MultieraReferenceInputTask + +MultieraReferenceInputTask N11->N12 - - + + N13 - -MultieraUsedInputTask + +MultieraUsedInputTask N11->N13 - - + + N14 - -MultieraUnusedInputTask + +MultieraUnusedInputTask N11->N14 - - + + N15 - -MultieraStakeCredentialTask + +MultieraStakeCredentialTask N13->N15 - - + + N14->N15 - - + + N15->N16 - - + + N15->N17 - - + + + + + +N20 + +MultieraAddressDelegationTask + + + +N15->N20 + + N18->N19 - - + + diff --git a/docs/bin/gen-sql-graph.sh b/docs/bin/gen-sql-graph.sh index 7d0338bf..f324b490 100644 --- a/docs/bin/gen-sql-graph.sh +++ b/docs/bin/gen-sql-graph.sh @@ -10,6 +10,7 @@ fi pip install --user pipenv +# if this fails, try running `pipenv --rm && pipenv --clear` from the bin directory pipenv install pipenv shell "python ./sql_graphviz.py ./schema.sql | dot -Tsvg > ./sql-graph.svg && exit" \ No newline at end of file diff --git a/docs/bin/openapi.json b/docs/bin/openapi.json index 70171b2f..a07cbccf 100644 --- a/docs/bin/openapi.json +++ b/docs/bin/openapi.json @@ -165,8 +165,8 @@ }, "hash": { "type": "string", - "description": "[0-9a-fA-F]{64}", - "example": "cf8c63a909d91776e27f7d05457e823a9dba606a7ab499ac435e7904ee70d7c8" + "example": "cf8c63a909d91776e27f7d05457e823a9dba606a7ab499ac435e7904ee70d7c8", + "pattern": "[0-9a-fA-F]{64}" }, "era": { "type": "number", @@ -757,6 +757,130 @@ ], "type": "object" }, + "ProjectedNftRangeResponse": { + "items": { + "properties": { + "forHowLong": { + "type": "number", + "format": "double", + "nullable": true, + "description": "UNIX timestamp till which the funds can't be claimed in the Unlocking state.\nIf the status is not Unlocking this is always null.", + "example": 1701266986000 + }, + "plutusDatum": { + "type": "string", + "nullable": true, + "description": "Projected NFT datum: serialized state of the Projected NFT", + "example": "d8799fd8799f581c9040f057461d9adc09108fe5cb630077cf75c6e981d3ed91f6fb18f6ffd87980ff", + "pattern": "[0-9a-fA-F]+" + }, + "status": { + "type": "string", + "nullable": true, + "description": "Projected NFT status: Lock / Unlocking / Claim / Invalid", + "example": "Lock" + }, + "amount": { + "type": "number", + "format": "double", + "description": "Number of assets of `asset` type used in this Projected NFT event.", + "example": 1 + }, + "asset": { + "type": "string", + "description": "Asset that relates to Projected NFT event. Consists of 2 parts: PolicyId and AssetName", + "example": "96f7dc9749ede0140f042516f4b723d7261610d6b12ccb19f3475278.415045", + "pattern": "[0-9a-fA-F]+.[0-9a-fA-F]+" + }, + "previousTxOutputIndex": { + "type": "number", + "format": "double", + "nullable": true, + "description": "Output index of related previous Projected NFT event. Null if event has `status` Lock.", + "example": 1 + }, + "previousTxHash": { + "type": "string", + "nullable": true, + "description": "Transaction id of related previous Projected NFT event.\nE.g. you locked the NFT and get unlocking event: you will see previousTxHash = transaction hash of lock event.\nNull if event has `status` Lock.", + "example": "28eb069e3e8c13831d431e3b2e35f58525493ab2d77fde83184993e4aa7a0eda", + "pattern": "[0-9a-fA-F]{64}" + }, + "actionOutputIndex": { + "type": "number", + "format": "double", + "nullable": true, + "description": "Output index of related Projected NFT event. Null if it is claim event (No new UTxO is created).", + "example": 1 + }, + "actionTxId": { + "type": "string", + "nullable": true, + "description": "Transaction id of related Projected NFT event", + "example": "28eb069e3e8c13831d431e3b2e35f58525493ab2d77fde83184993e4aa7a0eda", + "pattern": "[0-9a-fA-F]{64}" + }, + "ownerAddress": { + "type": "string", + "nullable": true, + "description": "Projected NFT owner address. Not null only if owned by Public Key Hash.", + "example": "9040f057461d9adc09108fe5cb630077cf75c6e981d3ed91f6fb18f6", + "pattern": "[0-9a-fA-F]+" + }, + "actionSlot": { + "type": "number", + "format": "double", + "description": "Slot at which the transaction happened", + "example": 512345 + } + }, + "required": [ + "forHowLong", + "plutusDatum", + "status", + "amount", + "asset", + "previousTxOutputIndex", + "previousTxHash", + "actionOutputIndex", + "actionTxId", + "ownerAddress", + "actionSlot" + ], + "type": "object" + }, + "type": "array" + }, + "ProjectedNftRangeRequest": { + "properties": { + "range": { + "properties": { + "maxSlot": { + "type": "number", + "format": "double", + "description": "Maximal slot from which the events should be returned (inclusive)", + "example": 46154860 + }, + "minSlot": { + "type": "number", + "format": "double", + "description": "Minimal slot from which the events should be returned (not inclusive)", + "example": 46154769 + } + }, + "required": [ + "maxSlot", + "minSlot" + ], + "type": "object", + "description": "Projected NFT events in this slot range will be returned" + } + }, + "required": [ + "range" + ], + "type": "object" + }, "BlockInfo": { "allOf": [ { @@ -1470,6 +1594,65 @@ } } }, + "/projected-nft/range": { + "post": { + "operationId": "ProjectedNftRange", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectedNftRangeResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorShape" + } + } + } + }, + "409": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorShape" + } + } + } + }, + "422": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorShape" + } + } + } + } + }, + "security": [], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectedNftRangeRequest" + } + } + } + } + } + }, "/transaction/history": { "post": { "operationId": "TransactionHistory", diff --git a/docs/bin/schema.sql b/docs/bin/schema.sql index 210f865d..9d6f60ae 100644 --- a/docs/bin/schema.sql +++ b/docs/bin/schema.sql @@ -2,8 +2,8 @@ -- PostgreSQL database dump -- --- Dumped from database version 14.3 (Ubuntu 14.3-1.pgdg20.04+1) --- Dumped by pg_dump version 14.3 (Ubuntu 14.3-1.pgdg20.04+1) +-- Dumped from database version 14.9 (Ubuntu 14.9-0ubuntu0.22.04.1) +-- Dumped by pg_dump version 14.9 (Ubuntu 14.9-0ubuntu0.22.04.1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -83,7 +83,7 @@ CREATE TABLE public."Block" ( height integer NOT NULL, epoch integer NOT NULL, slot integer NOT NULL, - payload bytea NOT NULL + payload bytea ); @@ -266,6 +266,44 @@ CREATE SEQUENCE public."PlutusData_id_seq" ALTER SEQUENCE public."PlutusData_id_seq" OWNED BY public."PlutusData".id; +-- +-- Name: ProjectedNFT; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public."ProjectedNFT" ( + id bigint NOT NULL, + owner_address bytea NOT NULL, + previous_utxo_tx_hash bytea NOT NULL, + previous_utxo_tx_output_index bigint, + hololocker_utxo_id bigint, + tx_id bigint NOT NULL, + asset text NOT NULL, + amount bigint NOT NULL, + operation integer NOT NULL, + plutus_datum bytea NOT NULL, + for_how_long bigint +); + + +-- +-- Name: ProjectedNFT_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public."ProjectedNFT_id_seq" + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: ProjectedNFT_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public."ProjectedNFT_id_seq" OWNED BY public."ProjectedNFT".id; + + -- -- Name: StakeCredential; Type: TABLE; Schema: public; Owner: - -- @@ -296,6 +334,38 @@ CREATE SEQUENCE public."StakeCredential_id_seq" ALTER SEQUENCE public."StakeCredential_id_seq" OWNED BY public."StakeCredential".id; +-- +-- Name: StakeDelegationCredentialRelation; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public."StakeDelegationCredentialRelation" ( + id bigint NOT NULL, + stake_credential bigint NOT NULL, + tx_id bigint NOT NULL, + pool_credential bytea, + previous_pool bytea +); + + +-- +-- Name: StakeDelegationCredentialRelation_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public."StakeDelegationCredentialRelation_id_seq" + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: StakeDelegationCredentialRelation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public."StakeDelegationCredentialRelation_id_seq" OWNED BY public."StakeDelegationCredentialRelation".id; + + -- -- Name: Transaction; Type: TABLE; Schema: public; Owner: - -- @@ -526,6 +596,13 @@ ALTER TABLE ONLY public."PlutusData" ALTER COLUMN id SET DEFAULT nextval('public ALTER TABLE ONLY public."PlutusDataHash" ALTER COLUMN id SET DEFAULT nextval('public."PlutusDataHash_id_seq"'::regclass); +-- +-- Name: ProjectedNFT id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."ProjectedNFT" ALTER COLUMN id SET DEFAULT nextval('public."ProjectedNFT_id_seq"'::regclass); + + -- -- Name: StakeCredential id; Type: DEFAULT; Schema: public; Owner: - -- @@ -533,6 +610,13 @@ ALTER TABLE ONLY public."PlutusDataHash" ALTER COLUMN id SET DEFAULT nextval('pu ALTER TABLE ONLY public."StakeCredential" ALTER COLUMN id SET DEFAULT nextval('public."StakeCredential_id_seq"'::regclass); +-- +-- Name: StakeDelegationCredentialRelation id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."StakeDelegationCredentialRelation" ALTER COLUMN id SET DEFAULT nextval('public."StakeDelegationCredentialRelation_id_seq"'::regclass); + + -- -- Name: Transaction id; Type: DEFAULT; Schema: public; Owner: - -- @@ -720,6 +804,14 @@ ALTER TABLE ONLY public."AssetMint" ADD CONSTRAINT "asset_mint-pk" PRIMARY KEY (tx_id, asset_id); +-- +-- Name: ProjectedNFT projected_nft-pk; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."ProjectedNFT" + ADD CONSTRAINT "projected_nft-pk" PRIMARY KEY (id); + + -- -- Name: seaql_migrations seaql_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -728,6 +820,14 @@ ALTER TABLE ONLY public.seaql_migrations ADD CONSTRAINT seaql_migrations_pkey PRIMARY KEY (version); +-- +-- Name: StakeDelegationCredentialRelation stake_delegation_credential-pk; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."StakeDelegationCredentialRelation" + ADD CONSTRAINT "stake_delegation_credential-pk" PRIMARY KEY (id); + + -- -- Name: TxCredentialRelation tx_credential-pk; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -848,6 +948,13 @@ CREATE INDEX "index-plutus_data_hash-transaction" ON public."PlutusDataHash" USI CREATE INDEX "index-stake_credential-transaction" ON public."StakeCredential" USING btree (first_tx); +-- +-- Name: index-stake_delegation_credential-stake_credential; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX "index-stake_delegation_credential-stake_credential" ON public."StakeDelegationCredentialRelation" USING btree (stake_credential); + + -- -- Name: index-transaction-block; Type: INDEX; Schema: public; Owner: - -- @@ -1038,6 +1145,22 @@ ALTER TABLE ONLY public."PlutusDataHash" ADD CONSTRAINT "fk-plutus_data_hash-tx_id" FOREIGN KEY (first_tx) REFERENCES public."Transaction"(id) ON DELETE CASCADE; +-- +-- Name: ProjectedNFT fk-projected_nft-tx_id; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."ProjectedNFT" + ADD CONSTRAINT "fk-projected_nft-tx_id" FOREIGN KEY (tx_id) REFERENCES public."Transaction"(id) ON DELETE CASCADE; + + +-- +-- Name: ProjectedNFT fk-projected_nft-utxo_id; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."ProjectedNFT" + ADD CONSTRAINT "fk-projected_nft-utxo_id" FOREIGN KEY (hololocker_utxo_id) REFERENCES public."TransactionOutput"(id) ON DELETE CASCADE; + + -- -- Name: StakeCredential fk-stake_credential-tx_id; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -1046,6 +1169,22 @@ ALTER TABLE ONLY public."StakeCredential" ADD CONSTRAINT "fk-stake_credential-tx_id" FOREIGN KEY (first_tx) REFERENCES public."Transaction"(id) ON DELETE CASCADE; +-- +-- Name: StakeDelegationCredentialRelation fk-stake_delegation-credential_id; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."StakeDelegationCredentialRelation" + ADD CONSTRAINT "fk-stake_delegation-credential_id" FOREIGN KEY (stake_credential) REFERENCES public."StakeCredential"(id) ON DELETE CASCADE; + + +-- +-- Name: StakeDelegationCredentialRelation fk-stake_delegation-tx_id; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."StakeDelegationCredentialRelation" + ADD CONSTRAINT "fk-stake_delegation-tx_id" FOREIGN KEY (tx_id) REFERENCES public."Transaction"(id) ON DELETE CASCADE; + + -- -- Name: Transaction fk-transaction-block_id; Type: FK CONSTRAINT; Schema: public; Owner: - -- diff --git a/docs/bin/sql-graph.svg b/docs/bin/sql-graph.svg index 9ca4f03c..7e0746f5 100644 --- a/docs/bin/sql-graph.svg +++ b/docs/bin/sql-graph.svg @@ -4,656 +4,774 @@ - - + + g - + ['public.', 'Address'] - - - ['public.', 'Address'] - - - id - - bigint NOT NULL - - - payload - - bytea NOT NULL - - - first_tx - - bigint NOT NULL + + + ['public.', 'Address'] + + + id + + bigint NOT NULL + + + payload + + bytea NOT NULL + + + first_tx + + bigint NOT NULL - + ['public.', 'Transaction'] - - - ['public.', 'Transaction'] - - - id - - bigint NOT NULL - - - hash - - bytea NOT NULL - - - block_id - - integer NOT NULL - - - tx_index - - integer NOT NULL - - - payload - - bytea NOT NULL - - - is_valid - - boolean NOT NULL + + + ['public.', 'Transaction'] + + + id + + bigint NOT NULL + + + hash + + bytea NOT NULL + + + block_id + + integer NOT NULL + + + tx_index + + integer NOT NULL + + + payload + + bytea NOT NULL + + + is_valid + + boolean NOT NULL ['public.', 'Address']:first_tx_right->['public.', 'Transaction']:id - - + + ['public.', 'AddressCredentialRelation'] - - - ['public.', 'AddressCredentialRelation'] - - - address_id - - bigint NOT NULL - - - credential_id - - bigint NOT NULL - - - relation - - integer NOT NULL + + + ['public.', 'AddressCredentialRelation'] + + + address_id + + bigint NOT NULL + + + credential_id + + bigint NOT NULL + + + relation + + integer NOT NULL ['public.', 'AddressCredentialRelation']:address_id_right->['public.', 'Address']:id - - + + - + ['public.', 'StakeCredential'] - - - ['public.', 'StakeCredential'] - - - id - - bigint NOT NULL - - - credential - - bytea NOT NULL - - - first_tx - - bigint NOT NULL + + + ['public.', 'StakeCredential'] + + + id + + bigint NOT NULL + + + credential + + bytea NOT NULL + + + first_tx + + bigint NOT NULL ['public.', 'AddressCredentialRelation']:credential_id_right->['public.', 'StakeCredential']:id - - + + ['public.', 'AssetMint'] - - - ['public.', 'AssetMint'] - - - tx_id - - bigint NOT NULL - - - asset_id - - bigint NOT NULL - - - amount - - bigint NOT NULL + + + ['public.', 'AssetMint'] + + + tx_id + + bigint NOT NULL + + + asset_id + + bigint NOT NULL + + + amount + + bigint NOT NULL ['public.', 'NativeAsset'] - - - ['public.', 'NativeAsset'] - - - id - - bigint NOT NULL - - - policy_id - - bytea NOT NULL - - - asset_name - - bytea NOT NULL - - - cip14_fingerprint - - bytea NOT NULL - - - first_tx - - bigint NOT NULL + + + ['public.', 'NativeAsset'] + + + id + + bigint NOT NULL + + + policy_id + + bytea NOT NULL + + + asset_name + + bytea NOT NULL + + + cip14_fingerprint + + bytea NOT NULL + + + first_tx + + bigint NOT NULL ['public.', 'AssetMint']:asset_id_right->['public.', 'NativeAsset']:id - - + + ['public.', 'AssetMint']:tx_id_right->['public.', 'Transaction']:id - - + + ['public.', 'Block'] - - - ['public.', 'Block'] - - - id - - integer NOT NULL - - - era - - integer NOT NULL - - - hash - - bytea NOT NULL - - - height - - integer NOT NULL - - - epoch - - integer NOT NULL - - - slot - - integer NOT NULL - - - payload - - bytea NOT NULL + + + ['public.', 'Block'] + + + id + + integer NOT NULL + + + era + + integer NOT NULL + + + hash + + bytea NOT NULL + + + height + + integer NOT NULL + + + epoch + + integer NOT NULL + + + slot + + integer NOT NULL + + + payload + + bytea ['public.', 'Cip25Entry'] - - - ['public.', 'Cip25Entry'] - - - id - - bigint NOT NULL - - - metadata_id - - bigint NOT NULL - - - asset_id - - bigint NOT NULL - - - version - - text NOT NULL - - - payload - - bytea NOT NULL + + + ['public.', 'Cip25Entry'] + + + id + + bigint NOT NULL + + + metadata_id + + bigint NOT NULL + + + asset_id + + bigint NOT NULL + + + version + + text NOT NULL + + + payload + + bytea NOT NULL ['public.', 'Cip25Entry']:asset_id_right->['public.', 'NativeAsset']:id - - + + - + ['public.', 'TransactionMetadata'] - - - ['public.', 'TransactionMetadata'] - - - id - - bigint NOT NULL - - - tx_id - - bigint NOT NULL - - - label - - bytea NOT NULL - - - payload - - bytea NOT NULL + + + ['public.', 'TransactionMetadata'] + + + id + + bigint NOT NULL + + + tx_id + + bigint NOT NULL + + + label + + bytea NOT NULL + + + payload + + bytea NOT NULL ['public.', 'Cip25Entry']:metadata_id_right->['public.', 'TransactionMetadata']:id - - + + ['public.', 'Dex'] - - - ['public.', 'Dex'] - - - id - - bigint NOT NULL - - - tx_id - - bigint NOT NULL - - - address_id - - bigint NOT NULL - - - dex - - bigint NOT NULL - - - asset1_id - - bigint - - - asset2_id - - bigint - - - amount1 - - bigint NOT NULL - - - amount2 - - bigint NOT NULL - - - operation - - bigint NOT NULL + + + ['public.', 'Dex'] + + + id + + bigint NOT NULL + + + tx_id + + bigint NOT NULL + + + address_id + + bigint NOT NULL + + + dex + + bigint NOT NULL + + + asset1_id + + bigint + + + asset2_id + + bigint + + + amount1 + + bigint NOT NULL + + + amount2 + + bigint NOT NULL + + + operation + + bigint NOT NULL ['public.', 'Dex']:address_id_right->['public.', 'Address']:id - - + + ['public.', 'Dex']:asset1_id_right->['public.', 'NativeAsset']:id - - + + ['public.', 'Dex']:asset2_id_right->['public.', 'NativeAsset']:id - - + + ['public.', 'Dex']:tx_id_right->['public.', 'Transaction']:id - - + + ['public.', 'NativeAsset']:first_tx_right->['public.', 'Transaction']:id - - + + ['public.', 'PlutusData'] - - - ['public.', 'PlutusData'] - - - id - - bigint NOT NULL - - - data - - bytea NOT NULL + + + ['public.', 'PlutusData'] + + + id + + bigint NOT NULL + + + data + + bytea NOT NULL ['public.', 'PlutusDataHash'] - - - ['public.', 'PlutusDataHash'] - - - id - - bigint NOT NULL - - - hash - - bytea NOT NULL - - - first_tx - - bigint NOT NULL + + + ['public.', 'PlutusDataHash'] + + + id + + bigint NOT NULL + + + hash + + bytea NOT NULL + + + first_tx + + bigint NOT NULL ['public.', 'PlutusData']:id_right->['public.', 'PlutusDataHash']:id - - + + ['public.', 'PlutusDataHash']:first_tx_right->['public.', 'Transaction']:id - - + + - + + +['public.', 'ProjectedNFT'] + + + ['public.', 'ProjectedNFT'] + + + id + + bigint NOT NULL + + + owner_address + + bytea NOT NULL + + + previous_utxo_tx_hash + + bytea NOT NULL + + + previous_utxo_tx_output_index + + bigint + + + hololocker_utxo_id + + bigint + + + tx_id + + bigint NOT NULL + + + asset + + text NOT NULL + + + amount + + bigint NOT NULL + + + operation + + integer NOT NULL + + + plutus_datum + + bytea NOT NULL + + + for_how_long + + bigint + + +['public.', 'ProjectedNFT']:tx_id_right->['public.', 'Transaction']:id + + + + + +['public.', 'TransactionOutput'] + + + ['public.', 'TransactionOutput'] + + + id + + bigint NOT NULL + + + payload + + bytea NOT NULL + + + address_id + + bigint NOT NULL + + + tx_id + + bigint NOT NULL + + + output_index + + integer NOT NULL + + + +['public.', 'ProjectedNFT']:hololocker_utxo_id_right->['public.', 'TransactionOutput']:id + + + + + ['public.', 'StakeCredential']:first_tx_right->['public.', 'Transaction']:id - - + + + + + +['public.', 'StakeDelegationCredentialRelation'] + + + ['public.', 'StakeDelegationCredentialRelation'] + + + id + + bigint NOT NULL + + + stake_credential + + bigint NOT NULL + + + tx_id + + bigint NOT NULL + + + pool_credential + + bytea + + + previous_pool + + bytea + + + +['public.', 'StakeDelegationCredentialRelation']:stake_credential_right->['public.', 'StakeCredential']:id + + + + + +['public.', 'StakeDelegationCredentialRelation']:tx_id_right->['public.', 'Transaction']:id + + - + ['public.', 'Transaction']:block_id_right->['public.', 'Block']:id - - + + - + ['public.', 'TransactionInput'] - - - ['public.', 'TransactionInput'] - - - id - - bigint NOT NULL - - - utxo_id - - bigint NOT NULL - - - tx_id - - bigint NOT NULL - - - address_id - - bigint NOT NULL - - - input_index - - integer NOT NULL + + + ['public.', 'TransactionInput'] + + + id + + bigint NOT NULL + + + utxo_id + + bigint NOT NULL + + + tx_id + + bigint NOT NULL + + + address_id + + bigint NOT NULL + + + input_index + + integer NOT NULL - + ['public.', 'TransactionInput']:address_id_right->['public.', 'Address']:id - - + + - + ['public.', 'TransactionInput']:tx_id_right->['public.', 'Transaction']:id - - - - - -['public.', 'TransactionOutput'] - - - ['public.', 'TransactionOutput'] - - - id - - bigint NOT NULL - - - payload - - bytea NOT NULL - - - address_id - - bigint NOT NULL - - - tx_id - - bigint NOT NULL - - - output_index - - integer NOT NULL + + - + ['public.', 'TransactionInput']:utxo_id_right->['public.', 'TransactionOutput']:id - - + + ['public.', 'TransactionMetadata']:tx_id_right->['public.', 'Transaction']:id - - + + - + ['public.', 'TransactionOutput']:address_id_right->['public.', 'Address']:id - - + + - + ['public.', 'TransactionOutput']:tx_id_right->['public.', 'Transaction']:id - - + + - + ['public.', 'TransactionReferenceInput'] - - - ['public.', 'TransactionReferenceInput'] - - - id - - bigint NOT NULL - - - utxo_id - - bigint NOT NULL - - - tx_id - - bigint NOT NULL - - - address_id - - bigint NOT NULL - - - input_index - - integer NOT NULL + + + ['public.', 'TransactionReferenceInput'] + + + id + + bigint NOT NULL + + + utxo_id + + bigint NOT NULL + + + tx_id + + bigint NOT NULL + + + address_id + + bigint NOT NULL + + + input_index + + integer NOT NULL - + ['public.', 'TransactionReferenceInput']:address_id_right->['public.', 'Address']:id - - + + - + ['public.', 'TransactionReferenceInput']:tx_id_right->['public.', 'Transaction']:id - - + + - + ['public.', 'TransactionReferenceInput']:utxo_id_right->['public.', 'TransactionOutput']:id - - + + - + ['public.', 'TxCredentialRelation'] - - - ['public.', 'TxCredentialRelation'] - - - credential_id - - bigint NOT NULL - - - tx_id - - bigint NOT NULL - - - relation - - integer NOT NULL + + + ['public.', 'TxCredentialRelation'] + + + credential_id + + bigint NOT NULL + + + tx_id + + bigint NOT NULL + + + relation + + integer NOT NULL - + ['public.', 'TxCredentialRelation']:credential_id_right->['public.', 'StakeCredential']:id - - + + - + ['public.', 'TxCredentialRelation']:tx_id_right->['public.', 'Transaction']:id - - + + - + ['public.seaql_migrations'] - - - ['public.seaql_migrations'] - - - version - - character varying NOT NULL - - - applied_at - - bigint NOT NULL + + + ['public.seaql_migrations'] + + + version + + character varying NOT NULL + + + applied_at + + bigint NOT NULL diff --git a/docs/docs/indexer/Tasks/MultiEraProjectedNftTask.md b/docs/docs/indexer/Tasks/MultiEraProjectedNftTask.md new file mode 100644 index 00000000..a0300c4b --- /dev/null +++ b/docs/docs/indexer/Tasks/MultiEraProjectedNftTask.md @@ -0,0 +1,40 @@ +# MultiEraProjectedNftTask +Parses projected NFT contract data + + +
+ Configuration + +```rust +use super::PayloadConfig::PayloadConfig; +use super::ReadonlyConfig::ReadonlyConfig; + +#[derive(Debug, Clone, Copy, serde::Deserialize, serde::Serialize)] +pub struct PayloadAndReadonlyConfig { + pub include_payload: bool, + pub readonly: bool, +} + +``` +
+ + +## Era +` multiera ` + +## Dependencies + + * [MultieraUsedInputTask](./MultieraUsedInputTask) + * [MultieraOutputTask](./MultieraOutputTask) + + +## Data accessed +#### Reads from + + * ` multiera_txs ` + * ` multiera_outputs ` + * ` multiera_used_inputs_to_outputs_map ` + + +## Full source +[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_projected_nft.rs) diff --git a/docs/docs/indexer/Tasks/MultieraAddressDelegationTask.md b/docs/docs/indexer/Tasks/MultieraAddressDelegationTask.md new file mode 100644 index 00000000..0106d11d --- /dev/null +++ b/docs/docs/indexer/Tasks/MultieraAddressDelegationTask.md @@ -0,0 +1,32 @@ +# MultieraAddressDelegationTask +Tracks stake delegation actions to pools\. + + +
+ Configuration + +```rust +#[derive(Debug, Clone, Copy, serde::Deserialize, serde::Serialize)] +pub struct EmptyConfig {} + +``` +
+ + +## Era +` multiera ` + +## Dependencies + + * [MultieraStakeCredentialTask](./MultieraStakeCredentialTask) + + +## Data accessed +#### Reads from + + * ` multiera_txs ` + * ` multiera_stake_credential ` + + +## Full source +[source](https://github.com/dcSpark/carp/tree/main/indexer/tasks/src/multiera/multiera_address_delegation.rs)