Skip to content

Expose storage byte cost to the runtime #272

@ilblackdragon

Description

@ilblackdragon

Contracts should know what is the current storage cost.
Currently all contracts have a hard coded value of the current storage cost, which if protocol will reduce it - means that contract continues to charge extra for storage.

Currently SDK has a function storage_byte_cost and a TODO to use a host function which is absent: https://github.com/near/near-sdk-rs/blob/d69e9054e602f808c4504e2007c25f4bd9ec7f53/near-sdk/src/environment/env.rs#L594

Proposal is to expose the storage byte cost as a host function that SDKs can leverage.

Relevant discussion is to expose various protocol parameters to the runtime: https://gov.near.org/t/store-protocol-config-in-a-contract/2105

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

NEW❗

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions