Skip to content

Commit be16c6f

Browse files
committed
governance script (WIP)
1 parent 20c0f5a commit be16c6f

File tree

2 files changed

+136
-153
lines changed

2 files changed

+136
-153
lines changed

contract_manager/src/core/contracts/evm.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -978,8 +978,6 @@ export class EvmLazerContract extends Storable {
978978
return contract.methods.owner().call();
979979
}
980980

981-
982-
983981
async generateUpdateTrustedSignerPayload(
984982
trustedSigner: string,
985983
expiresAt: number,
@@ -991,10 +989,9 @@ export class EvmLazerContract extends Storable {
991989
EXECUTOR_ABI,
992990
executorAddress,
993991
);
994-
const data = executorContract.methods.updateTrustedSigner(
995-
trustedSigner,
996-
expiresAt,
997-
).encodeABI();
992+
const data = executorContract.methods
993+
.updateTrustedSigner(trustedSigner, expiresAt)
994+
.encodeABI();
998995
return this.chain.generateExecutorPayload(
999996
executorAddress,
1000997
this.address,

contract_manager/src/core/contracts/evm_abis.ts

Lines changed: 133 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,207 +1368,193 @@ export const PULSE_UPGRADEABLE_ABI = [
13681368
] as any; // eslint-disable-line @typescript-eslint/no-explicit-any
13691369

13701370
export const LAZER_ABI = [
1371-
{ "type": "constructor", "inputs": [], "stateMutability": "nonpayable" },
1371+
{ type: "constructor", inputs: [], stateMutability: "nonpayable" },
13721372
{
1373-
"type": "function",
1374-
"name": "UPGRADE_INTERFACE_VERSION",
1375-
"inputs": [],
1376-
"outputs": [{ "name": "", "type": "string", "internalType": "string" }],
1377-
"stateMutability": "view"
1373+
type: "function",
1374+
name: "UPGRADE_INTERFACE_VERSION",
1375+
inputs: [],
1376+
outputs: [{ name: "", type: "string", internalType: "string" }],
1377+
stateMutability: "view",
13781378
},
13791379
{
1380-
"type": "function",
1381-
"name": "initialize",
1382-
"inputs": [
1380+
type: "function",
1381+
name: "initialize",
1382+
inputs: [
13831383
{
1384-
"name": "_topAuthority",
1385-
"type": "address",
1386-
"internalType": "address"
1387-
}
1384+
name: "_topAuthority",
1385+
type: "address",
1386+
internalType: "address",
1387+
},
13881388
],
1389-
"outputs": [],
1390-
"stateMutability": "nonpayable"
1389+
outputs: [],
1390+
stateMutability: "nonpayable",
13911391
},
13921392
{
1393-
"type": "function",
1394-
"name": "isValidSigner",
1395-
"inputs": [
1396-
{ "name": "signer", "type": "address", "internalType": "address" }
1397-
],
1398-
"outputs": [{ "name": "", "type": "bool", "internalType": "bool" }],
1399-
"stateMutability": "view"
1393+
type: "function",
1394+
name: "isValidSigner",
1395+
inputs: [{ name: "signer", type: "address", internalType: "address" }],
1396+
outputs: [{ name: "", type: "bool", internalType: "bool" }],
1397+
stateMutability: "view",
14001398
},
14011399
{
1402-
"type": "function",
1403-
"name": "owner",
1404-
"inputs": [],
1405-
"outputs": [{ "name": "", "type": "address", "internalType": "address" }],
1406-
"stateMutability": "view"
1400+
type: "function",
1401+
name: "owner",
1402+
inputs: [],
1403+
outputs: [{ name: "", type: "address", internalType: "address" }],
1404+
stateMutability: "view",
14071405
},
14081406
{
1409-
"type": "function",
1410-
"name": "proxiableUUID",
1411-
"inputs": [],
1412-
"outputs": [{ "name": "", "type": "bytes32", "internalType": "bytes32" }],
1413-
"stateMutability": "view"
1407+
type: "function",
1408+
name: "proxiableUUID",
1409+
inputs: [],
1410+
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
1411+
stateMutability: "view",
14141412
},
14151413
{
1416-
"type": "function",
1417-
"name": "renounceOwnership",
1418-
"inputs": [],
1419-
"outputs": [],
1420-
"stateMutability": "nonpayable"
1414+
type: "function",
1415+
name: "renounceOwnership",
1416+
inputs: [],
1417+
outputs: [],
1418+
stateMutability: "nonpayable",
14211419
},
14221420
{
1423-
"type": "function",
1424-
"name": "transferOwnership",
1425-
"inputs": [
1426-
{ "name": "newOwner", "type": "address", "internalType": "address" }
1427-
],
1428-
"outputs": [],
1429-
"stateMutability": "nonpayable"
1421+
type: "function",
1422+
name: "transferOwnership",
1423+
inputs: [{ name: "newOwner", type: "address", internalType: "address" }],
1424+
outputs: [],
1425+
stateMutability: "nonpayable",
14301426
},
14311427
{
1432-
"type": "function",
1433-
"name": "updateTrustedSigner",
1434-
"inputs": [
1428+
type: "function",
1429+
name: "updateTrustedSigner",
1430+
inputs: [
14351431
{
1436-
"name": "trustedSigner",
1437-
"type": "address",
1438-
"internalType": "address"
1432+
name: "trustedSigner",
1433+
type: "address",
1434+
internalType: "address",
14391435
},
1440-
{ "name": "expiresAt", "type": "uint256", "internalType": "uint256" }
1436+
{ name: "expiresAt", type: "uint256", internalType: "uint256" },
14411437
],
1442-
"outputs": [],
1443-
"stateMutability": "nonpayable"
1438+
outputs: [],
1439+
stateMutability: "nonpayable",
14441440
},
14451441
{
1446-
"type": "function",
1447-
"name": "upgradeToAndCall",
1448-
"inputs": [
1442+
type: "function",
1443+
name: "upgradeToAndCall",
1444+
inputs: [
14491445
{
1450-
"name": "newImplementation",
1451-
"type": "address",
1452-
"internalType": "address"
1446+
name: "newImplementation",
1447+
type: "address",
1448+
internalType: "address",
14531449
},
1454-
{ "name": "data", "type": "bytes", "internalType": "bytes" }
1450+
{ name: "data", type: "bytes", internalType: "bytes" },
14551451
],
1456-
"outputs": [],
1457-
"stateMutability": "payable"
1452+
outputs: [],
1453+
stateMutability: "payable",
14581454
},
14591455
{
1460-
"type": "function",
1461-
"name": "verification_fee",
1462-
"inputs": [],
1463-
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
1464-
"stateMutability": "view"
1456+
type: "function",
1457+
name: "verification_fee",
1458+
inputs: [],
1459+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
1460+
stateMutability: "view",
14651461
},
14661462
{
1467-
"type": "function",
1468-
"name": "verifyUpdate",
1469-
"inputs": [
1470-
{ "name": "update", "type": "bytes", "internalType": "bytes" }
1471-
],
1472-
"outputs": [
1473-
{ "name": "payload", "type": "bytes", "internalType": "bytes" },
1474-
{ "name": "signer", "type": "address", "internalType": "address" }
1463+
type: "function",
1464+
name: "verifyUpdate",
1465+
inputs: [{ name: "update", type: "bytes", internalType: "bytes" }],
1466+
outputs: [
1467+
{ name: "payload", type: "bytes", internalType: "bytes" },
1468+
{ name: "signer", type: "address", internalType: "address" },
14751469
],
1476-
"stateMutability": "payable"
1470+
stateMutability: "payable",
14771471
},
14781472
{
1479-
"type": "function",
1480-
"name": "version",
1481-
"inputs": [],
1482-
"outputs": [{ "name": "", "type": "string", "internalType": "string" }],
1483-
"stateMutability": "pure"
1473+
type: "function",
1474+
name: "version",
1475+
inputs: [],
1476+
outputs: [{ name: "", type: "string", internalType: "string" }],
1477+
stateMutability: "pure",
14841478
},
14851479
{
1486-
"type": "event",
1487-
"name": "Initialized",
1488-
"inputs": [
1480+
type: "event",
1481+
name: "Initialized",
1482+
inputs: [
14891483
{
1490-
"name": "version",
1491-
"type": "uint64",
1492-
"indexed": false,
1493-
"internalType": "uint64"
1494-
}
1484+
name: "version",
1485+
type: "uint64",
1486+
indexed: false,
1487+
internalType: "uint64",
1488+
},
14951489
],
1496-
"anonymous": false
1490+
anonymous: false,
14971491
},
14981492
{
1499-
"type": "event",
1500-
"name": "OwnershipTransferred",
1501-
"inputs": [
1493+
type: "event",
1494+
name: "OwnershipTransferred",
1495+
inputs: [
15021496
{
1503-
"name": "previousOwner",
1504-
"type": "address",
1505-
"indexed": true,
1506-
"internalType": "address"
1497+
name: "previousOwner",
1498+
type: "address",
1499+
indexed: true,
1500+
internalType: "address",
15071501
},
15081502
{
1509-
"name": "newOwner",
1510-
"type": "address",
1511-
"indexed": true,
1512-
"internalType": "address"
1513-
}
1503+
name: "newOwner",
1504+
type: "address",
1505+
indexed: true,
1506+
internalType: "address",
1507+
},
15141508
],
1515-
"anonymous": false
1509+
anonymous: false,
15161510
},
15171511
{
1518-
"type": "event",
1519-
"name": "Upgraded",
1520-
"inputs": [
1512+
type: "event",
1513+
name: "Upgraded",
1514+
inputs: [
15211515
{
1522-
"name": "implementation",
1523-
"type": "address",
1524-
"indexed": true,
1525-
"internalType": "address"
1526-
}
1516+
name: "implementation",
1517+
type: "address",
1518+
indexed: true,
1519+
internalType: "address",
1520+
},
15271521
],
1528-
"anonymous": false
1522+
anonymous: false,
15291523
},
15301524
{
1531-
"type": "error",
1532-
"name": "AddressEmptyCode",
1533-
"inputs": [
1534-
{ "name": "target", "type": "address", "internalType": "address" }
1535-
]
1525+
type: "error",
1526+
name: "AddressEmptyCode",
1527+
inputs: [{ name: "target", type: "address", internalType: "address" }],
15361528
},
15371529
{
1538-
"type": "error",
1539-
"name": "ERC1967InvalidImplementation",
1540-
"inputs": [
1530+
type: "error",
1531+
name: "ERC1967InvalidImplementation",
1532+
inputs: [
15411533
{
1542-
"name": "implementation",
1543-
"type": "address",
1544-
"internalType": "address"
1545-
}
1546-
]
1534+
name: "implementation",
1535+
type: "address",
1536+
internalType: "address",
1537+
},
1538+
],
15471539
},
1548-
{ "type": "error", "name": "ERC1967NonPayable", "inputs": [] },
1549-
{ "type": "error", "name": "FailedCall", "inputs": [] },
1550-
{ "type": "error", "name": "InvalidInitialization", "inputs": [] },
1551-
{ "type": "error", "name": "NotInitializing", "inputs": [] },
1540+
{ type: "error", name: "ERC1967NonPayable", inputs: [] },
1541+
{ type: "error", name: "FailedCall", inputs: [] },
1542+
{ type: "error", name: "InvalidInitialization", inputs: [] },
1543+
{ type: "error", name: "NotInitializing", inputs: [] },
15521544
{
1553-
"type": "error",
1554-
"name": "OwnableInvalidOwner",
1555-
"inputs": [
1556-
{ "name": "owner", "type": "address", "internalType": "address" }
1557-
]
1545+
type: "error",
1546+
name: "OwnableInvalidOwner",
1547+
inputs: [{ name: "owner", type: "address", internalType: "address" }],
15581548
},
15591549
{
1560-
"type": "error",
1561-
"name": "OwnableUnauthorizedAccount",
1562-
"inputs": [
1563-
{ "name": "account", "type": "address", "internalType": "address" }
1564-
]
1550+
type: "error",
1551+
name: "OwnableUnauthorizedAccount",
1552+
inputs: [{ name: "account", type: "address", internalType: "address" }],
15651553
},
1566-
{ "type": "error", "name": "UUPSUnauthorizedCallContext", "inputs": [] },
1554+
{ type: "error", name: "UUPSUnauthorizedCallContext", inputs: [] },
15671555
{
1568-
"type": "error",
1569-
"name": "UUPSUnsupportedProxiableUUID",
1570-
"inputs": [
1571-
{ "name": "slot", "type": "bytes32", "internalType": "bytes32" }
1572-
]
1573-
}
1574-
] as any; // eslint-disable-line @typescript-eslint/no-explicit-any
1556+
type: "error",
1557+
name: "UUPSUnsupportedProxiableUUID",
1558+
inputs: [{ name: "slot", type: "bytes32", internalType: "bytes32" }],
1559+
},
1560+
] as any; // eslint-disable-line @typescript-eslint/no-explicit-any

0 commit comments

Comments
 (0)