Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PaysFee Parsing #42

Closed
joepetrowski opened this issue May 14, 2020 · 0 comments
Closed

Fix PaysFee Parsing #42

joepetrowski opened this issue May 14, 2020 · 0 comments

Comments

@joepetrowski
Copy link
Collaborator

Right now, ExtrinsicSuccess[data['paysFee']] = False for all extrinsics because paritytech/substrate#5733 changed pays_fee from bool to enum Pays { Yes, No } and since Yes decodes to 0, it reads as False. Update the parsing of this event to display correctly.

Example extrinsic (see extrinsic.events.5.data.paysFee):

{'method': 'balances.transferKeepAlive',
   'signature': {'signature': '0x841f8717395dcbd5fa2dd3e5dd610dffdc60c97338ff07b9c94c607ee9604d2d742348d5c0f80ac2838c242ce05eca600cb29c0bd9e6bd5d3fa35a0b0eedaf82',
    'signer': '5CAcTqah24vuWeU5YFwGNDukHhRYVTDq6QEKBaJ8LVLxYsEJ'},
   'nonce': '0',
   'args': ['5FnVcw9CKSkMTCT6HwABbW7dQhfitUi6TqBXihcLMTzSh55H',
    '10000000000000'],
   'tip': '0',
   'hash': '0x938199b5481f5be4a8195c90ca23b74a79f81f89e1d793efa6b55a8e55136dc5',
   'info': {'weight': '175000000',
    'class': 'Normal',
    'partialFee': '168827389'},
   'events': [{'method': 'system.NewAccount',
     'data': ['5FnVcw9CKSkMTCT6HwABbW7dQhfitUi6TqBXihcLMTzSh55H']},
    {'method': 'balances.Endowed',
     'data': ['5FnVcw9CKSkMTCT6HwABbW7dQhfitUi6TqBXihcLMTzSh55H',
      '10000000000000']},
    {'method': 'balances.Transfer',
     'data': ['5CAcTqah24vuWeU5YFwGNDukHhRYVTDq6QEKBaJ8LVLxYsEJ',
      '5FnVcw9CKSkMTCT6HwABbW7dQhfitUi6TqBXihcLMTzSh55H',
      '10000000000000']},
    {'method': 'treasury.Deposit', 'data': ['135063165']},
    {'method': 'balances.Deposit',
     'data': ['5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY', '33765792']},
    {'method': 'system.ExtrinsicSuccess',
     'data': [{'weight': '175000000', 'class': 'Normal', 'paysFee': False}]}],
   'success': True}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant