Skip to content

Commit

Permalink
basecamp suins setup (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
manolisliolios authored Apr 1, 2024
1 parent 2518f33 commit bb2326f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 35 deletions.
37 changes: 3 additions & 34 deletions .github/workflows/suins-build-tx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ on:
description: 'select transaction type to create'
type: choice
options:
- Authorize Basecamp Free Claim
- Disable Discounts
- Disable Free Claims
- Authorize Discounts
- Withdraw Auction Profits
- Transfer Reserved Names
- Main package upgrade
- Create Deepbook Pools
- Renew reserved names
sui_tools_image:
description: 'image reference of sui_tools'
default: 'mysten/sui-tools:mainnet'
Expand All @@ -29,15 +28,6 @@ on:
required: true
type: string
default: '0x5cc6e842a17918ad7ce5e4e333309b387f1d5151bc3c89682abda460a700c2f5'
reserved_renewals_tx_id:
description: 'Which reserved extension operation are you trying to run?'
type: 'choice'
options:
- '1'
- '2'
- '3'
- '4'
- '5'

jobs:
suins:
Expand Down Expand Up @@ -127,8 +117,8 @@ jobs:
run: |
cd scripts && pnpm withdraw:auction:profits
- name: Authorize Discounts
if: ${{ inputs.transaction_type == 'Authorize Discounts' }}
- name: Authorize Basecamp Free Claim
if: ${{ inputs.transaction_type == 'Authorize Basecamp Free Claim' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
Expand Down Expand Up @@ -167,27 +157,6 @@ jobs:
run: |
cd scripts && pnpm create-deepbook-pools
- name: Authorize Renewals
if: ${{ inputs.transaction_type == 'Authorize Renewals' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
run: |
cd scripts && pnpm authorize-renewals
- name: Renew Reserved Names
if: ${{ inputs.transaction_type == 'Renew reserved names' }}
env:
NODE_ENV: production
GAS_OBJECT: ${{ inputs.gas_object_id }}
NETWORK: mainnet
ORIGIN: gh_action
RUN_ID: ${{ inputs.reserved_renewals_tx_id }}
run: |
cd scripts && pnpm renew-reserved-names
- name: Show Transaction Data (To sign)
run: |
cat scripts/tx/tx-data.txt
Expand Down
2 changes: 1 addition & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"transfer::names": "ts-node reserved-names/transfer-names.ts",
"withdraw:auction:profits": "ts-node transactions/withdraw_funds_20290927.ts",
"authorize-utils": "ts-node transactions/authorize_utils.ts",
"authorize-discounts": "ts-node transactions/quest_3_setup.ts",
"authorize-discounts": "ts-node transactions/basecamp/basecamp_free_claims.ts",
"disable-free-claims": "ts-node transactions/quest3/disable_free_claims.ts",
"disable-discounts": "ts-node transactions/quest3/disable_discounts.ts",
"create-deepbook-pools": "ts-node transactions/deepbook/create_pools.ts",
Expand Down
18 changes: 18 additions & 0 deletions scripts/transactions/basecamp/basecamp_free_claims.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { TransactionBlock } from "@mysten/sui.js/transactions";
import { Network, mainPackage } from "../../config/constants";
import { setupFreeClaimsForType } from "../../config/discounts";
import { executeTx, prepareMultisigTx, prepareSigner } from "../../airdrop/helper";

const BASECAMP_NFT_TYPE = '0xadccd2df6d388cf75bbe8913a2eb66bb64a079ca3f2c1fab71dfa86671f1daae::commemorative_nfts::Commemorative';

export const setup = async (network: Network) => {
const setup = mainPackage[network];
const txb = new TransactionBlock();

// a free claim for names of 5+ characters for each nami bag NFT
setupFreeClaimsForType(txb, setup, BASECAMP_NFT_TYPE, { from: 5, to: 63 });

return prepareMultisigTx(txb, 'mainnet');
}

setup('mainnet')

0 comments on commit bb2326f

Please sign in to comment.