Skip to content

Commit 6a78a0c

Browse files
committed
🎇 Rename TCKT to KimlikDAO Pass (KPASS)
1 parent 8f8e8a5 commit 6a78a0c

20 files changed

+210
-250
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.vscode/
12
*.keys
23
cache/
34
out/

contracts/Addresses.sol

+50-27
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,54 @@
22

33
pragma solidity ^0.8.0;
44

5-
// dev.kimlikdao.eth
6-
// dev.kimlikdao.avax
7-
address constant DEV_KASASI = 0xC152e02e54CbeaCB51785C174994c2084bd9EF51;
8-
5+
//
6+
// The protocol funds on Ethereum L2s forward the funds to Ethereum
7+
// periodically. The redemption happens on zkSync Era.
8+
//
9+
// The protocol funds on alt L1s stay on its native chain and redeemed in-kind
10+
// on the corresponding chain. The redemption signal is forwarded to the chain
11+
// by the KimlikDAO signer nodes using BLS signatures.
12+
//
13+
//
914
// kimlikdao.eth
10-
// kimlikdao.avax
11-
address payable constant DAO_KASASI = payable(
12-
0xcCc0106Dbc0291A0d5C97AAb42052Cb46dE60cCc
13-
);
14-
address constant DAO_KASASI_DEPLOYER = 0x0DabB96F2320A170ac0dDc985d105913D937ea9A;
15-
16-
// OYLAMA addresses
17-
address constant OYLAMA = 0xcCc01Ec0E6Fb38Cce8b313c3c8dbfe66efD01cCc;
18-
address constant OYLAMA_DEPLOYER = 0xD808C187Ef7D6f9999b6D9538C72E095db8c6df9;
19-
20-
// TCKT addresses
21-
address constant TCKT_ADDR = 0xcCc0a9b023177549fcf26c947edb5bfD9B230cCc;
22-
address constant TCKT_DEPLOYER = 0x305166299B002a9aDE0e907dEd848878FD2237D7;
23-
address constant TCKT_SIGNERS = 0xcCc09aA0d174271259D093C598FCe9Feb2791cCc;
24-
address constant TCKT_SIGNERS_DEPLOYER = 0x4DeA92Bcb2C22011217C089797A270DfA5A51d53;
25-
26-
// TCKO addresses
27-
address constant TCKO_ADDR = 0xcCc0AC04C9251B74b0b30A20Fc7cb26EB62B0cCc;
28-
address constant TCKO_DEPLOYER = 0xe7671eb60A45c905387df2b19A3803c6Be0Eb8f9;
29-
30-
// TCKOK addresses
31-
address constant TCKOK = 0xcCc0c4e5d57d251551575CEd12Aba80B43fF1cCc;
32-
address constant TCKOK_DEPLOYER = 0x2EF1308e8641a20b509DC90d0568b96359498BBa;
15+
address payable constant PROTOCOL_FUND = payable(0xcCc0106Dbc0291A0d5C97AAb42052Cb46dE60cCc);
16+
address constant PROTOCOL_FUND_DEPLOYER = 0x0DabB96F2320A170ac0dDc985d105913D937ea9A;
17+
18+
//
19+
// eravm.kimlikdao.eth
20+
//
21+
address payable constant ERAVM_PROTOCOL_FUND = payable(0xcCc0f14de126FD0D2707Ad39F1b7698921550cCc);
22+
address constant ERAVM_PROTOCOL_FUND_DEPLOYER = 0xadBde24bfC12829b30FaEe9cF5daB0F91AdC9400;
23+
24+
// KPASS addresses
25+
address constant KPASS_ADDR = 0xcCc0a9b023177549fcf26c947edb5bfD9B230cCc;
26+
address constant KPASS_DEPLOYER = 0x305166299B002a9aDE0e907dEd848878FD2237D7;
27+
address constant ERAVM_KPASS_ADDR = 0xcCc053d81e3B85Eac133a5333be4D7cBDd120cCc;
28+
address constant ERAVM_KPASS_DEPLOYER = 0x1F7766565AaDD753379181678623273A82f8603c;
29+
30+
// KDAO addresses
31+
address constant KDAO_ADDR = 0xcCc0AC04C9251B74b0b30A20Fc7cb26EB62B0cCc;
32+
address constant KDAO_DEPLOYER = 0xe7671eb60A45c905387df2b19A3803c6Be0Eb8f9;
33+
address constant ERAVM_KDAO_ADDR = 0xcCc0b95cE2e18223bA8059F2c9Fad9d914450cCc;
34+
address constant ERAVM_KDAO_DEPLOYER = 0x0410641e73f261b98EB7aB189F6b4e1052833c2A;
35+
36+
// KDAO-l addresses
37+
address constant KDAOL = 0xcCc0c4e5d57d251551575CEd12Aba80B43fF1cCc;
38+
address constant KDAOL_DEPLOYER = 0x2EF1308e8641a20b509DC90d0568b96359498BBa;
39+
address constant ERAVM_KDAOL = 0xcCc0948D9e47Ab3932271DA380B3525DD05a1cCc;
40+
address constant ERAVM_KDAOL_DEPLOYER = 0xb81bFa6348ACc1Dab88cc2b35d7eEce4A68aE2b2;
41+
42+
// Voting contract
43+
address constant VOTING = 0xcCc01Ec0E6Fb38Cce8b313c3c8dbfe66efD01cCc;
44+
address constant VOTING_DEPLOYER = 0xD808C187Ef7D6f9999b6D9538C72E095db8c6df9;
45+
address constant ERAVM_VOTING = 0xcCc0a523f5392AD629EfAA49E71844E61AB81cCc;
46+
address constant ERAVM_VOTING_DEPLOYER = 0x526F38A49130169412B00De254bDafbaAB4E7E91;
47+
48+
// KPASS Signers
49+
address constant KPASS_SIGNERS = 0xcCc09aA0d174271259D093C598FCe9Feb2791cCc;
50+
address constant KPASS_SIGNERS_DEPLOYER = 0x4DeA92Bcb2C22011217C089797A270DfA5A51d53;
51+
address constant ERAVM_KPASS_SIGNERS = 0xcCc0b54E5538fa5B4E0EcE1f2B0ba9C01c8A1cCc;
52+
address constant ERAVM_KPASS_SIGNERS_DEPLOYER = 0x755DDeBf547DD2e9838d16b51525fe8e925a56D0;
53+
54+
// dev.kimlikdao.eth
55+
address constant DEV_FUND = 0xC152e02e54CbeaCB51785C174994c2084bd9EF51;

