Feature/fee grant (#1419)
* Temporarily point cosmrs to PR branch * Expose grant allowance in client * Move functions in coconut verifier * Do execute from gateway * Explicit fee payment by granter * Include revoke grant after finishing with the op * Gateway checks the proposal content before proceeding * Clippy fixes * CHANGELOG update
This commit is contained in:
committed by
GitHub
parent
61c0092f27
commit
ad547e516a
@@ -15,13 +15,20 @@ pub struct VerifyCredentialBody {
|
||||
credential: Credential,
|
||||
#[getset(get = "pub")]
|
||||
proposal_id: u64,
|
||||
#[getset(get = "pub")]
|
||||
gateway_cosmos_addr: AccountId,
|
||||
}
|
||||
|
||||
impl VerifyCredentialBody {
|
||||
pub fn new(credential: Credential, proposal_id: u64) -> VerifyCredentialBody {
|
||||
pub fn new(
|
||||
credential: Credential,
|
||||
proposal_id: u64,
|
||||
gateway_cosmos_addr: AccountId,
|
||||
) -> VerifyCredentialBody {
|
||||
VerifyCredentialBody {
|
||||
credential,
|
||||
proposal_id,
|
||||
gateway_cosmos_addr,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -154,11 +161,16 @@ impl CosmosAddressResponse {
|
||||
pub struct ProposeReleaseFundsRequestBody {
|
||||
#[getset(get = "pub")]
|
||||
credential: Credential,
|
||||
#[getset(get = "pub")]
|
||||
gateway_cosmos_addr: AccountId,
|
||||
}
|
||||
|
||||
impl ProposeReleaseFundsRequestBody {
|
||||
pub fn new(credential: Credential) -> Self {
|
||||
ProposeReleaseFundsRequestBody { credential }
|
||||
pub fn new(credential: Credential, gateway_cosmos_addr: AccountId) -> Self {
|
||||
ProposeReleaseFundsRequestBody {
|
||||
credential,
|
||||
gateway_cosmos_addr,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,15 +184,3 @@ impl ProposeReleaseFundsResponse {
|
||||
ProposeReleaseFundsResponse { proposal_id }
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Getters, CopyGetters)]
|
||||
pub struct ExecuteReleaseFundsRequestBody {
|
||||
#[getset(get = "pub")]
|
||||
proposal_id: u64,
|
||||
}
|
||||
|
||||
impl ExecuteReleaseFundsRequestBody {
|
||||
pub fn new(proposal_id: u64) -> Self {
|
||||
ExecuteReleaseFundsRequestBody { proposal_id }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user