Skip to content

Instantly share code, notes, and snippets.

# ERC20 as a reward
Largely based on [CONTRACT_CALL reward](./contract-call-reward.md).
## Overview
Similarly to other text-based rewards, we should add `ERC20` as a new reward type. The guild admin should be able to set up a pool in a contract and fund it. The eligible users should be able to claim the funds - the claimable amount should be either a fixed amount or determined by applying a multiplier to a leaderboard snapshot (uses the Dynamic Amount Rewards feature, see it's [design doc](https://whimsical.com/dynamic-rewards-SADi6pwPS4RsbKbNsz8XPQ)).
As the above suggests, we will need a contract that can hold tokens in pools - similarly to our [generic fee collector](https://github.com/guildxyz/generic-fee-collector-contract) contract, although reversed: instead of the users providing the funds and the admin withdrawing them, here the admin provides all the funds and the users are slowly claiming their part. The eligibility is checked in Guild Core, which also calculates the reward amount and signs the
[
{
"id": 1,
"query": {
"type": "PolygonVoyagerByWIW",
"context": "https://static.wiw.io/schema/wiw-badge-owner.jsonld",
"allowedIssuers": [
"*"
],
"credentialSubject": {
ZGEN is a web3 studio behind the Guild.xyz, on a mission to build infrastructure and ultimate tool for internet communities.
Communities should be unbounded and able to move fluidly as a collective. ****Guild is an antithesis of all-in-one platforms. Our goal is to build full interoperability for communities between all their platforms for sharing, interactions, and collaboration.
We believe that composable data, platformless identity and transparent digital economies could reshape our social networks. That’s why we are building the web3.
- Responsibilities
- Lead Engineering (Node.js, Typescript, Go)
- Improve our developing culture and environment (tests, reviews)
- Integrating APIs making sure they are properly works according to the business needs
- Build scaleable and stable product architecture and API (Designing service-based system alongside with product and technical architect team)
- Maintaining and developing our SDK
require("dotenv").config();
const ethers = require("ethers");
const { aggregate } = require("@makerdao/multicall");
const provider = new ethers.providers.JsonRpcProvider(
env.PROVIDER
);
async function contractTest() {
const mutagenTokenAbi = require("./static/abis/mutagenToken.json");
@Brunya
Brunya / senior_rust.md
Created March 10, 2021 09:21
ZGEN coding test

Senior Rust coding test

The motivation behind the coding test is the measurement of the qualification and testing the learning attitude of the candidate.

Task

Create a simple ABI parser library. Please do NOT use any library you can find on the internet only certain exceptions detailed later.

  • Rust
@Brunya
Brunya / rust.md
Created February 22, 2021 08:27
Rust coding test

Rust coding test

The motivation behind the coding test is the measurement of the qualification and testing the learning attitude of the candidate.

Task

Create a pseudorandom number generator based on Linear Congruential Generator algorithm. Pick one and use any of the following languages, and please do NOT use any library you can find on the internet.

  • C
  • C++