OffchainLabs / stylus-sdk-rs

Rust Smart Contracts on Arbitrum
239 stars 79 forks source link

Add options for limiting or skipping revert data in RawDeploy #146

Open rory-ocl opened 2 months ago

rory-ocl commented 2 months ago

The following methods have been temporarily removed as they were not fully implemented yet.

    /// Configures what portion of the revert data to copy in case of failure.
    /// Does not fail if out of bounds, but rather copies the overlapping portion.
    pub fn limit_revert_data(mut self, offset: usize, size: usize) -> Self {
        self.offset = offset;
        self.size = Some(size);
        self
    }

    /// Configures the call to avoid copying any revert data.
    /// Equivalent to `limit_revert_data(0, 0)`.
    pub fn skip_revert_data(self) -> Self {
        self.limit_revert_data(0, 0)
    }

These arguments will need to be added to hostios in order to be supported here.

rory-ocl commented 2 months ago

These fields on RawDeploy can be re-added as well:

    offset: usize,
    size: Option<usize>,