/starknet-messaging-vyper

A Vyper version of the Starknet messaging example.

Primary LanguageSolidityGNU Affero General Public License v3.0AGPL-3.0

Starknet Messaging Vyper

A Vyper implementation of the Starknet L1<->L2 messaging tutorial that you can find here.

Structure

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

Development

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

Solidity vs Vyper

Note that the Solidity contract was not compiled with the optimizer on.

Solidity Vyper
Deployment 587k gas 240k gas
Withdrawal 63k gas 60k gas