-
Notifications
You must be signed in to change notification settings - Fork 51
chain: Wireup go-owasm with blockchain properly #1934
Conversation
Your Render PR Server URL is https://d3n-scan-pr-1934.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-brgvdkh8vr2di7lo9ob0. |
Your Render PR Server at https://d3n-scan-pr-1934.onrender.com is now live! View it on your dashboard at https://dashboard.render.com/static/srv-brgvdkh8vr2di7lo9ob0. |
0daf736
to
65fe57b
Compare
Your Render PR Server at https://d3n-scan-pr-1934.onrender.com is now live! View it on your dashboard at https://dashboard.render.com/static/srv-brgvdkh8vr2di7lo9ob0. |
Your Render PR Server at https://d3n-scan-pr-1934.onrender.com is now live! View it on your dashboard at https://dashboard.render.com/static/srv-brgvdkh8vr2di7lo9ob0. |
Your Render PR Server at https://d3n-scan-pr-1934.onrender.com is now live! View it on your dashboard at https://dashboard.render.com/static/srv-brgvdkh8vr2di7lo9ob0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add validate basic to ensure that you can't create do-not-modify data sources or oracle scripts.
chain/x/oracle/common_test.go
Outdated
} | ||
|
||
func mustGetOwasmCode(filename string) []byte { | ||
absPath, _ := filepath.Abs(fmt.Sprintf("../../pkg/owasm/res/%s", filename)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move out of this legacy pkg/owasm
. We can create testfiles
folder in x/oracle
chain/x/oracle/keeper/common_test.go
Outdated
@@ -66,14 +68,19 @@ func getTestDataSource(executable string) (ds types.DataSource, clear func()) { | |||
} | |||
|
|||
func getTestOracleScript() (os types.OracleScript, clear func()) { | |||
absPath, _ := filepath.Abs("../../../pkg/owasm/res/beeb.wasm") | |||
code, err := ioutil.ReadFile(absPath) | |||
absPath, _ := filepath.Abs("../../../pkg/owasm/res/beeb.wat") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also here
chain/x/oracle/types/error.go
Outdated
@@ -41,6 +41,7 @@ var ( | |||
ErrCreateWithDoNotModify = sdkerrors.Register(ModuleName, 34, "create with [do-not-modify] content") | |||
ErrSelfReferenceAsReporter = sdkerrors.Register(ModuleName, 35, "cannot reference self as reporter") | |||
ErrOBIDecode = sdkerrors.Register(ModuleName, 36, "cannot obi decode") | |||
ErrCompileFailed = sdkerrors.Register(ModuleName, 37, "owasm compile failed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ErrOwasmCompilation ... owasm compilation failed
455c4fc
to
86b7d64
Compare
a4e40c6
to
1303625
Compare
fixed #1868