contracts/AvalancheTokens.sol

+5-31
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,12 @@
33
pragma solidity ^0.8.0;
44

55
import "./IERC20Permit.sol";
6-
import {TCKO_ADDR} from "./Addresses.sol";
6+
import {KDAO_ADDR} from "./Addresses.sol";
77

8-
IERC20Permit constant FRAX = IERC20Permit(
9-
0xD24C2Ad096400B6FBcd2ad8B24E7acBc21A1da64
10-
);
8+
IERC20Permit constant TCKO = IERC20Permit(KDAO_ADDR);
119

12-
IERC20Permit constant MIM = IERC20Permit(
13-
0x130966628846BFd36ff31a822705796e8cb8C18D
14-
);
10+
IERC20Permit constant TRYB = IERC20Permit(0x564A341Df6C126f90cf3ECB92120FD7190ACb401);
1511

16-
IERC20Permit constant TCKO = IERC20Permit(TCKO_ADDR);
12+
IERC20Permit constant USDC = IERC20Permit(0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E);
1713

18-
IERC20Permit constant TRYB = IERC20Permit(
19-
0x564A341Df6C126f90cf3ECB92120FD7190ACb401
20-
);
21-
22-
IERC20Permit constant USDC = IERC20Permit(
23-
0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E
24-
);
25-
26-
IERC20Permit constant USDD = IERC20Permit(
27-
0xcf799767d366d789e8B446981C2D578E241fa25c
28-
);
29-
30-
IERC20Permit constant USDT = IERC20Permit(
31-
0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7
32-
);
33-
34-
IERC20Permit constant YUSD = IERC20Permit(
35-
0x111111111111ed1D73f860F57b2798b683f2d325
36-
);
37-
38-
IERC20Permit constant BUSD = IERC20Permit(
39-
0x9C9e5fD8bbc25984B178FdCE6117Defa39d2db39
40-
);
14+
IERC20Permit constant USDT = IERC20Permit(0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7);

