{"id":18775495,"url":"https://github.com/0age/rstore","last_synced_at":"2025-06-15T11:07:35.408Z","repository":{"id":121142450,"uuid":"173864408","full_name":"0age/RStore","owner":"0age","description":"RStore - use the runtime code of metamorphic contracts for dynamic storage.","archived":false,"fork":false,"pushed_at":"2023-04-16T06:42:58.000Z","size":16,"stargazers_count":19,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T09:46:47.870Z","etag":null,"topics":["contract","efficient","ethereum","metamorphic","runtime","smart-contracts","solidity","storage"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0age.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-03-05T03:15:44.000Z","updated_at":"2023-09-25T03:22:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"a26315cf-0898-4009-8741-b53dc23e2765","html_url":"https://github.com/0age/RStore","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/0age/RStore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0age%2FRStore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0age%2FRStore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0age%2FRStore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0age%2FRStore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0age","download_url":"https://codeload.github.com/0age/RStore/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0age%2FRStore/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259964328,"owners_count":22938724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["contract","efficient","ethereum","metamorphic","runtime","smart-contracts","solidity","storage"],"created_at":"2024-11-07T19:42:59.301Z","updated_at":"2025-06-15T11:07:35.402Z","avatar_url":"https://github.com/0age.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RStore\n\n![GitHub](https://img.shields.io/github/license/0age/RStore.svg?colorB=brightgreen)\n[![Build Status](https://travis-ci.org/0age/RStore.svg?branch=master)](https://travis-ci.org/0age/RStore)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)\n\n\u003e RStore - use the runtime code of metamorphic contracts for dynamic storage.\n\nThis contract uses metamorphic contracts in place of standard storage in order to save gas for certain applications. Then, `extcodecopy` is used to retrieve values from the runtime code of a metamorphic contract, which can be redeployed after a selfdestruct in order to update storage. This is bleeding-edge stuff, so use at your own risk!\n\nThere are actually two different metamorphic contracts that are used in alternating order to support single-transaction storage updates. Each caller also has their own, independent associated metamorphic storage contracts. Gas usage can almost certainly be optimized further from here - this is meant to serve as a proof-of-concept of using contract runtime code for storage.\n\n**DISCLAIMER: this implements a few highly experimental features - be sure to *educate the users of your contract* if it will rely on metamorphic contracts for storage! These contracts have not yet been fully tested or audited - proceed with caution and please share any exploits or optimizations you discover.**\n\nFor additional context and an explanation of the initialization code used to deploy metamorphic storage contracts, check out [this post](https://medium.com/@0age/on-efficient-ethereum-storage-c76869591add). \n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [API](#api)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\nTo install locally, you'll need Node.js 10+ and Yarn *(or npm)*. To get everything set up:\n```sh\n$ git clone https://github.com/0age/RStore.git\n$ cd RStore\n$ yarn install\n$ yarn build\n```\n\n## Usage\nIn a new terminal window, start the testRPC, run tests, and tear down the testRPC *(you can do all of this at once via* `yarn all` *if you prefer)*:\n```sh\n$ yarn start\n$ yarn test\n$ yarn linter\n$ yarn analyze # this takes a while and is for calculating gas usage\n$ yarn stop\n```\n\n## API\n\nSee the source code of the contracts for usage information. It's really quite simple - basically just `set(bytes calldata data)` and `get()`, plus some convenience view functions.\n\n## Maintainers\n\n[@0age](https://github.com/0age)\n\n## Contribute\n\nPRs accepted gladly - make sure the tests and linters pass.\n\n## License\n\nMIT © 2019 0age\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0age%2Frstore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0age%2Frstore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0age%2Frstore/lists"}