Conversation
bowenwang1996
left a comment
There was a problem hiding this comment.
Shouldn't we check attached_deposit can at least cover storage for the contract?
| /// Stores attached data into blob store and returns hash of it. | ||
| /// Implemented to avoid loading the data into WASM for optimal gas usage. | ||
| #[cfg(target_arch = "wasm32")] |
There was a problem hiding this comment.
should we consider exposing some better API for this?
There was a problem hiding this comment.
we should, but this is outside of this PR. Filed: near/near-sdk-rs#442 and near/near-sdk-rs#441
There was a problem hiding this comment.
near/near-sdk-rs#417 has been sitting for about a month, I can try to push for finalizing scope of the next release and getting there soon
There was a problem hiding this comment.
actually, you wouldn't need to wait for any release, can just define the interface that the BLOCKCHAIN_INTERFACE goes through and it should reduce contract size.
I'll do this now so there is an example, and any workflow to test the functionality would be appreciated
There was a problem hiding this comment.
#149 figured PR would be the easiest way to see changes. And the sys interface wasn't needed to be duplicated as it's included in near_bindgen right now.
updated `create` example
…FACE for wasm env (#149) * improve interface and remove need to go through BLOCKCHAIN_INTERFACE for wasm32 only function * update internal create to not use BLOCKCHAIN_INTERFACE for wasm env * update to 4.0.0-pre.1 to remove duplicate code
This is factory that allows to deploy any contracts that are stored inside it.
Anyone can store a contract and anyone else can use hash to deploy it with various parameters and calling initializer.