Skip to content

Commit

Permalink
Some more improvements (#87)
Browse files Browse the repository at this point in the history
* move to move-docs, minor fixes on setup scripts

* boilerplate

* nit

* another nit

* exclude
  • Loading branch information
manolisliolios authored Apr 22, 2024
1 parent 98307b3 commit 0a9c6ae
Show file tree
Hide file tree
Showing 21 changed files with 25 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/move_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Run move tests in all package subdirectories, with exclusions
run: |
exclude_dirs=() # Add excluded directories to this array
exclude_dirs=(governance) # Add excluded directories to this array
for dir in packages/*; do
dir_name=$(basename "$dir")
if [[ ! " ${exclude_dirs[@]} " =~ " ${dir_name} " ]] && [ -d "$dir" ]; then
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added packages/governance/.gitkeep
Empty file.
4 changes: 2 additions & 2 deletions packages/suins/sources/registry.move
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module suins::registry {
clock: &Clock,
ctx: &mut TxContext,
): SuinsRegistration {
internal_add_record(self, domain, no_years, clock, false, ctx)
self.internal_add_record(domain, no_years, clock, false, ctx)
}

/// Attempts to add a new record to the registry and returns a
Expand All @@ -77,7 +77,7 @@ module suins::registry {
clock: &Clock,
ctx: &mut TxContext,
): SuinsRegistration {
internal_add_record(self, domain, no_years, clock, true, ctx)
self.internal_add_record(domain, no_years, clock, true, ctx)
}

/// Attempts to burn an NFT and get storage rebates.
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/sources/direct_setup.move
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/// A simple package to allows us set a target address & default name in a single PTB in frontend.
/// Unblocks better UX in the registration flow.
module utils::direct_setup {
use std::string::{String};
use std::string::String;

use sui::clock::Clock;

Expand Down
27 changes: 16 additions & 11 deletions scripts/config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export type PackageInfo = {
discountHouseId: string;
},
renewalsPackageId: string;
subNamesPackageId: string;
tempSubdomainsProxyPackageId: string;
}

export const mainPackage: Config = {
Expand All @@ -37,21 +39,24 @@ export const mainPackage: Config = {
},
directSetupPackageId: '0xdac22652eb400beb1f5e2126459cae8eedc116b73b8ad60b71e3e8d7fdb317e2',
renewalsPackageId: '0xd5e5f74126e7934e35991643b0111c3361827fc0564c83fa810668837c6f0b0f',

subNamesPackageId: 'TODO: Fill this in...',
tempSubdomainsProxyPackageId: 'TODO: Fill this in...'
},
testnet: {
packageId: '0x701b8ca1c40f11288a1ed2de0a9a2713e972524fbab748a7e6c137225361653f',
registrationPackageId: 'TODO: Fill this in',
publisherId: '0xd12afb9b5e4a8dc875d22fc927e78952dc9bd84730b33c02e9fd30949c100e38',
adminAddress: '0x7bdfc33239bd05af27d6989cee5455da4bc69ed4cfab5d178434a96ff412514a',
adminCap: normalizeSuiAddress('0xadc8b4c3fa0cc022e995968e06fca1d4a47f782f7bb0e88c52730eca77cdae03'),
suins: '0xedc672fadedee348108618da7555f771d4fec8d3331779a8411ff8184aded726',
directSetupPackageId: '0x9af70a4cb6d7144e68fd972eef672a74c7fe41aa5c0bb67ba40d7d1ae87bfb19',
packageId: '0x22fa05f21b1ad71442491220bb9338f7b7095fe35000ef88d5400d28523bdd93',
registrationPackageId: '0x4255184a0143c0ce4394a3f16a6f5aa5d64507269e54e51ea396d569fe8f1ba5',
publisherId: '0x62d9690d7e6234bfd57170a89c9c8ec54604ea31cefaa3869e8be4912ee1a4ab',
adminAddress: '0xfe09cf0b3d77678b99250572624bf74fe3b12af915c5db95f0ed5d755612eb68',
adminCap: normalizeSuiAddress('0x5def5bd9dc94b7d418d081a91c533ec619fb4350e6c4e4602aea96fd49331b15'),
suins: '0x300369e8909b9a6464da265b9a5a9ab6fe2158a040e84e808628cde7a07ee5a3',
directSetupPackageId: '0x6ed81fd808a23eae2da488052334d50478b36527474fc99707c1aed0e43104b1',
discountsPackage: {
packageId: '0x319364827e018833f545d8291f0482c5859ead75663543dda153b50df83244eb',
discountHouseId: '0x5cee9eadc06ae2a330ba8caee517fc1502dffae6474454c45f79f0b00d148ec4',
packageId: 'TODO: Fill this in...',
discountHouseId: 'TODO: Fill this in...',
},
renewalsPackageId: '',
renewalsPackageId: '0x54800ebb4606fd0c03b4554976264373b3374eeb3fd63e7ff69f31cac786ba8c',
subNamesPackageId: '0x3c272bc45f9157b7818ece4f7411bdfa8af46303b071aca4e18c03119c9ff636',
tempSubdomainsProxyPackageId: '0x3489ab5dcd346afee8b681267bcab2583a5eba9855680ec9931355e50e21c148'
}
}

Expand Down
1 change: 0 additions & 1 deletion scripts/init/authorization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export const authorizeApp = ({
type: string;
suinsPackageIdV1: string;
}) => {
console.log({adminCap, suins, type, suinsPackageIdV1})
txb.moveCall({
target: `${suinsPackageIdV1}::suins::authorize_app`,
arguments: [
Expand Down
4 changes: 2 additions & 2 deletions scripts/init/packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,13 @@ export const Packages = (network: Network) => {
manifest: SuiNSDependentPackages(rev, 'discounts', 'day_one = { local = "../day_one" }'),
processPublish: (data: SuiTransactionBlockResponse) => {
const { packageId, upgradeCap } = parseCorePackageObjects(data);
const couponHouse = parseCreatedObject(data, `${packageId}::house::DiscountHouse`);
const discountHouse = parseCreatedObject(data, `${packageId}::house::DiscountHouse`);

return {
packageId,
upgradeCap,
authorizationType: `${packageId}::house::DiscountHouseApp`,
couponHouse
discountHouse
}
}
},
Expand Down
4 changes: 3 additions & 1 deletion scripts/init/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ export type PackageInfo = {
DayOne: Package;
Coupons: Coupons;
Subdomains: Package;
Discounts: Package;
Discounts: Package & {
discountHouse: string;
};
TempSubdomainProxy: Package;
}

Expand Down

0 comments on commit 0a9c6ae

Please sign in to comment.