Add basic deployment flows#84
Conversation
A couple of TODOs and tests left
|
Thoughts @noahsaso ? |
Also improves avs deploy data schema
|
I have not looked at the code yet, but giving first comments based on the description: It seems like duplicate code_ids here. but maybe this is just how cw-orch works:
I like the JSON config file for avs setup - this really is too much for CLI args: In general, it looks like this fufills the requirements. I will dig into the code soon, but curious about the repeated code_ids. |
avoid duplicate wasm uploads in avs consumer too
Yep, cw-orch loads information by ID. We use the default id ("cw20_base", "rstk_fan_out", "rstk_token_staking") to upload the wasm. When we want to instantiate, we provide a more specific contract id and just load up the already uploaded code id. |
|
backtrace |
|
It would help if you include the command that you ran that caused the error. I just tried |
|
Okay, I went through the README.md and hit that error message upon I cannot find better stack traces. However, I did look at http://localhost:8080/ and searched for I see a number of results, but I waited a few minutes and kept trying to run that command above: It kept erroring, but nothing was written to the chain. This makes me think it is somewhere inside the cw-orch logic. |
|
I found the issue after using some lower level cw-orch API let rt = tokio::runtime::Runtime::new().unwrap();
let _ = rt.block_on(chain.daemon.sender.commit_tx(
vec![MsgExecuteContract {
sender: chain.sender().to_string().parse().unwrap(),
contract: staking_provider.staking.addr_str()?.parse().unwrap(),
msg: to_json_binary(&rstk_token_staking::msg::ExecuteMsg::Custom(
rstk_token_staking::msg::TokenStakingExecuteMsg::Stake {},
))?
.to_vec(),
funds: vec![cosmrs::Coin {
denom: denom.parse().unwrap(),
amount,
}],
}],
None,
));I think the issue is coming from cw-orch's internal usage of cosmrs Denom not allowing a colon to be parsed: impl FromStr for Denom {
type Err = ErrorReport;
fn from_str(s: &str) -> Result<Self> {
// TODO(tarcieri): ensure this is the proper validation for a denom name
if s.chars()
.all(|c| matches!(c, 'A'..='Z' | 'a'..='z' | '0'..='9' | '/'))
{
Ok(Denom(s.to_owned()))
} else {
Err(Error::Denom { name: s.to_owned() }.into())
}
}
}There is a |
found and fixed an issue in flow connection
ueco-jb
left a comment
There was a problem hiding this comment.
Good work and I really like the documentation. Few nitpicks and questions.
Co-authored-by: Jakub Bogucki <jakub@moonbite.space>


Closes #69
New CLI config
Example avs json config
{ "name": "Squaring AVS", "fan_in": { "reference_denom": { "denom": "uslay" }, "secondary_denoms": [ { "denom": "cw20:layer16averdvvj9xxv5znx6w4fmatafjq3f0n2l8tf6al7r6v5ycaqunql4n0ug", "weight": "0.5", "max_cap": "1.5" } ] }, "delegations": { "delegation_limit": 16 }, "operators": { "can_update_operators": true } }A full AVS flow for 1 reference token and 1 cw20 secondary will generate:
{ "slay3r": { "slay3r-local": { "code_ids": { "cw20_base": 13, "cw20_base_ROCKS": 13, "rstk_delegations": 15, "rstk_delegations_Squaring AVS": 15, "rstk_fan_in": 14, "rstk_fan_in_Squaring AVS": 14, "rstk_fan_out": 12, "rstk_fan_out_cw20:layer1y9euzva5zsg8k6l9kzdeyj64gxpdejw2cfmmsm9md5jugwj8hhlsfcwfnf": 12, "rstk_fan_out_uslay": 12, "rstk_operators": 16, "rstk_operators_Squaring AVS": 16, "rstk_token_staking": 11, "rstk_token_staking_cw20:layer1y9euzva5zsg8k6l9kzdeyj64gxpdejw2cfmmsm9md5jugwj8hhlsfcwfnf": 11, "rstk_token_staking_uslay": 11, "rstk_token_weighting": 17, "rstk_token_weighting_Squaring AVS": 17 }, "default": { "cw20_base_ROCKS": "layer1y9euzva5zsg8k6l9kzdeyj64gxpdejw2cfmmsm9md5jugwj8hhlsfcwfnf", "rstk_delegations_Squaring AVS": "layer1nlax07f2stkferemjdxm7r603aj8guzeftup4cltdxr4p45tskks8vqlqp", "rstk_fan_in_Squaring AVS": "layer1avp6ks3uwhj9xjeppw3w6r3f6gtzcnzy2w53ttweupzjsntt4xhs5eav3a", "rstk_fan_out_cw20:layer1y9euzva5zsg8k6l9kzdeyj64gxpdejw2cfmmsm9md5jugwj8hhlsfcwfnf": "layer1fjmac46wxl0v829tnee6zt6jm2d578m0frj3cp73r4nk5ngfl64srwl69v", "rstk_fan_out_uslay": "layer1pylwkt0kzds5cd9pl7ch3l5yr3672gzuzede9gags8kxyuxqj4psxxeq2q", "rstk_operators_Squaring AVS": "layer1mfqrh2lvccnwyrhujlx48q6gynm5zx9mw92x84ryc38ud0kefvds82ckav", "rstk_token_staking_cw20:layer1y9euzva5zsg8k6l9kzdeyj64gxpdejw2cfmmsm9md5jugwj8hhlsfcwfnf": "layer1ugr4j3g7a9gjcf0xguj4pnal6g2fjd4895yrt7856jqjhyr80xeqqht482", "rstk_token_staking_uslay": "layer18arpcdc9af4a5aej9x7nk78pw8vrjfzglcxgul7d3myrna9r6zasg4eg6e", "rstk_token_weighting_Squaring AVS": "layer1809h7c4hw5jqkzmlsap38ed2n6vgv7wslmuh7maqe9v0sstvl69q8449ma" } } } }TODO: