Skip to content

Fund etched contract for storage deposit#495

Closed
filip-parity wants to merge 1 commit intomasterfrom
filip/etched_deposit
Closed

Fund etched contract for storage deposit#495
filip-parity wants to merge 1 commit intomasterfrom
filip/etched_deposit

Conversation

@filip-parity
Copy link
Copy Markdown

Fund the etched contract so it can pay for storage deposits in Polkadot's storage deposit model, contracts need balance to store data.

Comment thread crates/revive-strategy/src/state.rs Outdated
contract_info,
);

Pallet::<Runtime>::set_evm_balance(&target_address, u128::MAX.into())
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use balance from ECX side?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed this

@pkhry
Copy link
Copy Markdown

pkhry commented Jan 19, 2026

can you add a repro test case?

Comment thread crates/revive-strategy/src/state.rs Outdated
.load_account(*target)
.map(|acc| acc.info.balance)
.unwrap_or_default();
// Ensure minimum balance for storage deposits if the account has no balance set.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if no balance is set how the caller will paid for call execution? I guess it should fail even in the foundry REVM?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're setting balance for the callee to pay storage deposits. It doesn't fail in standard REVM because storage doesn't cost balance there.

Comment thread crates/revive-strategy/src/state.rs Outdated
@filip-parity
Copy link
Copy Markdown
Author

can you add a repro test case?

Added this

@filip-parity filip-parity deleted the filip/etched_deposit branch January 20, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants