update forwarder code check (#255)

This commit is contained in:
noot
2022-12-09 15:00:20 -05:00
committed by GitHub
parent f9aaa5e9d1
commit a25f62ee3d

View File

@@ -107,7 +107,9 @@ func checkForwarderContractCode(
expectedCode := ethcommon.FromHex(gsnforwarder.ForwarderMetaData.Bin)
if !bytes.Contains(expectedCode, code) {
// expectedCode is the compiled code, while code is the deployed bytecode.
// the deployed bytecode is a subset of the compiled code.
if !bytes.Equal(expectedCode[705:9585], code) {
return errInvalidForwarderContract
}