Provide generic configurable NEP-17 tracker #51

Closed
opened 2025-12-28 18:12:10 +00:00 by sami · 0 comments
Owner

Originally created by @roman-khimov on GitHub (Nov 15, 2023).

Originally assigned to: @smallhive on GitHub.

The only thing we track from the "main" chain is NeoFS GAS balance. Which means we're calling balanceOf method of a NEP-17 contract for some address. For whatever reason it's configured as contracts.neofs and GAS is hardcoded there. But it costs nothing to provide something more like:

nep17:
    gas: // for native contract or hash of any other one!
        balanceOf:
            - 3c3f4b84773ef0141576e48c3ff60e5078235891
    neo:
        balanceOf:
            - NSPCCpw8YmgNDYWiBfXJHRfz38NDjv6WW3
            - NSPCCa2T6nc2kYcgWC2k68boyGgc9YdKsj

For the side chain it might be:

nep17:
    neofs_balance: // OK, we know how to handle NeoFS contracts
        totalSupply: true
        balanceOf:
            - NagentXDvR5c3pQ4gxXpqZjMoUpKVCUMmB

and this should allow to track any NEP-17 balance of any account (or other NEP-17 things like total supply). We desperately need this for our various accounts and it should be easy to add.

Originally created by @roman-khimov on GitHub (Nov 15, 2023). Originally assigned to: @smallhive on GitHub. The only thing we track from the "main" chain is NeoFS GAS balance. Which means we're calling `balanceOf` method of a NEP-17 contract for some address. For whatever reason it's configured as `contracts.neofs` and GAS is hardcoded there. But it costs nothing to provide something more like: ``` nep17: gas: // for native contract or hash of any other one! balanceOf: - 3c3f4b84773ef0141576e48c3ff60e5078235891 neo: balanceOf: - NSPCCpw8YmgNDYWiBfXJHRfz38NDjv6WW3 - NSPCCa2T6nc2kYcgWC2k68boyGgc9YdKsj ``` For the side chain it might be: ``` nep17: neofs_balance: // OK, we know how to handle NeoFS contracts totalSupply: true balanceOf: - NagentXDvR5c3pQ4gxXpqZjMoUpKVCUMmB ``` and this should allow to track _any_ NEP-17 balance of any account (or other NEP-17 things like total supply). We desperately need this for our various accounts and it should be easy to add.
sami 2025-12-28 18:12:10 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neo-exporter#51
No description provided.