Skip to content
This repository has been archived by the owner on Jan 31, 2025. It is now read-only.

Commit

Permalink
Updating version
Browse files Browse the repository at this point in the history
  • Loading branch information
tjayrush committed May 28, 2024
1 parent bb195be commit 3646c05
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 68 deletions.
102 changes: 63 additions & 39 deletions content/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ info:
license:
name: GPL 3.0
url: http://www.gnu.org/licenses/
version: 2.5.11-release
version: 2.9.0-release
description: >
A REST layer over the TrueBlocks chifra command line. With `chifra daemon`, you can
run this on your own machine, and make calls to `localhost`.
Expand Down Expand Up @@ -226,15 +226,15 @@ paths:
{
"address": "0xff9387a9aae1f5daab1cd8eb0e92113ea9d19ca3",
"blockNumber": 4037786,
"transactionIndex": 47
"transactionIndex": 47,
},
{
"address": "0xff9387a9aae1f5daab1cd8eb0e92113ea9d19ca3",
"blockNumber": 4037800,
"transactionIndex": 77
"transactionIndex": 77,
},
{ "...": "..." }
]
{ "...": "..." },
],
}
"400":
description: bad input parameter
Expand Down Expand Up @@ -602,16 +602,16 @@ paths:
"contractAddress": "0x0",
"gasUsed": 21000,
"effectiveGasPrice": 20000000000,
"status": null
"status": null,
},
"compressedTx": "0x()",
"gasCost": 420000000000000,
"gasUsed": 21000,
"date": "2017-07-18 04:41:28 UTC",
"ether": 0.08435387
"ether": 0.08435387,
},
{ "...": "..." }
]
{ "...": "..." },
],
}
"400":
description: bad input parameter
Expand Down Expand Up @@ -968,8 +968,8 @@ paths:
"symbol": "LBA",
"source": "On chain",
"decimals": 18,
"petname": "actively-happy-mite"
}
"petname": "actively-happy-mite",
},
]
"400":
description: bad input parameter
Expand Down Expand Up @@ -1110,27 +1110,27 @@ paths:
"type": "address",
"name": "token0",
"indexed": true,
"internalType": "address"
"internalType": "address",
},
{
"type": "address",
"name": "token1",
"indexed": true,
"internalType": "address"
"internalType": "address",
},
{
"type": "address",
"name": "pair",
"internalType": "address"
"internalType": "address",
},
{
"type": "uint256",
"name": "val_0",
"internalType": "uint256"
}
]
}
]
"internalType": "uint256",
},
],
},
],
}
"400":
description: bad input parameter
Expand Down Expand Up @@ -1326,7 +1326,7 @@ paths:
"blockNumber": 3141592,
"hash": "0x0b4c6fb75ded4b90218cf0346b0885e442878f104e1b60bf75d5b6860eeacd53",
"...": "...",
"transactions": []
"transactions": [],
}
"400":
description: bad input parameter
Expand Down Expand Up @@ -2087,9 +2087,9 @@ paths:
"address": "0xa1e4380a3b1f749673e270229993ee55f35663b4",
"deployed": 0,
"accttype": "EOA",
"ether": 0.2588436983603185
}
]
"ether": 0.2588436983603185,
},
],
}
"400":
description: bad input parameter
Expand Down Expand Up @@ -2229,9 +2229,9 @@ paths:
"decimals": 1,
"isContract": true,
"isErc20": true,
"isErc721": true
}
]
"isErc721": true,
},
],
}
"400":
description: bad input parameter
Expand Down Expand Up @@ -2314,9 +2314,9 @@ paths:
"isTracing": true,
"hasEskey": true,
"hasPinkey": true,
"date": "2021-09-03 19:38:19 UTC"
}
]
"date": "2021-09-03 19:38:19 UTC",
},
],
}
"400":
description: bad input parameter
Expand Down Expand Up @@ -2685,15 +2685,15 @@ paths:
{
"fileName": "000000000-000000000",
"bloomHash": "QmbCQaYmfTR3sGNAvASoVjPynaY9UD31Hfxv7dGtzsptkb",
"indexHash": "QmPmfSrYT5HDpfjj4uYSycaFECo9EqPSuADQ3YPbVp3yu4"
"indexHash": "QmPmfSrYT5HDpfjj4uYSycaFECo9EqPSuADQ3YPbVp3yu4",
},
{
"fileName": "000000001-000590501",
"bloomHash": "QmSGuSQHgK4S9yiZQ3dKrykQVpLTmdFettY9sAwa537gPL",
"indexHash": "QmSaoxc3XA9DEaA3inhLW5ZKsk5C5LWvowSXpHwVHsMjQp"
"indexHash": "QmSaoxc3XA9DEaA3inhLW5ZKsk5C5LWvowSXpHwVHsMjQp",
},
{ "...": "..." }
]
{ "...": "..." },
],
}
"400":
description: bad input parameter
Expand Down Expand Up @@ -2945,8 +2945,8 @@ paths:
"hasToken": "0",
"gasUsed": "21000",
"date": "2015-08-07 03:50:51 UTC",
"ether": "0.000000000000000000"
}
"ether": "0.000000000000000000",
},
]
"400":
description: bad input parameter
Expand Down Expand Up @@ -3271,10 +3271,14 @@ components:
type: object
properties:
AddressRecord:
type: string
type: object
items:
$ref: "#/components/schemas/addrRecord"
description: "the address record for these appearances"
Appearances:
type: string
type: array
items:
$ref: "#/components/schemas/appRecord"
description: "all the appearances for this address"
block:
description: "block data as returned from the RPC (with slight enhancements)"
Expand Down Expand Up @@ -3965,6 +3969,10 @@ components:
type: string
format: int256
description: "the holder's asset balance at the given block height"
balanceDec:
type: number
format: float64
description: "the holder's asset balance (in Ether) at the given block height (calculated)"
diff:
type: string
format: int256
Expand All @@ -3982,7 +3990,9 @@ components:
format: uint64
description: "the number of decimals for the token contract"
type:
type: string
type: object
items:
$ref: "#/components/schemas/tokenType"
description: "the type of token (ERC20 or ERC721) or none"
result:
description: "the result (articulated if possible, as bytes otherwise) of a call to a smart contract"
Expand Down Expand Up @@ -4345,7 +4355,9 @@ components:
format: string
description: "the type of the cache"
items:
type: string
type: array
items:
$ref: "#/components/schemas/any"
description: "the individual items in the cache (if --verbose)"
lastCached:
type: string
Expand Down Expand Up @@ -4652,3 +4664,15 @@ components:
format: bytes
description: "One of four 32-byte topics of a log"
example: "0xf128...1e98"
addrRecord:
type: string
description: "an address record in the Unchained Index chunk"
appRecord:
type: string
description: "any cache item found in the binary cache"
tokenType:
type: string
description: "an appearance record in the Unchained Index chunk"
any:
type: string
description: "a string representing the token type"
25 changes: 13 additions & 12 deletions content/data-model/admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,17 +312,18 @@ Chains consist of the following fields:

