Skip to content

Commit

Permalink
Feat : Contracts - trimAbis
Browse files Browse the repository at this point in the history
to extract only abi interface array from artifacts
  • Loading branch information
SonYoungsung committed Jan 12, 2024
1 parent dc8795e commit 2464449
Show file tree
Hide file tree
Showing 28 changed files with 20,271 additions and 29,467 deletions.
821 changes: 406 additions & 415 deletions contracts/data/swapperV2/abi/SwapperV2Proxy.json

Large diffs are not rendered by default.

640 changes: 243 additions & 397 deletions contracts/data/tonstarter/abi/L1StosInL2.json

Large diffs are not rendered by default.

1,063 changes: 412 additions & 651 deletions contracts/data/tonstarter/abi/L1StosInL2Proxy.json

Large diffs are not rendered by default.

1,887 changes: 768 additions & 1,119 deletions contracts/data/tonstarter/abi/L2AirdropStosVault.json

Large diffs are not rendered by default.

1,705 changes: 632 additions & 1,073 deletions contracts/data/tonstarter/abi/L2AirdropStosVaultProxy.json

Large diffs are not rendered by default.

1,715 changes: 637 additions & 1,078 deletions contracts/data/tonstarter/abi/L2AirdropTonStakerVaultProxy.json

Large diffs are not rendered by default.

1,919 changes: 780 additions & 1,139 deletions contracts/data/tonstarter/abi/L2AirdropTonVault.json

Large diffs are not rendered by default.

1,747 changes: 649 additions & 1,098 deletions contracts/data/tonstarter/abi/L2AirdropTonVaultProxy.json

Large diffs are not rendered by default.

1,482 changes: 574 additions & 908 deletions contracts/data/tonstarter/abi/L2CustomVaultBaseProxy.json

Large diffs are not rendered by default.

1,833 changes: 743 additions & 1,090 deletions contracts/data/tonstarter/abi/L2DividendPoolForStos.json

Large diffs are not rendered by default.

1,651 changes: 606 additions & 1,045 deletions contracts/data/tonstarter/abi/L2DividendPoolForStosProxy.json

Large diffs are not rendered by default.

2,730 changes: 1,155 additions & 1,575 deletions contracts/data/tonstarter/abi/L2InitialLiquidityVault.json

Large diffs are not rendered by default.

1,943 changes: 716 additions & 1,227 deletions contracts/data/tonstarter/abi/L2InitialLiquidityVaultProxy.json

Large diffs are not rendered by default.

2,381 changes: 978 additions & 1,403 deletions contracts/data/tonstarter/abi/L2LpRewardVault.json

Large diffs are not rendered by default.

1,887 changes: 686 additions & 1,201 deletions contracts/data/tonstarter/abi/L2LpRewardVaultProxy.json

Large diffs are not rendered by default.

1,717 changes: 710 additions & 1,007 deletions contracts/data/tonstarter/abi/L2NonScheduleVault.json

Large diffs are not rendered by default.

3,873 changes: 1,724 additions & 2,149 deletions contracts/data/tonstarter/abi/L2ProjectManager.json

Large diffs are not rendered by default.

1,861 changes: 694 additions & 1,167 deletions contracts/data/tonstarter/abi/L2ProjectManagerProxy.json

Large diffs are not rendered by default.

1,988 changes: 819 additions & 1,169 deletions contracts/data/tonstarter/abi/L2ScheduleVault.json

Large diffs are not rendered by default.

1,689 changes: 624 additions & 1,065 deletions contracts/data/tonstarter/abi/L2ScheduleVaultProxy.json

Large diffs are not rendered by default.

955 changes: 371 additions & 584 deletions contracts/data/tonstarter/abi/L2TokenFactory.json

Large diffs are not rendered by default.

1,207 changes: 490 additions & 717 deletions contracts/data/tonstarter/abi/L2UniversalStos.json

Large diffs are not rendered by default.

1,357 changes: 527 additions & 830 deletions contracts/data/tonstarter/abi/L2UniversalStosProxy.json

Large diffs are not rendered by default.

3,280 changes: 1,392 additions & 1,888 deletions contracts/data/tonstarter/abi/LockIdNftForRegister.json

Large diffs are not rendered by default.

2,144 changes: 812 additions & 1,332 deletions contracts/data/tonstarter/abi/LockIdNftForRegisterProxy.json

Large diffs are not rendered by default.

2,269 changes: 1,130 additions & 1,139 deletions contracts/data/tosv2/abi/BondDepository.json

Large diffs are not rendered by default.

1,989 changes: 990 additions & 999 deletions contracts/data/tosv2/abi/BondDepositoryProxy.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions contracts/src/trimAbis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ const trimAbis = () => {
const contracts = fs.readdirSync(dir)

for (const contract of contracts) {
const abiFiles = fs.readdirSync(path.join(dir, contract, 'abi'))
const thisAbiDirectory = path.join(dir, contract, 'abi')
const abiFiles = fs.readdirSync(thisAbiDirectory)
for (const abiFileName of abiFiles) {
const abiFilePath = path.join(dir, contract, 'abi', abiFileName)
const abiFileContent = fs.readFileSync(abiFilePath, 'utf8')
Expand All @@ -17,7 +18,7 @@ const trimAbis = () => {
console.log('test')
console.log(JSON.stringify(abiObject.abi, null, 2))
fs.writeFile(
path.join(abiFilePath, `${abiFileName}.json`),
path.join(thisAbiDirectory, abiFileName),
JSON.stringify(abiObject.abi, null, 2),
'utf8',
(err) => {
Expand Down

0 comments on commit 2464449

Please sign in to comment.