Skip to main content
1 of 3
user1938620
  • 681
  • 1
  • 6
  • 12

How to implement function() tokenFallback and decode the parameter bytes _extraData

I want to use the ERC223 approveAndCall() || ERC677 transferAndCall() functionality in a contract.

I can take the _extraData string

x="0xe359292df082828f595466de72062f2a1182b077",["0x3d4c4ecB5CAe14f20b916C2936a9d9A16acF14c9","0xBe227eE70d1AD43C4d1C9e173eD0f96AFDdB8a34"],["10","11"]

And convert it into a byte[] using y=byte(x)

0x307865333539323932646630383238323866353935343636646537323036326632613131383262303737

but in the returning tokenFallback() function I can't work out how to convert this back into an address and two arrays of address[], uint[].

user1938620
  • 681
  • 1
  • 6
  • 12