This documentation mentions the following basic data types.

| Type | Description | Notes |
| -------- | ----------------------------------- | ----------- |
| address | an '0x'-prefixed 20-byte hex string | lowercase |
| blkrange | a pair of nine-digit block numbers | zero padded |
| bool | either `true`, `false`, `1`, or `0` | |
| datetime | a JSON formatted date | as a string |
| float64 | a double precision float | 64 bits |
| hash | an '0x'-prefixed 32-byte hex string | lowercase |
| int64 | a 64-bit signed integer | |
| ipfshash | a multi-hash produced by IPFS | mixed-case |
| string | a normal character string | |
| uint64 | a 64-bit unsigned integer | |
| Type | Description | Notes |
| -------- | ---------------------------------------- | ----------- |
| address | an '0x'-prefixed 20-byte hex string | lowercase |
| any | any cache item found in the binary cache | |
| blkrange | a pair of nine-digit block numbers | zero padded |
| bool | either `true`, `false`, `1`, or `0` | |
| datetime | a JSON formatted date | as a string |
| float64 | a double precision float | 64 bits |
| hash | an '0x'-prefixed 32-byte hex string | lowercase |
| int64 | a 64-bit signed integer | |
| ipfshash | a multi-hash produced by IPFS | mixed-case |
| string | a normal character string | |
| uint64 | a 64-bit unsigned integer | |

*Copyright (c) 2024, TrueBlocks, LLC. All rights reserved. Generated with goMaker.*
35 changes: 18 additions & 17 deletions content/data-model/chainstate.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,23 @@ The following commands produce and manage Tokens:

Tokens consist of the following fields:

| Field | Description | Type |
| ---------------- | -------------------------------------------------------------------------- | --------- |
| blockNumber | the block at which the report is made | blknum |
| transactionIndex | the transaction index (if applicable) at which the report is made | txnum |
| timestamp | the timestamp of the block | timestamp |
| date | the timestamp as a date (calculated) | datetime |
| totalSupply | the total supply of the token contract | int256 |
| address | the address of the token contract | address |
| holder | the holder address for which we are reporting | address |
| priorBalance | the holder's asset balance at its prior appearance | int256 |
| balance | the holder's asset balance at the given block height | int256 |
| diff | the difference, if any, between the prior and current balance (calculated) | int256 |
| name | the name of the token contract, if available | string |
| symbol | the symbol of the token contract | string |
| decimals | the number of decimals for the token contract | uint64 |
| type | the type of token (ERC20 or ERC721) or none | TokenType |
What about balanceDec?
| Field | Description | Type |
| ---------------- | ---------------------------------------------------------------------------- | --------- |
| blockNumber | the block at which the report is made | blknum |
| transactionIndex | the transaction index (if applicable) at which the report is made | txnum |
| timestamp | the timestamp of the block | timestamp |
| date | the timestamp as a date (calculated) | datetime |
| totalSupply | the total supply of the token contract | int256 |
| address | the address of the token contract | address |
| holder | the holder address for which we are reporting | address |
| priorBalance | the holder's asset balance at its prior appearance | int256 |
| balance | the holder's asset balance at the given block height | int256 |
| balanceDec | the holder's asset balance (in Ether) at the given block height (calculated) | float64 |
| diff | the difference, if any, between the prior and current balance (calculated) | int256 |
| name | the name of the token contract, if available | string |
| symbol | the symbol of the token contract | string |
| decimals | the number of decimals for the token contract | uint64 |
| type | the type of token (ERC20 or ERC721) or none | TokenType |

## Result

Expand Down Expand Up @@ -109,6 +109,7 @@ This documentation mentions the following basic data types.
| blknum | an alias for a uint64 | |
| datetime | a JSON formatted date | as a string |
| ether | a big number float | as a string |
| float64 | a double precision float | 64 bits |
| int256 | a signed big number | as a string |
| string | a normal character string | |
| timestamp | a 64-bit unsigned integer | Unix timestamp |
Expand Down

0 comments on commit 3646c05

Please sign in to comment.