Skip to content

Commit

Permalink
Merge pull request #793 from rainlanguage/2024-08-26-handle-add-order
Browse files Browse the repository at this point in the history
replacing the 'post-add-order' naming with 'handle-add-order'
  • Loading branch information
thedavidmeister authored Aug 26, 2024
2 parents 52ca363 + 2fecd16 commit dc1b02e
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion crates/cli/src/commands/order/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ deployments:
_ _: 0 0;
#handle-io
:;
#post-add-order
#handle-add-order
:;"
.to_string()
}
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/commands/order/calldata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ deployments:
_ _: 0 0;
#handle-io
:;
#post-add-order
#handle-add-order
:;",
rpc_server.url("/rpc").as_str()
);
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/commands/order/compose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ scenarios:
_ _: 0 0;
#handle-io
:;
#post-add-order
#handle-add-order
:;"
.to_string()
}
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/commands/order/orderbook_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ deployments:
_ _: 0 0;
#handle-io
:;
#post-add-order
#handle-add-order
:;",
orderbook_key
)
Expand Down
8 changes: 4 additions & 4 deletions crates/common/src/add_order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use std::collections::HashMap;
use thiserror::Error;

pub static ORDERBOOK_ORDER_ENTRYPOINTS: [&str; 2] = ["calculate-io", "handle-io"];
pub static ORDERBOOK_ADDORDER_POST_TASK_ENTRYPOINTS: [&str; 1] = ["post-add-order"];
pub static ORDERBOOK_ADDORDER_POST_TASK_ENTRYPOINTS: [&str; 1] = ["handle-add-order"];

#[derive(Error, Debug)]
pub enum AddOrderArgsError {
Expand Down Expand Up @@ -543,7 +543,7 @@ some front matter
_ _: 0 0;
#handle-io
:;
#post-add-order
#handle-add-order
_ _: 0 0;
"#;
let result = AddOrderArgs::new_from_deployment(dotrain.to_string(), deployment)
Expand Down Expand Up @@ -680,7 +680,7 @@ some front matter
_ _: 0 0;
#handle-io
:;
#post-add-order
#handle-add-order
_ _: 0 0;
"#;
let result = AddOrderArgs::new_from_deployment(dotrain.to_string(), deployment.clone())
Expand All @@ -689,6 +689,6 @@ _ _: 0 0;

let post_action = result.compose_addorder_post_task().unwrap();

assert_eq!(post_action, "/* 0. post-add-order */ \n_ _: 0 0;");
assert_eq!(post_action, "/* 0. handle-add-order */ \n_ _: 0 0;");
}
}
4 changes: 2 additions & 2 deletions crates/common/src/dotrain_order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ scenarios:
_ _: 0 0;
#handle-io
:;
#post-add-order
#handle-add-order
_ _: 1 2;
"#,
rpc_url = rain_orderbook_env::CI_DEPLOY_POLYGON_RPC_URL
Expand All @@ -280,7 +280,7 @@ _ _: 1 2;

assert_eq!(
rainlang,
r#"/* 0. post-add-order */
r#"/* 0. handle-add-order */
_ _: 1 2;"#
);
}
Expand Down
4 changes: 2 additions & 2 deletions crates/integration_tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ deployments:
#calculate-io
using-words-from 0xe80e7438ce6b1055c8e9CDE1b6336a4F9D53C666
amount price: get("amount") 52;
#post-add-order
#handle-add-order
:set("amount" 100);
#handle-io
:;
Expand Down Expand Up @@ -236,7 +236,7 @@ deployments:
amount price: get("amount") 52;
#handle-io
:;
#post-add-order
#handle-add-order
:ensure(0 "should fail");
"#,
rpc_url = anvil.endpoint()
Expand Down
4 changes: 2 additions & 2 deletions test-js/common/test.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ deployments:
_ _: 0 0;
#handle-io
:;
#post-add-order
#handle-add-order
:;
`;

Expand Down Expand Up @@ -123,7 +123,7 @@ deployers:
_ _: 0 0;
#handle-io
:;
#post-add-order
#handle-add-order
:;
`;
await getAddOrderCalldata(dotrain, "some-deployment");
Expand Down

0 comments on commit dc1b02e

Please sign in to comment.