Overview
scripty.sol is a gas-efficient HTML builder tuned for stitching large JS based scripts together.
With scripty.sol you can build HTML files that embed JS stored on-chain. Some benefits of using scripty.sol:
Gas efficient. It utilises
DynamicBuffer
and EthFS to save huge amount of gas while storing and assembling scripts together.You can use already deployed storage solutions.
You can build modular JS based HTML files directly on-chain.
Platforms that use scripty.sol
Projects that use scripty.sol
Deployed Contracts
Ethereum Mainnet contracts:
ScriptyStorageV2 - 0x3349705FF99e44d1A42c8ea600DE7cF5bE36E034
ScriptyBuilderV2 - 0x5CEB91D612a735EC5f50Ad68c7AD22a945c602FC
ETHFSFileStorage - 0xFc7453dA7bF4d0c739C1c53da57b3636dAb0e11e
Ethereum Goerli contracts:
ScriptyStorageV2 - 0x4e2f40eef8DFBF200f3f744a9733Afe2E9F83D28
ScriptyBuilderV2 - 0xccd7E419f1EEc86fa748c9079584e3a89312f11C
ETHFSFileStorage - 0x70a78d91A434C1073D47b2deBe31C184aA8CA9Fa
Live Examples
Stacked 3D Objects Shapes - NFT1 NFT2
Both NFTs assemble PNG compressed base 64 encoded three.js
with an uncompressed demo scene. First NFT creates some 3D cubes. Second NFT gets the first NFT scene on-chain and adds spheres.
Assembles base64 encoded p5.js
that's stored in ethfs's FileStore contract with a demo scene. Metadata and animation URL are both base64 encoded.
p5js from EthFS FileStore - URL Safe
Assembles base64 encoded p5.js
that's stored in ethfs's FileStore contract with a demo scene. Metadata and animation URL are both URL encoded.
Assembles multiple uncompressed scripts that draw shapes on same <canvas></canvas>
element with a controller script that is created in NFT contract. This controller script passes some chain parameters to canvas scene.
Cube3D - GZIP Compressed - BASE64 Encoded
Assembles GZIP compressed Base64 encoded three.js
with a demo scene. Metadata and animation URL are both base64 encoded.
Cube3D - GZIP Compressed - URL Safe
Assembles GZIP compressed base64 encoded three.js
with a demo scene. Metadata and animation URL are both URL encoded.
Cube3D - PNG Compressed - URL Safe
Assembles PNG compressed base64 encoded three.js
with a demo scene. Metadata and animation URL are both URL encoded.
Cube3D - PNG Compressed - URL Safe with custom wrap
Assembles PNG compressed base64 encoded three.js
with a demo scene. Metadata and animation URL are both URL encoded. It uses custom script wraps.
ThreeJS Module - GZIP Compressed - URL Safe with custom wrap
Assembles GZIP compressed base64 encoded modular three.js
with a demo scene. Metadata and animation URL are both URL encoded. It uses custom script wraps. This is the most complex of all the examples. It demonstrates how to:
dynamically inject data into your javascript code
load gzipped javascript modules in the desired order, using gzipped es-module-shim for full browser support
embed custom javascript
make it all URL safe
Authors
Acknowledgments
DynamicBuffer - @cxkoda
Last updated