https://github.com/maxstalker/flow-public-endpoints
Call public functions and return public field values stored on Flow Blockchain contracts
https://github.com/maxstalker/flow-public-endpoints
Last synced: 10 months ago
JSON representation
Call public functions and return public field values stored on Flow Blockchain contracts
- Host: GitHub
- URL: https://github.com/maxstalker/flow-public-endpoints
- Owner: MaxStalker
- Created: 2023-10-27T16:06:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-27T18:54:23.000Z (over 2 years ago)
- Last Synced: 2025-02-26T18:41:45.052Z (over 1 year ago)
- Language: JavaScript
- Size: 1.18 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Introduction
Sometimes your app simply needs to read a value from one or several contracts and display it in UI.
Flow Public Endpoints provide you this information by pulling it from chain using available Access
nodes.
Terminals can be used to fetch value without installing any extra dependencies.
# How to use
Send `POST` request with following fields in the body:
- ~~network~~ _(currently only mainnet supported)_
- contract name
- address
- list of arguments
## Flovatar `getComponent`
```bash
curl --request POST \
--url https://flow-public-endpoints.onrender.com/mainnet/0x921ea449dffec68a/FlovatarComponent/getComponent \
--header 'Content-Type: application/json' \
--data '{
"args": [
{
"type": "Address",
"value": "0x309c72eaa414cdc5"
},
{
"type": "UInt64",
"value": "62028"
}
]
}'
```
## FlovatarComponent `totalSupply`
```bash
curl --request POST \
--url https://flow-public-endpoints.onrender.com/mainnet/0x921ea449dffec68a/FlovatarComponent/totalSupply \
--header 'Content-Type: application/json' \
--data '{}'
```