Closed fadeev closed 10 months ago
Right now when a user calls an omnichain contract from Bitcoin, context.origin only contains the first 20 bytes of the hex representation of the bech32 Bitcoin addres.
context.origin
So, if the address is:
tb1q2dr85d57450xwde6560qyhj7zvzw9895hq25tx
The hex representation of it is:
0x74623171326472383564353734353078776465363536307179686a377a767a7739383935687132357478
context.origin is:
0x7462317132647238356435373435307877646536
Having the full hex address in context.origin will greatly improve the developer experience of creating omnichain contracts.
Ok, I was wrong. Looks like context.origin indeed contains the whole address, the decoding function in the contract was truncating it.
Right now when a user calls an omnichain contract from Bitcoin,
context.origin
only contains the first 20 bytes of the hex representation of the bech32 Bitcoin addres.So, if the address is:
The hex representation of it is:
context.origin
is:Having the full hex address in
context.origin
will greatly improve the developer experience of creating omnichain contracts.