pub trait VerificationProvider {
// Required methods
fn preflight_verify_check<'life0, 'async_trait>(
&'life0 mut self,
args: VerifyArgs,
context: VerificationContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn verify<'life0, 'async_trait>(
&'life0 mut self,
args: VerifyArgs,
context: VerificationContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn check<'life0, 'async_trait>(
&'life0 self,
args: VerifyCheckArgs,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
An abstraction for various verification providers such as etherscan, sourcify, blockscout
Required Methods§
Sourcefn preflight_verify_check<'life0, 'async_trait>(
&'life0 mut self,
args: VerifyArgs,
context: VerificationContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn preflight_verify_check<'life0, 'async_trait>(
&'life0 mut self,
args: VerifyArgs,
context: VerificationContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
This should ensure the verify request can be prepared successfully.
Caution: Implementers must ensure that this never sends the actual verify request
[VerificationProvider::verify]
, instead this is supposed to evaluate whether the given
VerifyArgs
are valid to begin with. This should prevent situations where there’s a
contract deployment that’s executed before the verify request and the subsequent verify task
fails due to misconfiguration.
Sourcefn verify<'life0, 'async_trait>(
&'life0 mut self,
args: VerifyArgs,
context: VerificationContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn verify<'life0, 'async_trait>(
&'life0 mut self,
args: VerifyArgs,
context: VerificationContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends the actual verify request for the targeted contract.