contracts/IDAOKasasi.sol

-28
This file was deleted.

contracts/IDIDSigners.sol

+38-5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
pragma solidity ^0.8.0;
44

5+
struct Signature {
6+
bytes32 r;
7+
uint256 yParityAndS;
8+
}
9+
10+
uint256 constant DEPOSIT_OFFSET = 64;
11+
512
uint256 constant END_TS_OFFSET = 112;
613

714
uint256 constant END_TS_MASK = uint256(type(uint64).max) << 112;
@@ -10,13 +17,39 @@ uint256 constant WITHDRAW_OFFSET = 176;
1017

1118
uint256 constant WITHDRAW_MASK = uint256(type(uint48).max) << 176;
1219

20+
/**
21+
*
22+
* `signerInfo` layout:
23+
* |-- color --|-- withdraw --|-- endTs --|-- deposit --|-- startTs --|
24+
* |-- 32 --|-- 48 --|-- 64 --|-- 48 --|-- 64 --|
25+
*/
26+
type SignerInfo is uint256;
27+
28+
type uint128x2 is uint256;
29+
1330
interface IDIDSigners {
31+
function authenticateExposureReportID3Sigs(
32+
bytes32 exposureReportID,
33+
uint128x2 weightThresholdAndSignatureTs,
34+
Signature[3] calldata sigs
35+
) external view;
36+
37+
function authenticateHumanID3Sigs(
38+
bytes32 exposureReportID,
39+
uint128x2 weightThresholdAndSignatureTs,
40+
bytes32 commitmentR,
41+
Signature[3] calldata sigs
42+
) external view;
43+
44+
function authenticateHumanID5Sigs(
45+
bytes32 humanID,
46+
uint128x2 weightThresholdAndSignatureTs,
47+
bytes32 commitmentR,
48+
Signature[5] calldata sigs
49+
) external view;
50+
1451
/**
1552
* Maps a signer node address to a bit packed struct.
16-
*
17-
*`signerInfo` layout:
18-
* |-- color --|-- withdraw --|-- endTs --|-- deposit --|-- startTs --|
19-
* |-- 32 --|-- 48 --|-- 64 --|-- 48 --|-- 64 --|
2053
*/
21-
function signerInfo(address signer) external view returns (uint256);
54+
function signerInfo(address signer) external view returns (SignerInfo);
2255
}

contracts/DistroStage.sol contracts/IDistroStage.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ enum DistroStage {
1313
FinalUnlock
1414
}
1515

16-
interface HasDistroStage {
16+
interface IDistroStage {
1717
function distroStage() external view returns (DistroStage);
1818
}

contracts/IERC20.sol

+3-14
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,13 @@ interface IERC20 {
1515

1616
function transfer(address to, uint256 amount) external returns (bool);
1717

18-
function transferFrom(
19-
address from,
20-
address to,
21-
uint256 amount
22-
) external returns (bool);
18+
function transferFrom(address from, address to, uint256 amount) external returns (bool);
2319

24-
function allowance(address owner, address spender)
25-
external
26-
view
27-
returns (uint256);
20+
function allowance(address owner, address spender) external view returns (uint256);
2821

2922
function approve(address spender, uint256 amount) external returns (bool);
3023

3124
event Transfer(address indexed from, address indexed to, uint256 amount);
3225

33-
event Approval(
34-
address indexed owner,
35-
address indexed spender,
36-
uint256 amount
37-
);
26+
event Approval(address indexed owner, address indexed spender, uint256 amount);
3827
}

contracts/IERC20Permit.sol

+2-9
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,8 @@ pragma solidity ^0.8.0;
55
import "./IERC20.sol";
66

77
interface IERC20Permit is IERC20 {
8-
function permit(
9-
address owner,
10-
address spender,
11-
uint256 amount,
12-
uint256 deadline,
13-
uint8 v,
14-
bytes32 r,
15-
bytes32 s
16-
) external;
8+
function permit(address owner, address spender, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
9+
external;
1710

1811
function nonces(address owner) external view returns (uint256);
1912

contracts/IERC721.sol

+1-5
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,5 @@ interface IERC721 {
1313

1414
function supportsInterface(bytes4 interfaceId) external pure returns (bool);
1515

16-
event Transfer(
17-
address indexed from,
18-
address indexed to,
19-
uint256 indexed tokenId
20-
);
16+
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
2117
}

contracts/IProtocolFund.sol

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// SPDX-License-Identifier: MIT
2+
3+
pragma solidity ^0.8.0;
4+
5+
uint256 constant REDEEM_INFO_AMOUNT_OFFSET = 208;
6+
7+
uint256 constant REDEEM_INFO_SUPPLY_OFFSET = 160;
8+
9+
/**
10+
* `RedeemInfo` layout
11+
* |-- amount --|-- supply --|-- redeemer --|
12+
* |-- 48 --|-- 48 --|-- 160 --|
13+
*/
14+
type RedeemInfo is uint256;
15+
16+
interface IProtocolFund {
17+
/**
18+
* @param redeemInfo the packed struct containing redeemed amount out of the
19+
* total supply and the redeemer address.
20+
*
21+
* In the signal chain `ProtocolFund`, the method completes the asset transfer
22+
* atomically. The remote `ProtocolFund`
23+
*
24+
*/
25+
function redeem(RedeemInfo redeemInfo) external;
26+
}

contracts/IUpgradable.sol

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// SPDX-License-Identifier: MIT
2+
3+
pragma solidity ^0.8.0;
4+
5+
interface IUpgradable {
6+
function versionHash() external pure returns (bytes32);
7+
8+
function migrateToCode(IUpgradable codeAddress) external;
9+
}

contracts/testing/MockDAOKasasiV1.sol

-29
This file was deleted.

contracts/testing/MockDAOKasasi.sol contracts/testing/MockProtocolFund.sol

+4-15
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pragma solidity ^0.8.0;
44

55
import {CODE_SLOT} from "../ERC1967.sol";
66

7-
contract MockDAOKasasi {
7+
contract MockProtocolFund {
88
constructor() {
99
assembly {
1010
sstore(CODE_SLOT, 0x4DB9cbE44bF9B747Cd3F3fEfEFbfDb2f2DaA8Cf5)
@@ -17,22 +17,11 @@ contract MockDAOKasasi {
1717
assembly {
1818
let codeAddress := sload(CODE_SLOT)
1919
calldatacopy(0, 0, calldatasize())
20-
let result := delegatecall(
21-
gas(),
22-
codeAddress,
23-
0,
24-
calldatasize(),
25-
0,
26-
0
27-
)
20+
let result := delegatecall(gas(), codeAddress, 0, calldatasize(), 0, 0)
2821
returndatacopy(0, 0, returndatasize())
2922
switch result
30-
case 0 {
31-
revert(0, returndatasize())
32-
}
33-
default {
34-
return(0, returndatasize())
35-
}
23+
case 0 { revert(0, returndatasize()) }
24+
default { return(0, returndatasize()) }
3625
}
3726
}
3827
}

0 commit comments

Comments
 (0)