-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single party pol v2 #146
Single party pol v2 #146
Conversation
&COVENANT_CLOCK_ADDR.may_load(deps.storage)?, | ||
)?), | ||
QueryMsg::HolderAddress {} => Ok(to_json_binary(&HOLDER_ADDR.may_load(deps.storage)?)?), | ||
QueryMsg::IbcForwarderAddress { party } => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adjust to a single party query with no params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done?
// Verify percentage is < 1 and > 0 | ||
let holder_addr = HOLDER_ADDRESS | ||
.load(deps.storage) | ||
.map_err(|_| ContractError::MissingHolderError {})?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can skip this map err as in the instantiation we already do addr_validate
and then save it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are probably right, this error should never be reached in practice.
/// registers an interchain account on stride with port_id associated with `INTERCHAIN_ACCOUNT_ID` | ||
fn try_register_stride_ica(deps: DepsMut, env: Env) -> NeutronResult<Response<NeutronMsg>> { | ||
let remote_chain_info = REMOTE_CHAIN_INFO.load(deps.storage)?; | ||
let register_fee: Option<Vec<Coin>> = Some(coins(1000001, "untrn")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets make this configurable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already done right?
4a08af6
to
c6f2a85
Compare
withdrawer: Some(info.sender.to_string()), | ||
withdraw_to: Some(info.sender.to_string()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The withdrawer / withdarw_to can be not the sender, in this case we rather get it as field, and also set it to be not optional.
The reason I kept it optional is because the parties can start the covenant and decide on what the addresses are at later point of time.
QueryMsg::DepositAddress {} => { | ||
let ica = query_deposit_address(deps, env)?; | ||
// up to the querying module to make sense of the response | ||
Ok(to_json_binary(&ica)?) | ||
let ica = get_ica(deps, &env, INTERCHAIN_ACCOUNT_ID)?.0; | ||
|
||
let autopilot = Autopilot { | ||
autopilot: AutopilotConfig { | ||
receiver: ica.to_string(), | ||
stakeibc: crate::helpers::Stakeibc { | ||
action: "LiquidStake".to_string(), | ||
stride_address: ica, | ||
}, | ||
}, | ||
}; | ||
|
||
let autopilot_str = to_json_string(&autopilot)?; | ||
|
||
Ok(to_json_binary(&autopilot_str)?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ehm what?
@@ -68,17 +68,40 @@ func (testCtx *TestContext) Tick(clock string, keyring string, from string) { | |||
testCtx.SkipBlocks(3) | |||
} | |||
|
|||
func (testCtx *TestContext) SkipBlocks(n int) { | |||
func (testCtx *TestContext) TickStride(clock string, keyring string, from string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats the diff between that and the normal tick?
Finished with the astroport lper withdraw change.
Finished with the single party holder logic.
Creating a "smaller" PR, before doing the double sided holder changes.