A Vyper implementation of the Starknet L1<->L2 messaging tutorial that you can find here.
contracts
├─ contract.cairo — copy of the starknet tutorial contract
├─ SolidityChannel.sol — tutorial impl. of the L1L2 contract
├─ VyperChannel.vy — vyper impl. of SolidityChannel
scripts
└─ deploy.js — deploy both channels on Goerli
You will have to deploy the starknet contract either using nile or the starknet playground.
Setup
npm install
Deploying
npx hardhat run --network goerli scripts/deploy.js
Note that the Solidity contract was not compiled with the optimizer on.
Solidity | Vyper | |
---|---|---|
Deployment | 587k gas | 240k gas |
Withdrawal | 63k gas | 60k gas |