Error: nothing matched in oneOf, Error: Required properties "context" are missing
Closed this issue · 2 comments
bnonni commented
Error at step 6 Instantiate a contract from the plugin.
Had to run a different command than in the install doc. See #151 for context on that command.
Ran this from within the treepay/
folder.
sapio-cli contract create \{\"amount\":9.99,\"arguments\":\{\"Basic\":\{\"fee_sats_per_tx\":1000,\"participants\":\[\{\"address\":\"bcrt1qs758ursh4q9z627kt3pp5yysm78ddny6txaqgw\",\"amount\":2.99\}\],\"radix\":2\}\},\"network\":\"Regtest\"\} --file="pkg/sapio_wasm_plugin_example_bg.wasm"
Got this output error:
Error: nothing matched in oneOf
At instance path /arguments:
{
"Basic": {
"fee_sats_per_tx": 1000,
"participants": [
{
"address": "bcrt1qs758ursh4q9z627kt3pp5yysm78ddny6txaqgw",
"amount": 2.99
}
],
"radix": 2
}
}
At schema path /properties/arguments/allOf/0/oneOf:
[
{
"additionalProperties": false,
"properties": {
"TreePay": {
"$ref": "#/definitions/TreePay"
}
},
"required": [
"TreePay"
],
"title": "Standard Tree Pay",
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"Advanced": {
"properties": {
"main_arguments": {
"allOf": [
{
"$ref": "#/definitions/TreePay"
}
],
"title": "Standard Tree Pay"
},
"random_field": {
"format": "uint8",
"minimum": 0.0,
"title": "A Random Field For Example",
"type": "integer"
}
},
"required": [
"main_arguments",
"random_field"
],
"type": "object"
}
},
"required": [
"Advanced"
],
"title": "Advanced Tree Pay",
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"BatchingTraitVersion0_1_1": {
"$ref": "#/definitions/BatchingTraitVersion0_1_1"
}
},
"required": [
"BatchingTraitVersion0_1_1"
],
"title": "Batching Trait API",
"type": "object"
}
]
Error: Required properties "context" are missing
At instance path /:
{
"amount": 9.99,
"arguments": {
"Basic": {
"fee_sats_per_tx": 1000,
"participants": [
{
"address": "bcrt1qs758ursh4q9z627kt3pp5yysm78ddny6txaqgw",
"amount": 2.99
}
],
"radix": 2
}
},
"network": "Regtest"
}
At schema path /required:
[
"arguments",
"context"
]
JeremyRubin commented
absolutely right; i forgot to update this :)
JeremyRubin commented
fixed