@pcrafter, any idea what's wrong? In the code compiled there are strange symbols ;/
Jul 20, 2023, 8:10 AM
Do you have latest Asm.fif?
Jul 20, 2023, 8:12 AM
good question 🙂
I'm using func-js 0.6.3-tvmbeta.1, maybe that's the reason (but 0.6.2 doesn't compile that)... maybe should I try any command line compiler
Jul 20, 2023, 8:14 AM
x{F9126FA16FA56C31} seems like incorrectly defined opcode.
Jul 20, 2023, 8:15 AM
for func code compiler i get
`recover PROC:<{
10090803140203886091563240426283255598005902732368756496576720469156907155070 PUSHINT
47520574234967277554402655190042416396654055806875102599635844528129557311962 PUSHINT
7936653582824629768649442058906672831216504652965602974872621088664590375610 PUSHINT
27 PUSHINT
-ROT
ECRECOVER NULLSWAPIFNOT NULLSWAPIFNOT2
3 1 BLKDROP2
}>`
that seems to be ok, but I cannot generate boc, wrr unknown-location: error: Realpath failed for "-W"
`recover PROC:<{
10090803140203886091563240426283255598005902732368756496576720469156907155070 PUSHINT
47520574234967277554402655190042416396654055806875102599635844528129557311962 PUSHINT
7936653582824629768649442058906672831216504652965602974872621088664590375610 PUSHINT
27 PUSHINT
-ROT
ECRECOVER NULLSWAPIFNOT NULLSWAPIFNOT2
3 1 BLKDROP2
}>`
that seems to be ok, but I cannot generate boc, wrr unknown-location: error: Realpath failed for "-W"
I can't compile the proper fift. I even have built the fift and func compilers from source and have taken the crypto/fift/lib but still,
[ 1][t 0][2023-07-20 10:43:32.421392][Fift.cpp:67] top:
level 1:
level 2:
[ 1][t 0][2023-07-20 10:43:32.421412][fift-main.cpp:204] Error interpreting file `adapter.fif`: adapter.fif:212: ECRECOVER:-?
So sth is wrong. And also Howard did answer:
Nah, the update haven't implement in test-net.
So idk, how to make it working ;/
[ 1][t 0][2023-07-20 10:43:32.421392][Fift.cpp:67] top:
level 1:
level 2:
[ 1][t 0][2023-07-20 10:43:32.421412][fift-main.cpp:204] Error interpreting file `adapter.fif`: adapter.fif:212: ECRECOVER:-?
So sth is wrong. And also Howard did answer:
Nah, the update haven't implement in test-net.
So idk, how to make it working ;/
did someone achieve that ECRECOVER working ;)?
Jul 20, 2023, 10:46 AM
yes
@sepezho has example i think
Jul 20, 2023, 10:47 AM
could you send me ;)?
Jul 20, 2023, 10:47 AM
github.com/evaafi/redstone-price-verify
Jul 20, 2023, 10:49 AM
Thanks a lot!
Jul 20, 2023, 10:52 AM
u r welcome
Jul 20, 2023, 10:53 AM
but, you're using blueprint, yes?
not testnet ;/
Jul 20, 2023, 10:58 AM
You mean the testing?
Jul 20, 2023, 10:59 AM
no, deploying to tesnet
Jul 20, 2023, 11:00 AM
well, if you need to, you can deploy it
but this contract is actually quite simple - it just checks the signature from EVM
Jul 20, 2023, 11:01 AM
yes, I know, but after deploying it, the code contains strange symbols, not asms:
https://testnet.tonviewer.com/kQC5Jy-mewmkiv69PM-0w9lXoHH5fIbDQDlKqtm4VTNRfUuL?section=Source+code
https://testnet.tonviewer.com/kQC5Jy-mewmkiv69PM-0w9lXoHH5fIbDQDlKqtm4VTNRfUuL?section=Source+code
Jul 20, 2023, 11:01 AM
because this code has been compiled from FunC
func -> fift -> bytecode
you can find disassembled btn on the site to se fift code
func -> fift -> bytecode
you can find disassembled btn on the site to se fift code
Jul 20, 2023, 11:03 AM
I'll try to deploy your clean contract
and there are
...
27 PUSHINT
ROTREV
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
...
instead of ECRECOVER ...
...
27 PUSHINT
ROTREV
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
...
instead of ECRECOVER ...
Jul 20, 2023, 11:04 AM
try to rebuild & redeploy contract
npx blueprint build
npx blueprint build
Jul 20, 2023, 11:07 AM
same as in my example: Error: Unable to execute get method. Got exit_code: 6
(on testnet)
Jul 20, 2023, 11:33 AM
...
27 PUSHINT
ROTREV
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
...
27 PUSHINT
ROTREV
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
x{F9126FA16FA56C31}
...
Jul 20, 2023, 11:34 AM
where did you get this error from?
If lite-client - it is ok: lite-client doesn't use network config yet and thus ecrecover opcode there won't be active
If you are using tonlib - please rebuild from testnet branch
If lite-client - it is ok: lite-client doesn't use network config yet and thus ecrecover opcode there won't be active
If you are using tonlib - please rebuild from testnet branch
Jul 20, 2023, 11:48 AM
Thx, I’ll check it soon
at TonClient.runMethod (/node_modules/ton/dist/client/TonClient.js:55:19)
Jul 20, 2023, 2:03 PM
it looks like js wrapper around tonlib. In this case you need update libtonlibjson.so from testnet branch
Jul 20, 2023, 2:04 PM
I'll check, thx 😉
this one I've used, the same effect
Jul 21, 2023, 9:28 AM
Download state from blockchain and Call emulator. Tdlib on remote server could be outdated
Jul 21, 2023, 9:29 AM
Looks like I mislead you here
Jul 21, 2023, 9:30 AM