Contract Operations
Thinking of deploying your own contract? See here.
Last updated
Thinking of deploying your own contract? See here.
Last updated
We do not immediately provide contract operations from the package; however, if you are to clone the repository, we have prepared some utility scripts that allows you to build, deploy, and evolve a HollowDB contract.
This command will build the contract from source. The contract is written in TypeScript, but to deploy using Warp you require the contract code in JS. We use ESBuild to compile & bundle the TS contract into a concise single-file JS code. This will generate the bundled contract under build/hollowdb.js
.
Note that this requires Node version at least 18.
This will deploy your contract which you have just built and is stored under build/hollowDB/contract.js
. As for the actual wallet to be used, it will look for an Arweave wallet at ./config/wallets/wallet-name.json
.
The optional groth16
or plonk
argument, if given, will also provide the verification key in the initial state, so that you don't have to manually set it on deployment.
Always .gitignore
your wallet files!
This command will evolve your contract, it takes a wallet name and the contract transaction id of the old contract. To learn more about evolving, check .