Skip to content

Commit 3049b24

Browse files
committed
fix: correct paths in Tron deployment scripts
- Fix ARTIFACTS_DIR to point to ../../tron/build instead of ../build/tron - Fix output paths to point to ../../deployments/tron instead of ../deployments/tron - Fix verify-deployment.js to use correct deployment and artifact paths
1 parent c36388a commit 3049b24

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎packages/smart-contracts/scripts/tron/deploy-mainnet.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const tronWeb = new TronWeb({
3939
privateKey: PRIVATE_KEY,
4040
});
4141

42-
const ARTIFACTS_DIR = path.join(__dirname, '../build/tron');
42+
const ARTIFACTS_DIR = path.join(__dirname, '../../tron/build');
4343

4444
async function loadArtifact(contractName) {
4545
const artifactPath = path.join(ARTIFACTS_DIR, `${contractName}.json`);
@@ -164,7 +164,7 @@ async function main() {
164164
},
165165
};
166166

167-
const outputPath = path.join(__dirname, '../deployments/tron/mainnet.json');
167+
const outputPath = path.join(__dirname, '../../deployments/tron/mainnet.json');
168168
fs.writeFileSync(outputPath, JSON.stringify(deploymentInfo, null, 2));
169169
console.log(`\nDeployment info saved to: ${outputPath}`);
170170

‎packages/smart-contracts/scripts/tron/deploy-nile.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const tronWeb = new TronWeb({
3232
});
3333

3434
// Contract artifacts paths
35-
const ARTIFACTS_DIR = path.join(__dirname, '../build/tron');
35+
const ARTIFACTS_DIR = path.join(__dirname, '../../tron/build');
3636

3737
async function loadArtifact(contractName) {
3838
const artifactPath = path.join(ARTIFACTS_DIR, `${contractName}.json`);
@@ -130,7 +130,7 @@ async function main() {
130130
contracts: deployments,
131131
};
132132

133-
const outputPath = path.join(__dirname, '../deployments/tron/nile.json');
133+
const outputPath = path.join(__dirname, '../../deployments/tron/nile.json');
134134
fs.mkdirSync(path.dirname(outputPath), { recursive: true });
135135
fs.writeFileSync(outputPath, JSON.stringify(deploymentInfo, null, 2));
136136
console.log(`\nDeployment info saved to: ${outputPath}`);

‎packages/smart-contracts/scripts/tron/deploy-test-token.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async function main() {
4444
}
4545

4646
// Load compiled contract
47-
const buildPath = path.join(__dirname, '../build/tron/TestTRC20.json');
47+
const buildPath = path.join(__dirname, '../../tron/build/TestTRC20.json');
4848

4949
if (!fs.existsSync(buildPath)) {
5050
console.error('❌ Contract not compiled. Run: yarn tron:compile');
@@ -104,7 +104,7 @@ async function main() {
104104
},
105105
};
106106

107-
const outputPath = path.join(__dirname, '../deployments/tron/nile-test-token.json');
107+
const outputPath = path.join(__dirname, '../../deployments/tron/nile-test-token.json');
108108
fs.writeFileSync(outputPath, JSON.stringify(deploymentInfo, null, 2));
109109
console.log('\nDeployment info saved to:', outputPath);
110110

‎packages/smart-contracts/scripts/tron/verify-deployment.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ const tronWeb = new TronWeb({
3333
});
3434

3535
async function loadDeployment(network) {
36-
const deploymentPath = path.join(__dirname, `../deployments/${network}.json`);
36+
const deploymentPath = path.join(__dirname, `../../deployments/tron/${network}.json`);
3737
if (!fs.existsSync(deploymentPath)) {
3838
throw new Error(`Deployment file not found: ${deploymentPath}`);
3939
}
4040
return JSON.parse(fs.readFileSync(deploymentPath, 'utf8'));
4141
}
4242

4343
async function loadArtifact(contractName) {
44-
const artifactPath = path.join(__dirname, `../build/tron/${contractName}.json`);
44+
const artifactPath = path.join(__dirname, `../../tron/build/${contractName}.json`);
4545
return JSON.parse(fs.readFileSync(artifactPath, 'utf8'));
4646
}
4747

0 commit comments

Comments
 (0)