Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Alex Siman siman

🏠
Working from home
Block or report user

Report or block siman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View substrate-versioned-storage-property-array.rs
// Copyright 2019 Jsgenesis.
//
// This is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
View update-category-substrate.rs
/// Update category
fn update_category(origin, category_id: CategoryId, new_archival_status: Option<bool>, new_deletion_status: Option<bool>) -> dispatch::Result {
// Check that its a valid signature
let who = ensure_signed(origin)?;
// Not signed by forum SUDO
Self::ensure_is_forum_sudo(&who)?;
// Get path from parent to root of category tree.
View failed-to-create-a-forum-category-joystream.log
2019-06-14 10:20:30 Pre-sealed block for proposal at 314. Hash now 0xc150f6008b89ddad85a1db7f2976d53e91589cc737ade8d2057df2d8b0c5ed89, previously 0x351a1639359a4abd3a48212b123983e058a19c8a281bd25e8c2176c05436e350.
Hash: given=b09cdf4b661fb442f526f1607a8eb10427d755bbd4af0130533de12cba5af141, expected=91cdf8fb9afc1ef94623dfe0fa413b700893f320a2fb0ddbf2be04cda8808549
====================
stack backtrace:
0: substrate_panic_handler::set::{{closure}}::h41c84304a3d7b8c9 (0x10a7674a0)
1: std::panicking::rust_panic_with_hook::hfcf2d0777bc6c409 (0x10a8c6ad0)
2: std::panicking::begin_panic::hf60a109f4abac58e (0x10a469be4)
3: srml_executive::Executive<System,Block,Context,Payment,AllModules>::execute_block::h3266066fafbe65cf (0x10a43156c)
View joystream-forum-module-build-errors.log
$ ./build.sh
~/Work/jsgenesis/joystream-runtime/wasm ~/Work/jsgenesis/joystream-runtime
Compiling substrate-forum-module v0.1.0 (https://github.com/bedeho/substrate-forum-module?rev=9c0cf6544f8f6f9b7ae185007ccf3d8623d5f62a#9c0cf654)
error[E0432]: unresolved import `serde_derive`
--> /Users/siman/.cargo/git/checkouts/substrate-forum-module-45fcd172ed492bdc/9c0cf65/src/lib.rs:216:5
|
216 | use serde_derive::{Serialize, Deserialize};
| ^^^^^^^^^^^^ use of undeclared type or module `serde_derive`
error[E0425]: cannot find function `ensure_signed` in this scope
View interesting-tendermint-tasks.md

Tasks from "Research" page:

Light-Clients

  • Performance improvements
  • Client-side state machines

Scalability

  • Parallelization

Programming Languages

View acropolis-release-plan-by-alex.md

Pioneer


  • Description: The user interface for interacting with the platform.
  • Manager: Alex
  • Team:
    • Alex: Developer
    • Mokhtar: Developer
    • Martin: Testing
  • Main repo: apps
  • Current version: We didn't have a proper version for Pioneer before and just used the version that shipped with Polkadot Apps that is 0.32.0-beta.6.
View getStream-custom-doFeedRequest.js
import React from 'react';
import { StreamApp, NotificationDropdown, FlatFeed, LikeButton, Activity, CommentField, CommentList } from 'react-activity-feed';
import 'react-activity-feed/dist/index.css';
const customDoFeedRequest = (client, feedGroup, userId, options) => {
const feed = client.feed(feedGroup, userId);
const feedPromise = feed.get(options);
feedPromise.then((res) => {
console.log('doFeedRequest: Promise:', res.results);
res.results.forEach((activity) => {
@siman
siman / CounterWithContextAndUsereducer.tsx
Created Apr 28, 2019
Counter with Context and useReducer
View CounterWithContextAndUsereducer.tsx
import React, { useReducer, createContext, useContext } from 'react';
type CounterProps = {
initialCount: number
};
type CounterState = {
count: number
};
@siman
siman / MyAccountProvider.tsx
Created Apr 28, 2019
My account provider for Joystream UI
View MyAccountProvider.tsx
import React, { useReducer, createContext, useContext, useEffect } from 'react';
import store from 'store';
export const MY_ADDRESS = 'joy.myAddress';
function readMyAddress (): string | undefined {
const myAddress: string | undefined = store.get(MY_ADDRESS);
console.log('Read my address from the local storage:', myAddress);
return myAddress;
}
You can’t perform that action at this time.