Execute a Cadence Script
Executes a read-only Cadence script against the execution state at the given block height or ID. If block height or ID is not specified, then the script is executed at the latest sealed block height.
post
https://flow-mainnet.g.alchemy.com/v2/demo/scripts
Executes a read-only Cadence script against the execution state at the given block height or ID.

Example:

Request

CUrl
curl --location --request POST 'https://flow-mainnet.g.alchemy.com/v2/demo/scripts/'
--header 'Content-Type: application/json'
--data-raw '{ "script": "aW1wb3J0IEZ1bmdpYmxlVG9rZW4gZnJvbSAweGYyMzNkY2VlODhmZTBhYmUKaW1wb3J0IFRvcFNob3RNYXJrZXRWMyBmcm9tIDB4YzFlNGY0ZjRjNDI1NzUxMAppbXBvcnQgVG9wU2hvdCBmcm9tIDB4MGIyYT.................N0Rm9yU2FsZSh0b2tlbklEOiAxODMwOTQ3NywgcHJpY2U6IFVGaXg2NCg2KSkKCQkKCX0KfQ==", "arguments": [] }'

Response:

[
"value" : []
]
Last modified 3mo ago