-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
85 changed files
with
8,747 additions
and
6,970 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
name: "Simple Bounty" | ||
description: "Use this template to create a HEROES Simple Bounty via Github bot" | ||
title: "Bounty: " | ||
labels: ["bounty"] | ||
assignees: heroes-bot-test | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Hi! Let's set up your bounty! Please don't change the template - @heroes-bot-test won't be able to help you. | ||
- type: dropdown | ||
id: type | ||
attributes: | ||
label: What talent are you looking for? | ||
options: | ||
- Marketing | ||
- Development | ||
- Design | ||
- Other | ||
- Content | ||
- Research | ||
- Audit | ||
|
||
- type: textarea | ||
id: description | ||
attributes: | ||
label: What you need to be done? | ||
|
||
- type: dropdown | ||
id: tags | ||
attributes: | ||
label: Tags | ||
description: Add tags that match the topic of the work | ||
multiple: true | ||
options: | ||
- API | ||
- Blockchain | ||
- Community | ||
- CSS | ||
- DAO | ||
- dApp | ||
- DeFi | ||
- Design | ||
- Documentation | ||
- HTML | ||
- Javascript | ||
- NFT | ||
- React | ||
- Rust | ||
- Smart contract | ||
- Typescript | ||
- UI/UX | ||
- web3 | ||
- Translation | ||
- Illustration | ||
- Branding | ||
- Copywriting | ||
- Blogging | ||
- Editing | ||
- Video Creation | ||
- Social Media | ||
- Graphic Design | ||
- Transcription | ||
- Product Design | ||
- Artificial Intelligence | ||
- Quality Assurance | ||
- Risk Assessment | ||
- Security Audit | ||
- Bug Bounty | ||
- Code Review | ||
- Blockchain Security | ||
- Smart Contract Testing | ||
- Penetration Testing | ||
- Vulnerability Assessment | ||
- BOS | ||
- News | ||
- Hackathon | ||
- NEARCON2023 | ||
- NEARWEEK | ||
|
||
- type: input | ||
id: deadline | ||
attributes: | ||
label: Deadline | ||
description: "Set a deadline for your bounty. Please enter the date in format: DD.MM.YYYY" | ||
placeholder: "19.05.2027" | ||
|
||
- type: dropdown | ||
id: currencyType | ||
attributes: | ||
label: Currency | ||
description: What is the currency you want to pay? | ||
options: | ||
- USDC.e | ||
- USDT.e | ||
- DAI | ||
- wNEAR | ||
- USDt | ||
- XP | ||
- marmaj | ||
- NEKO | ||
- JUMP | ||
- USDC | ||
- NEARVIDIA | ||
default: 0 | ||
validations: | ||
required: true | ||
|
||
- type: input | ||
id: currencyAmount | ||
attributes: | ||
label: Amount | ||
description: How much it will be cost? | ||
|
||
- type: markdown | ||
attributes: | ||
value: "## Advanced settings" | ||
|
||
- type: checkboxes | ||
id: kyc | ||
attributes: | ||
label: KYC | ||
description: "Use HEROES' KYC Verification, only applicants who passed HEROES' KYC can apply and work on this bounty!" | ||
options: | ||
- label: Use KYC Verification | ||
|
||
- type: markdown | ||
attributes: | ||
value: | | ||
### This cannot be changed once the bounty is live! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Deploy TypeDoc on GitHub pages | ||
|
||
on: | ||
push: | ||
branches: | ||
main | ||
|
||
env: | ||
NODE_VERSION: 18.x.x | ||
ENTRY_FILE: 'packages' | ||
CONFIG_PATH: 'tsconfig.base.json' | ||
USES_PNPM: 'true' | ||
|
||
jobs: | ||
deploy: | ||
concurrency: ci-${{ github.ref }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Install yarn | ||
run: npm install -g yarn | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Build project | ||
run: yarn build | ||
|
||
- name: Build documentation | ||
run: yarn docs:generate | ||
|
||
- name: Deploy to GitHub pages | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages | ||
folder: docs | ||
clean: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ coverage | |
**/dist/tsconfig.tsbuildinfo | ||
lerna-debug.log | ||
yarn-error.log | ||
.idea | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import process from 'process'; | ||
import {Worker, getNetworkFromEnv} from 'near-workspaces'; | ||
import anyTest, {TestFn} from 'ava'; | ||
|
||
// To run this test, you need to set the NEAR_RPC_API_KEY environment variable tied the Pagoda testnet network. | ||
// And the NEAR_WORKSPACES_NETWORK environment variable to 'custom'. | ||
// | ||
// Sample: NEAR_WORKSPACES_NETWORK=custom NEAR_RPC_API_KEY="xxx" yarn test... | ||
if (getNetworkFromEnv() === 'custom' && process.env.NEAR_RPC_API_KEY !== '') { | ||
const test = anyTest as TestFn<{ | ||
worker: Worker; | ||
}>; | ||
|
||
test.before(async t => { | ||
const worker = await Worker.init({ | ||
network: 'custom', | ||
rpcAddr: 'https://near-testnet.api.pagoda.co/rpc/v1/', | ||
apiKey: process.env.NEAR_RPC_API_KEY!, | ||
}); | ||
t.context.worker = worker; | ||
}); | ||
|
||
test.after.always(async t => { | ||
await t.context.worker.tearDown().catch(error => { | ||
console.log('Failed to tear down the worker:', error); | ||
}); | ||
}); | ||
|
||
test('Ping network', async t => { | ||
try { | ||
await t.context.worker.provider.block({finality: 'final'}); | ||
} catch (error: unknown) { | ||
t.fail(`Failed to ping the network: ${error as string}`); | ||
return; | ||
} | ||
|
||
t.pass('Network pinged successfully!'); | ||
}); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import {NearAccount, getNetworkFromEnv} from 'near-workspaces'; | ||
import anyTest, {TestFn} from 'ava'; | ||
import {Worker} from 'near-workspaces/dist/worker'; | ||
|
||
// The contract provided contains only one view call, returning the | ||
// block_timestamp and epoch_height of the current block as a tuple. | ||
// Source is here <https://github.com/near/near-workspaces-rs/blob/main/examples/simple-contract/src/lib.rs> | ||
const contract_wasm = '__tests__/build/debug/simple_contract.wasm'; | ||
|
||
// Represents the timestamp and epoch_height result from the view call. | ||
type EnvData = [number, number]; | ||
|
||
if (getNetworkFromEnv() === 'sandbox') { | ||
const test = anyTest as TestFn<{ | ||
worker: Worker; | ||
contract: NearAccount; | ||
}>; | ||
|
||
test.beforeEach(async t => { | ||
const worker = await Worker.init(); | ||
const root = worker.rootAccount; | ||
const contract = await root.devDeploy(contract_wasm); | ||
|
||
t.context.worker = worker; | ||
t.context.contract = contract; | ||
}); | ||
|
||
test.afterEach.always(async t => { | ||
await t.context.worker.tearDown().catch(error => { | ||
console.log('Failed to tear down the worker:', error); | ||
}); | ||
}); | ||
|
||
test('Fast Forward', async t => { | ||
const before = await t.context.contract.view('current_env_data'); | ||
const env_before = before as EnvData; | ||
console.log(`Before: timestamp = ${env_before[0]}, epoch_height = ${env_before[1]}`); | ||
|
||
const forward_height = 10_000; | ||
|
||
// Call into fastForward. This will take a bit of time to invoke, but is | ||
// faster than manually waiting for the same amounts of blocks to be produced | ||
await t.context.worker.provider.fastForward(forward_height); | ||
|
||
const after = await t.context.contract.view('current_env_data'); | ||
const env_after = after as EnvData; | ||
console.log(`After: timestamp = ${env_after[0]}, epoch_height = ${env_after[1]}`); | ||
|
||
const block = await t.context.worker.provider.block({finality: 'final'}); | ||
|
||
// Rounding off to nearest hundred, providing wiggle room incase not perfectly `forward_height` | ||
t.true(Math.ceil(block.header.height / 100) * 100 === forward_height); | ||
}); | ||
} |
Binary file not shown.
File renamed without changes.
Oops, something went wrong.