Deploy and Call OCF
Deploy OCF
p
&op
: the same way they are used in BRC-20.v
: versionname
: name of OCFfunc
: define a OCF functionmust be in the format of
fn valid_if(para: &[String]) -> bool {...exp}
.the length of
params
can not exceed 10 andparams
only support the&[String]
type....exp
can only contain one expression. The current version only supports the use of operators, if branching statements and the system functions mentioned below, and does not support looping statements.For more details about the syntax of OCF, see "Basic OCF Syntax" section.
Call OCF
params
: parameters passed to the function are an array of strings.
Last updated