1import {readFile} from 'fs/promises';2import {u8aToHex} from '@polkadot/util';3import {usingPlaygrounds} from '@unique/test-utils/util.js';45const codePath = process.argv[2];6if(!codePath) throw new Error('missing code path argument');78const code = await readFile(codePath);910await usingPlaygrounds(async (helper, privateKey) => {11 const alice = await privateKey('//Alice');12 await helper.getSudo().executeExtrinsicUncheckedWeight(alice, 'api.tx.system.setCode', [u8aToHex(code)]);13});1415process.exit(0);