Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/learn/smart-contract-developers/create-lsp7-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ contract CustomToken is LSP7Mintable, LSP7Burnable {
msg.sender, // deployer will receive initial tokens
20_000 * 10 ** decimals(), // will mint 20k tokens
true, // force parameter
"0x" // optional transaction data
"" // optional transaction data
);
}
}
Expand Down Expand Up @@ -174,7 +174,8 @@ async function deployToken() {

// Add the constructor parameters to the token bytecode
const tokenBytecodeWithConstructor = ethers.concat([
tokenBytecode + encodedConstructorParams,
tokenBytecode,
encodedConstructorParams,
]);

// Get the address of the custom token contract that will be created
Expand Down
15 changes: 11 additions & 4 deletions docs/learn/smart-contract-developers/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ You can mimic calling the [`execute()`](../../contracts/contracts/ERC725/ERC725.

:::

```js title="deployContractAsUP.ts"
```ts title="deployContractAsUP.ts"
import { ethers } from 'hardhat';
import * as dotenv from 'dotenv';

Expand All @@ -224,7 +224,10 @@ dotenv.config();
async function deployContract() {
// UP controller used for deployment
const [deployer] = await ethers.getSigners();
console.log('Deploying contract with Universal Profile controller: ', deployer.address);
console.log(
'Deploying contract with Universal Profile controller: ',
deployer.address,
);

// Load the Universal Profile
const universalProfile = await ethers.getContractAtFromArtifact(
Expand All @@ -233,7 +236,8 @@ async function deployContract() {
);

// Create custom bytecode for the contract deployment
const contractBytecode = (await ethers.getContractFactory('MyCustomContract')).bytecode;
const contractBytecode = (await ethers.getContractFactory('MyCustomContract'))
.bytecode;
const abiEncoder = new ethers.AbiCoder();

// Encode constructor parameters
Expand All @@ -247,7 +251,10 @@ async function deployContract() {
);

// Add the constructor parameters to the contract bytecode
const contractBytecodeWithConstructor = ethers.concat([contractBytecode, encodedConstructorParams]);
const contractBytecodeWithConstructor = ethers.concat([
contractBytecode,
encodedConstructorParams,
]);

// Get the address of the custom contract that will be created
const contractAddress = await universalProfile.execute.staticCall(
Expand Down