Skip to content

Improve ScaleObj #2

Merged
basfroman merged 8 commits intostagingfrom
feat/roman/improve-scaleobj
Jan 14, 2025
Merged

Improve ScaleObj #2
basfroman merged 8 commits intostagingfrom
feat/roman/improve-scaleobj

Conversation

@basfroman
Copy link
Contributor

  • to use json.dumps see the next example
import json
from async_substrate_interface.substrate_interface import ScaleObj

id_ = ScaleObj(5)
paylod = {'jsonrpc': '2.0', 'method': 'neuronInfo_getNeuron', 'params': [23, id_], 'id': 0}

print(json.dumps(paylod, default=ScaleObj.dumper))

NOTE: json.dumps raises the error without default=ScaleObj.dumper usage.

@basfroman basfroman requested a review from a team January 14, 2025 10:31
@basfroman basfroman self-assigned this Jan 14, 2025
@basfroman basfroman added bug Something isn't working enhancement New feature or request labels Jan 14, 2025
@basfroman basfroman merged commit d130637 into staging Jan 14, 2025
@basfroman basfroman deleted the feat/roman/improve-scaleobj branch January 14, 2025 21:39
This was referenced Jan 16, 2025
@ibraheem-abe ibraheem-abe mentioned this pull request Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants