Skip to content

Instantly share code, notes, and snippets.

  1. Simple web UI in JavaScript/TypeScript

    • Functional UI only, doens't need to look good design-wise or use any UI framework
    • One screen web app
    • Connect Metamask (wherever)
    • Shows one screen with the proposal question - hardcoded in the HTML
    • On this screen multiple choice with button "vote"
    • When click "vote" - offline JSON signature on:
@talkol
talkol / ton-setup-docker.sh
Last active March 28, 2022 14:16
TON environment setup
## TODO: change compilations to release
docker run --rm -it --platform linux/amd64 ubuntu bash
# dependencies Linux
apt update
apt install git make cmake g++ libssl-dev zlib1g-dev wget
# dependencies Mac

TON NFT Standard - Feedback

The feedback is based on our review of TIP issue 62 and its example implementation.

Thank you for your hard work on creating a unified NFT standard! The community is learning a lot from your efforts. We have a rare opportunity to design a standard that is truly focused on delivering the best product, and is not driven by gas limitations like on other networks (ERC721 for example). We also have the opportunity to apply many lessons learned from previous implementations in the crypto community.

High level feedback

1. We propose to move all business logic from the NFT child to the NFT-Collection parent

struct Minter {
uint256 pairedETH;
uint256 pairedUSDC;
uint256 pairedShares;
uint256 unpairedETH;
uint256 unpairedShares;
}
uint256 totalSushiLP;
@talkol
talkol / stringify error
Last active April 5, 2020 12:49
Stringify JavaScript Errors that may be of unknown type (string, object, etc)
// always returns a simple string, can take unknown types and strange objects as input
function stringifyError(err) {
if (err instanceof Object) return JSON.stringify(err, Object.getOwnPropertyNames(err));
else return err.toString();
}
  • I'm working on an Iron-Man game in WebVR (using A-Frame library) and I want to replace the default VR hand model of A-Frame with a custom model of Iron-Man's hands.

  • This is the default model in A-Frame of the VR hands - Left | Right. Please download it and take a look.

    • Alternatively, I've already commissioned a similar Spider-Man hands model and this was the result - Left | Right.

    • I think the Spider-Man result was excellent so please take a look.

  • The result should be similar GLB files (left and right) that have a similar proportions/physical size and similar animations (with slight differences explained below). Take a look at the animation names and format in the default model because the result should be a drop-

  • I'm working on a Spider-Man game in WebVR (using A-Frame library) and the game has an infinite procedurally generated city. I need help with texturing the environment and the buildings.

  • I want to have 2 separate visual styles, so all textures need to be done twice in both styles:

    1. The first style is realistic - here is an example.

    2. The second style is vector/simpler geometries but more colorful - here is an example.

  • For efficiency of the game, small textures I think are enough, Like 256x256 pixels or 256x512 pixels or 512x256 pixels.

  • I'm working on a Spider-Man game in WebVR (using A-Frame library) and I want to replace the default VR hand model of A-Frame with a custom model of Spider-Man's hands.

  • This is the default model in A-Frame of the VR hands - Left | Right. Please download it and take a look.

  • The result should be similar GLB files (left and right) that have a similar proportions/physical size and similar animations (with slight differences explained below). Take a look at the animation names and format in the default model because the result should be a drop-in replacement in my game (my game currently relies on the default GLB files).

  • I want the hands to have more poly detail than the default model, I found this model that I like - HandRef1. Let's base the result on it (the high poly version). You ca

// ListView row actions
<Interactable.View
horizontalOnly={true}
snapPoints={[ {x: 0}, {x: 100} ]}
friction={0.7}
/>
// swipeable cards
<Interactable.View
horizontalOnly={true}
_handlePanResponderMove(event: Object, gestureState: Object): void {
if (this._isSwipingExcessivelyRightFromClosedPosition(gestureState)) {
return;
}
this.props.onSwipeStart();
if (this._isSwipingRightFromClosed(gestureState)) {
this._swipeSlowSpeed(gestureState);
} else {
this._swipeFullSpeed(gestureState);
}