StarkBeats is an experiment for an onchain music tracker on Starknet.
For alpha version only notes and scores will be stored onchain, audio synthesis will be done on client side.
For beta version synthesis parameters will be stored onchain.
FROM ubuntu:22.04 | |
LABEL org.opencontainers.image.authors="[email protected]" | |
ARG USER=rob | |
ARG USER_ID=1000 | |
ARG GROUP=starknet | |
ARG GROUP_ID=1000 | |
# Create new user | |
RUN \ |
import 'package:starknet/starknet.dart'; | |
import 'erc.sierra.g.dart'; | |
void main() async { | |
Felt contractAddress = Felt.fromHexString( | |
"0x53813135446812b36f67e5b363813df086d88544ce17c742376082b8e997e29"); | |
final account = account0; | |
final erc20 = Erc(account: account, address: contractAddress); |
[package] | |
name = "splitter" | |
version = "0.1.0" | |
[dependencies] | |
starknet = ">=2.0.1" | |
[[target.starknet-contract]] | |
sierra = true | |
casm = true |
StarkBeats is an experiment for an onchain music tracker on Starknet.
For alpha version only notes and scores will be stored onchain, audio synthesis will be done on client side.
For beta version synthesis parameters will be stored onchain.
// SPDX-License-Identifier: MIT | |
// Compatible with OpenZeppelin Contracts for Cairo ^0.15.0 | |
#[starknet::contract] | |
mod MyToken { | |
use openzeppelin::introspection::src5::SRC5Component; | |
use openzeppelin::token::erc721::ERC721Component; | |
use openzeppelin::token::erc721::ERC721HooksEmptyImpl; | |
use openzeppelin::token::erc721::interface::{IERC721Metadata, IERC721MetadataCamelOnly}; |
#[derive(Drop, Serde, Copy, PartialEq, Debug, starknet::Store)] | |
pub enum Choice { | |
STRK, | |
BTC, | |
} | |
#[starknet::interface] | |
pub trait IHelloStarknet<TContractState> { | |
fn create_elem(ref self: TContractState, choice: Choice) -> u256; | |
fn get_elem(self: @TContractState, elem_id: u256) -> Choice; |
fn main() { | |
hack(); | |
} | |
fn hack() { | |
let scale: felt252 = 1000000000000000000000000000; | |
let deposit: felt252 = 0x38790ce2af72fa75; | |
let withdraw: felt252 = 0x54b59354072c77ad; | |
let accumulator: felt252 = 0xb6793fc03db6bc15d492b1956ce62920000000; |