You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this example program, we want to we want to generate a WIT file that includes a this Config (maybe record?) from the Acl and SatisfiableForArchitecture<Architecture>, resulting in ConfigBtc, ConfigEvm, etc.
packageusername:acluseentropy:coreworldacl {
exportevaluate: func(config:config-eth) ->result<_, error>
exportevaluate: func(config:config-btc) ->result<_, error>
recordconfig-eth {
/// The preimage of the user's data under constraint evaulation (eg. RLP-encoded ETH transaction request).addresses:list<list<u8>>
kind: (whateverWITenumis)
allow_null_recipient: bool
}
recordconfig-btc {
addresses:list<list<u8>>
kind: (whateverWITenumis)
allow_null_recipient: bool
}
... you get the idea
}
We should probably generate a WIT record and evaluate export from each SatisfiableForArchitecture monomorphic function (or whatever related trait is appropriate by then).
The text was updated successfully, but these errors were encountered:
The only other option is to hand-code each WIT file and then generate types from it, which is needlessly tedious.
Let's use a simple EVM ACL whitelisting program as an example. In this case, the configuration for the ACL is quite literally just the ACL struct:
Since we have implemented
SatisfiableByArchitecture
, the following evaluation logic is included in the Wasm blob:Before doing this, we should rewrite evaluation in an
Architecture
generic way eg.In this example program, we want to we want to generate a WIT file that includes a this Config (maybe
record
?) from theAcl
andSatisfiableForArchitecture<Architecture>
, resulting inConfigBtc
,ConfigEvm
, etc.We should probably generate a WIT record and
evaluate
export from eachSatisfiableForArchitecture
monomorphic function (or whatever related trait is appropriate by then).The text was updated successfully, but these errors were encountered: