If success:
{
"data": {
"id": 1001,
"name": "Wing"
pragma solidity ^0.8.9; | |
contract Simple { | |
function example() public pure { | |
address remote = 0x1111111111111111111111111111111111111111; | |
address local = 0x2222222222222222222222222222222222222222; | |
bytes memory path = abi.encodePacked(remote, local); | |
assembly { | |
return(0x00, x) // What number is suitable for x? | |
} |
#!/bin/bash | |
# Must set container prefix | |
DELETE_REGEX="^temp-.*" | |
# protect containers regex | |
EXCLUDE_REGEX="(?!(jenkins|nginx))" | |
current=$(date +"%s") | |
deleteUntil=$(date -d '-3 days' +"%s") |
/** | |
* Not working itself. only shows how to get block number from timestamp for example | |
**/ | |
export async function findBlockNumberFromTimestamp(timestamp) { | |
invariant(timestamp <= new Date().getTime(), `timestamp: ${timestamp} should be less than or equal current timestamp`) | |
const targetTimestamp = convertToTimestampSeconds(timestamp) | |
const latestBlockNumber = await jsonRpcProvider.getBlockNumber() | |
const latestTimestamp = await blockTimestampFetcher.fetch(latestBlockNumber) as number |
If success:
{
"data": {
"id": 1001,
"name": "Wing"
name: Deploy main branch to production | |
on: | |
push: | |
branches: [ main ] | |
env: | |
DEPLOY_IAM_ROLE: arn:aws:iam::1234567890:role/deployer | |
GITHUB_REPOSITORY: org/repo |
name: Deploy main branch to production | |
on: | |
push: | |
branches: [ main ] | |
env: | |
DEPLOY_IAM_ROLE: arn:aws:iam::1234567890:role/deployer | |
jobs: |
#!/usr/bin/env sh | |
# ref: | |
# - https://github.com/awsdocs/iam-user-guide/blob/main/doc_source/id_roles_providers_create_oidc_verify-thumbprint.md | |
# - https://stackoverflow.com/questions/69247498/how-can-i-calculate-the-thumbprint-of-an-openid-connect-server | |
HOST=$(curl https://token.actions.githubusercontent.com/.well-known/openid-configuration | jq -r '.jwks_uri | split("/")[2]') | |
echo | openssl s_client -servername $HOST -showcerts -connect $HOST:443 2> /dev/null \ | |
| sed -n -e '/BEGIN/h' -e '/BEGIN/,/END/H' -e '$x' -e '$p' | tail +2 \ |
const ethers = require('ethers'); | |
const entropy = ethers.utils.randomBytes(16); // or 32 | |
const mnemonic = ethers.utils.entropyToMnemonic(entropy); | |
console.log(mnemonic); | |
const wallets = []; | |
const maxIdx = 10; | |
for (let i=0; i<maxIdx; i++) { | |
const wallet = ethers.Wallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${i}`); |
#!/usr/bin/env sh | |
BITBUCKET_ID= | |
BITBUCKET_PW= | |
GITHUB_ID= | |
GITHUB_PW= | |
BITBUCKET=https://$BITBUCKET_ID:[email protected]/org/repo.git | |
GITHUB=https://$GITHUB_ID:[email protected]/org/repo.git |
name: Deploy main branch to production | |
on: | |
push: | |
branches: [ main ] | |
env: | |
DEPLOY_IAM_ROLE: arn:aws:iam::111111111111:role/deployer | |
DEPLOY_BUCKET: s3://bucket-name | |
CACHE_DIR: ${{ github.workspace }}/node_modules |