Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
10,606 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export const domains = []; | ||
|
||
export const owners = []; | ||
|
||
export const voltaPrivateKey = ''; | ||
|
||
export const ewcPrivateKey = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { EWC_CHAIN_ID } from '@energyweb/credential-governance'; | ||
import { Wallet } from 'ethers'; | ||
import { transferDomain } from '../src/utils/domains'; | ||
import { domains, ewcPrivateKey } from './data'; | ||
|
||
export const newOwner = '0x3451aaEDD3f25204D483aADCF060e344155DEB02'; | ||
|
||
(async function () { | ||
try { | ||
for await (const rootDomain of domains) { | ||
await transferDomain({ | ||
rootDomain, | ||
signer: new Wallet(ewcPrivateKey), | ||
newOwner, | ||
chainId: EWC_CHAIN_ID, | ||
dryRun: true, | ||
}); | ||
} | ||
console.log('Domains are transferred'); | ||
} catch (e) { | ||
console.error('Error transferring domains:', e); | ||
} | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { EWC_CHAIN_ID } from '@energyweb/credential-governance'; | ||
import { Wallet } from 'ethers'; | ||
import { updateLegacyDomains } from '../src/utils/domains'; | ||
import { domains, ewcPrivateKey } from './data'; | ||
|
||
(async function () { | ||
try { | ||
for await (const rootDomain of domains) { | ||
await updateLegacyDomains({ | ||
rootDomain, | ||
signer: new Wallet(ewcPrivateKey), | ||
chainId: EWC_CHAIN_ID, | ||
dryRun: true, | ||
}); | ||
} | ||
console.log('Domains are updated'); | ||
} catch (e) { | ||
console.error('Error updating domains:', e); | ||
} | ||
})(); |
Oops, something went wrong.