smart escrow devnet 1 host functions (#5353)

* devnet 1 host functions

* clang-format

* fix build issues
This commit is contained in:
pwang200
2025-03-24 17:07:17 -04:00
committed by GitHub
parent 911c0466c0
commit 1573a443b7
11 changed files with 2625 additions and 5119 deletions

View File

@@ -1672,22 +1672,22 @@ struct Escrow_test : public beast::unit_test::suite
// Tests whether the ledger index is >= 5
// #[no_mangle]
// pub fn ready() -> bool {
// unsafe { host_lib::get_ledger_sqn() >= 5}
// unsafe { host_lib::getLedgerSqn() >= 5}
// }
static auto wasmHex =
"0061736d010000000105016000017f021b0108686f73745f6c69620e6765745f6c"
"65646765725f73716e0000030201000405017001010105030100100619037f0141"
"8080c0000b7f00418080c0000b7f00418080c0000b072d04066d656d6f72790200"
"05726561647900010a5f5f646174615f656e6403010b5f5f686561705f62617365"
"03020a0d010b0010808080800041044a0b006e046e616d65000e0d7761736d5f6c"
"69622e7761736d01430200395f5a4e387761736d5f6c696238686f73745f6c6962"
"31346765745f6c65646765725f73716e3137686663383539386237646539633036"
"64624501057265616479071201000f5f5f737461636b5f706f696e746572005509"
"70726f64756365727302086c616e6775616765010452757374000c70726f636573"
"7365642d62790105727573746325312e38332e302d6e696768746c792028633266"
"37346333663920323032342d30392d30392900490f7461726765745f6665617475"
"726573042b0a6d756c746976616c75652b0f6d757461626c652d676c6f62616c73"
"2b0f7265666572656e63652d74797065732b087369676e2d657874";
"0061736d010000000105016000017f02190108686f73745f6c69620c6765744c65"
"6467657253716e0000030201000405017001010105030100100619037f01418080"
"c0000b7f00418080c0000b7f00418080c0000b072d04066d656d6f727902000572"
"6561647900010a5f5f646174615f656e6403010b5f5f686561705f626173650302"
"0a0d010b0010808080800041044a0b006c046e616d65000e0d7761736d5f6c6962"
"2e7761736d01410200375f5a4e387761736d5f6c696238686f73745f6c69623132"
"6765744c656467657253716e313768303033306666356636376562356638314501"
"057265616479071201000f5f5f737461636b5f706f696e74657200550970726f64"
"756365727302086c616e6775616765010452757374000c70726f6365737365642d"
"62790105727573746325312e38332e302d6e696768746c79202863326637346333"
"663920323032342d30392d30392900490f7461726765745f666561747572657304"
"2b0a6d756c746976616c75652b0f6d757461626c652d676c6f62616c732b0f7265"
"666572656e63652d74797065732b087369676e2d657874";
{
// featureSmartEscrow disabled
@@ -1827,22 +1827,22 @@ struct Escrow_test : public beast::unit_test::suite
// Tests whether the ledger index is >= 5
// #[no_mangle]
// pub fn ready() -> bool {
// unsafe { host_lib::get_ledger_sqn() >= 5}
// unsafe { host_lib::getLedgerSqn() >= 5}
// }
static auto wasmHex =
"0061736d010000000105016000017f021b0108686f73745f6c69620e6765745f6c"
"65646765725f73716e0000030201000405017001010105030100100619037f0141"
"8080c0000b7f00418080c0000b7f00418080c0000b072d04066d656d6f72790200"
"05726561647900010a5f5f646174615f656e6403010b5f5f686561705f62617365"
"03020a0d010b0010808080800041044a0b006e046e616d65000e0d7761736d5f6c"
"69622e7761736d01430200395f5a4e387761736d5f6c696238686f73745f6c6962"
"31346765745f6c65646765725f73716e3137686663383539386237646539633036"
"64624501057265616479071201000f5f5f737461636b5f706f696e746572005509"
"70726f64756365727302086c616e6775616765010452757374000c70726f636573"
"7365642d62790105727573746325312e38332e302d6e696768746c792028633266"
"37346333663920323032342d30392d30392900490f7461726765745f6665617475"
"726573042b0a6d756c746976616c75652b0f6d757461626c652d676c6f62616c73"
"2b0f7265666572656e63652d74797065732b087369676e2d657874";
"0061736d010000000105016000017f02190108686f73745f6c69620c6765744c65"
"6467657253716e0000030201000405017001010105030100100619037f01418080"
"c0000b7f00418080c0000b7f00418080c0000b072d04066d656d6f727902000572"
"6561647900010a5f5f646174615f656e6403010b5f5f686561705f626173650302"
"0a0d010b0010808080800041044a0b006c046e616d65000e0d7761736d5f6c6962"
"2e7761736d01410200375f5a4e387761736d5f6c696238686f73745f6c69623132"
"6765744c656467657253716e313768303033306666356636376562356638314501"
"057265616479071201000f5f5f737461636b5f706f696e74657200550970726f64"
"756365727302086c616e6775616765010452757374000c70726f6365737365642d"
"62790105727573746325312e38332e302d6e696768746c79202863326637346333"
"663920323032342d30392d30392900490f7461726765745f666561747572657304"
"2b0a6d756c746976616c75652b0f6d757461626c652d676c6f62616c732b0f7265"
"666572656e63652d74797065732b087369676e2d657874";
{
// basic FinishFunction situation