Skip to content

Instantly share code, notes, and snippets.

View thor314's full-sized avatar

Thor 🪁 thor314

View GitHub Profile
@thor314
thor314 / config.scm
Last active November 30, 2021 22:47
;; This is an operating system configuration template
;; for a "desktop" setup with GNOME and Xfce where the
;; root partition is encrypted with LUKS.
(use-modules (gnu) (gnu system nss))
(use-service-modules desktop xorg)
(use-package-modules certs gnome)
(operating-system
(host-name "tk0") ;; 0
//! Usage:
//!
//! Use `nft_move` to Burn tokens on this Contract and re-mint it on
//! another Contract.
use crate::{internal::loggers, *};
use near_sdk::{ext_contract, json_types::U64, near_bindgen};
use std::convert::TryInto;
#[ext_contract(ext_move)]

Review:

public key

updated w public key. I think this means that the deployer of the factory can call near deploy <wasm_blob> <address of any store created by the factory>

pub fn new() -> Self {
  assert!(!env::state_exists());
  let storage_price_per_byte = 10_000_000_000_000_000_000; // 10^19
  Self {
    ...

Questions regarding evgeny’s contract review

Factory

// TODO: may want to charge mintbase here, so you can refund it below

What’s this mean? I did a refactor, reminder to self to walk thru it on the call.

This works on a method not declared payable?

Promise::new(store_creator_id).transfer(env::attached_deposit() - self.store_cost);

Why does this trait exist twice?

https://github.com/Mintbase/mb-contracts/pull/29/commits/5282cc042ccf40e7d8012ec90cdc5918d9840c25#diff-904ee840186925bca41dc3f8d92b89e0752144be75c7bb4b9859496a27a7db10R166

Compiling near-sdk-core v2.0.0 (https://github.com/near/near-sdk-rs.git?tag=2.4.0#477056f1)
error[E0432]: unresolved import `syn::export`
--> /home/thor/.cargo/registry/src/github.com-1ecc6299db9ec823/borsh-schema-derive-internal-0.7.1/src/helpers.rs:2:10
|
2 | use syn::export::TokenStream2;
| ^^^^^^ could not find `export` in `syn`
error[E0432]: unresolved import `syn::export`
--> /home/thor/.cargo/registry/src/github.com-1ecc6299db9ec823/borsh-schema-derive-internal-0.7.1/src/enum_schema.rs:3:10
|

Open source is a philosophy of creating with the intention of sharing. Our ability to create rests on a three-legged stool of Freedom, Privacy, and Security. We, Open Source Hackers is a community for we the hackers, who believe in the value of those principles, as we build technology to liberate ourselves and our users from walled gardens and panopticons.

We are nondiscriminatory. We welcome all skill levels. We hope you join us.

Pizza and beer will be delivered. This is supported out of pocket by the meetup host (me). If you can afford, cash donations (10-20€) will allow me to continue to do this. If you cannot afford, Don’t Panic. You too are welcome to the pizza and beer.

The format of the meetup: every-other-week informal meetups where we discuss and share what we’ve built and tools we’re using. If there is interest, we may have talks at the beginning of meetups to give short (5-30m) lectures about whatever the speaker is interested in or passionate about. The only requirement for your talk is that yo

system76-power 1.1.11-1
● system76-power.service - System76 Power Daemon
Loaded: loaded (/usr/lib/systemd/system/system76-power.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2020-12-17 15:34:04 WET; 1 day 18h ago
Main PID: 527 (system76-power)
Tasks: 1 (limit: 38358)
Memory: 2.9M
CGroup: /system.slice/system76-power.service
└─527 /usr/bin/system76-power daemon
[ 484.153] _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
[ 484.153] _XSERVTransMakeAllCOTSServerListeners: server already running
[ 484.153] (--) Log file renamed from "/var/log/Xorg.pid-4395.log" to "/var/log/Xorg.1.log"
[ 484.153] (WW) Failed to open protocol names file lib/xorg/protocol.txt
[ 484.153]
X.Org X Server 1.20.9
X Protocol Version 11, Revision 0
[ 484.153] Build Operating System: Linux Arch Linux
[ 484.153] Current Operating System: Linux thor 5.8.14-arch1-1 #1 SMP PREEMPT Wed, 07 Oct 2020 23:59:46 +0000 x86_64
[ 484.153] Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=d4bfc79c-d972-41e1-9875-5a0a1e0f9dc8 rw loglevel=3 quiet
[ 477.699] (--) Log file renamed from "/var/log/Xorg.pid-4070.log" to "/var/log/Xorg.0.log"
[ 477.699] (WW) Failed to open protocol names file lib/xorg/protocol.txt
[ 477.699]
X.Org X Server 1.20.9
X Protocol Version 11, Revision 0
[ 477.699] Build Operating System: Linux Arch Linux
[ 477.699] Current Operating System: Linux thor 5.8.14-arch1-1 #1 SMP PREEMPT Wed, 07 Oct 2020 23:59:46 +0000 x86_64
[ 477.699] Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=d4bfc79c-d972-41e1-9875-5a0a1e0f9dc8 rw loglevel=3 quiet
[ 477.699] Build Date: 02 September 2020 06:17:44AM
[ 477.699]