I hereby claim:
- I am davidesilva on github.
- I am davidesilva (https://keybase.io/davidesilva) on keybase.
- I have a public key ASACnPLdBDZP1sXlAYC7TKNqaMlBZswZbovK0vC88PHjqwo
To claim this, I am signing this object:
#[starknet::interface] | |
trait IMyFirstContract<ContractState> { | |
fn get_value(self: @ContractState) -> u64; | |
} | |
#[starknet::contract] | |
mod MyFirstContract { | |
#[storage] | |
struct Storage { | |
value: u64 |
#[contract] | |
mod HelloStarknet { | |
use starknet::StorageAccess; | |
use starknet::StorageBaseAddress; | |
use starknet::SyscallResult; | |
use starknet::storage_read_syscall; | |
use starknet::storage_write_syscall; | |
use starknet::storage_address_from_base_and_offset; | |
use traits::{Into, TryInto}; | |
use option::OptionTrait; |
#[derive(Copy, Drop)] | |
struct MyStruct { | |
val: felt, | |
} | |
trait MyTrait<T> { | |
fn is_green(self: @T) -> bool; | |
} | |
impl RGBImpl of MyTrait::<MyStruct> { |
#[contract] | |
mod HelloStarknet { | |
struct Storage { | |
balance: felt, | |
} | |
#[external] | |
fn increase_balance(amount: felt) { | |
let new_balance = balance::read() + amount; | |
balance::write(new_balance); |
#[derive(Drop)] | |
struct MyStruct { | |
first_attribute: u8, | |
second_attribute: u8, | |
} | |
impl MyStructPartialEq of PartialEq::<@MyStruct> { | |
fn eq(a: @MyStruct, b: @MyStruct) -> bool { | |
*a.first_attribute == *b.first_attribute & *a.second_attribute == *b.second_attribute | |
} |
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
/** | |
* @title Ballot | |
* @dev Implements voting process along with vote delegation | |
*/ | |
contract Ballot { |
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
contract HelloWorld { | |
uint256 number; | |
/** | |
* @param _number value to store | |
*/ | |
function storeNumber(uint256 _number) public { |
I hereby claim:
To claim this, I am signing this object: