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

Updates offsets for Ethereum rfc003 htlcs #66

Closed
D4nte opened this issue May 5, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@D4nte
Copy link
Member

commented May 5, 2019

Correct offsets are:

### RFC003 ###
** Ether on Ethereum **
Contract template:
 6100dc61000f6000396100dc6000f336156051576020361415605c57602060006000376020602160206000600060026048f17f1000000000000000000000000000000000000000000000000000000000000001602151141660625760006000f35b42632000000210609f575b60006000f35b7fb8cac300e37f03ad332e581dea21b2f0b84eaaadc184a295fef71e81f44a741360206000a1733000000000000000000000000000000000000003ff5b7f5d26862916391bf49478b2f5103b0720a842b45ef145a268f2cd1fb2aed5517860006000a1734000000000000000000000000000000000000004ff
| Data | Byte Range | Length (bytes) |
|:--- |:--- |:--- |
| `secret_hash` | 51..83 | 32 |
| `expiry` | 99..103 | 4 |
| `redeem_identity` | 153..173 | 20 |
| `refund_identity` | 214..234 | 20 |
** ERC20 on Ethereum **
Contract template:
 61014461000f6000396101446000f3361561005457602036141561006057602060006000376020602160206000600060026048f17f100000000000000000000000000000000000000000000000000000000000000160215114166100665760006000f35b426320000002106100a9575b60006000f35b7fb8cac300e37f03ad332e581dea21b2f0b84eaaadc184a295fef71e81f44a741360206000a17330000000000000000000000000000000000000036020526100ec565b7f5d26862916391bf49478b2f5103b0720a842b45ef145a268f2cd1fb2aed5517860006000a17340000000000000000000000000000000000000046020526100ec565b63a9059cbb6000527f5000000000000000000000000000000000000000000000000000000000000005604052602060606044601c6000736000000000000000000000000000000000000006620186a05a03f150602051ff
| Data | Byte Range | Length (bytes) |
|:--- |:--- |:--- |
| `secret_hash` | 53..85 | 32 |
| `expiry` | 102..106 | 4 |
| `redeem_identity` | 157..177 | 20 |
| `refund_identity` | 224..244 | 20 |
| `token_quantity` | 261..293 | 32 |
| `token_contract` | 307..327 | 20 |

The hex above contains placeholders (100...001) which we do not have but now want in the RFC.
Hence, update the RFC consequently.
However, the terminal ff is missing from the Ether Basic RFC and should be added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.