Skip to content

Commit

Permalink
🎇 Rename TCKT to KimlikDAO Pass (KPASS)
Browse files Browse the repository at this point in the history
  • Loading branch information
KimlikDAO-bot committed Mar 25, 2024
1 parent 8f8e8a5 commit 4d61a1e
Show file tree
Hide file tree
Showing 20 changed files with 208 additions and 231 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode/
*.keys
cache/
out/
77 changes: 50 additions & 27 deletions contracts/Addresses.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,54 @@

pragma solidity ^0.8.0;

// dev.kimlikdao.eth
// dev.kimlikdao.avax
address constant DEV_KASASI = 0xC152e02e54CbeaCB51785C174994c2084bd9EF51;

//
// The protocol funds on Ethereum L2s forward the funds to Ethereum
// periodically. The redemption happens on zkSync Era.
//
// The protocol funds on alt L1s stay on its native chain and redeemed in-kind
// on the corresponding chain. The redemption signal is forwarded to the chain
// by the KimlikDAO signer nodes using BLS signatures.
//
//
// kimlikdao.eth
// kimlikdao.avax
address payable constant DAO_KASASI = payable(
0xcCc0106Dbc0291A0d5C97AAb42052Cb46dE60cCc
);
address constant DAO_KASASI_DEPLOYER = 0x0DabB96F2320A170ac0dDc985d105913D937ea9A;

// OYLAMA addresses
address constant OYLAMA = 0xcCc01Ec0E6Fb38Cce8b313c3c8dbfe66efD01cCc;
address constant OYLAMA_DEPLOYER = 0xD808C187Ef7D6f9999b6D9538C72E095db8c6df9;

// TCKT addresses
address constant TCKT_ADDR = 0xcCc0a9b023177549fcf26c947edb5bfD9B230cCc;
address constant TCKT_DEPLOYER = 0x305166299B002a9aDE0e907dEd848878FD2237D7;
address constant TCKT_SIGNERS = 0xcCc09aA0d174271259D093C598FCe9Feb2791cCc;
address constant TCKT_SIGNERS_DEPLOYER = 0x4DeA92Bcb2C22011217C089797A270DfA5A51d53;

// TCKO addresses
address constant TCKO_ADDR = 0xcCc0AC04C9251B74b0b30A20Fc7cb26EB62B0cCc;
address constant TCKO_DEPLOYER = 0xe7671eb60A45c905387df2b19A3803c6Be0Eb8f9;

// TCKOK addresses
address constant TCKOK = 0xcCc0c4e5d57d251551575CEd12Aba80B43fF1cCc;
address constant TCKOK_DEPLOYER = 0x2EF1308e8641a20b509DC90d0568b96359498BBa;
address payable constant PROTOCOL_FUND = payable(0xcCc0106Dbc0291A0d5C97AAb42052Cb46dE60cCc);
address constant PROTOCOL_FUND_DEPLOYER = 0x0DabB96F2320A170ac0dDc985d105913D937ea9A;

//
// eravm.kimlikdao.eth
//
address payable constant ERAVM_PROTOCOL_FUND = payable(0xcCc0f14de126FD0D2707Ad39F1b7698921550cCc);
address constant ERAVM_PROTOCOL_FUND_DEPLOYER = 0xadBde24bfC12829b30FaEe9cF5daB0F91AdC9400;

// KPASS addresses
address constant KPASS_ADDR = 0xcCc0a9b023177549fcf26c947edb5bfD9B230cCc;
address constant KPASS_DEPLOYER = 0x305166299B002a9aDE0e907dEd848878FD2237D7;
address constant ERAVM_KPASS_ADDR = 0xcCc053d81e3B85Eac133a5333be4D7cBDd120cCc;
address constant ERAVM_KPASS_DEPLOYER = 0x1F7766565AaDD753379181678623273A82f8603c;

// KDAO addresses
address constant KDAO_ADDR = 0xcCc0AC04C9251B74b0b30A20Fc7cb26EB62B0cCc;
address constant KDAO_DEPLOYER = 0xe7671eb60A45c905387df2b19A3803c6Be0Eb8f9;
address constant ERAVM_KDAO_ADDR = 0xcCc0b95cE2e18223bA8059F2c9Fad9d914450cCc;
address constant ERAVM_KDAO_DEPLOYER = 0x0410641e73f261b98EB7aB189F6b4e1052833c2A;

// KDAO-l addresses
address constant KDAOL = 0xcCc0c4e5d57d251551575CEd12Aba80B43fF1cCc;
address constant KDAOL_DEPLOYER = 0x2EF1308e8641a20b509DC90d0568b96359498BBa;
address constant ERAVM_KDAOL = 0xcCc0948D9e47Ab3932271DA380B3525DD05a1cCc;
address constant ERAVM_KDAOL_DEPLOYER = 0xb81bFa6348ACc1Dab88cc2b35d7eEce4A68aE2b2;

// Voting contract
address constant VOTING = 0xcCc01Ec0E6Fb38Cce8b313c3c8dbfe66efD01cCc;
address constant VOTING_DEPLOYER = 0xD808C187Ef7D6f9999b6D9538C72E095db8c6df9;
address constant ERAVM_VOTING = 0xcCc0a523f5392AD629EfAA49E71844E61AB81cCc;
address constant ERAVM_VOTING_DEPLOYER = 0x526F38A49130169412B00De254bDafbaAB4E7E91;

// KPASS Signers
address constant KPASS_SIGNERS = 0xcCc09aA0d174271259D093C598FCe9Feb2791cCc;
address constant KPASS_SIGNERS_DEPLOYER = 0x4DeA92Bcb2C22011217C089797A270DfA5A51d53;
address constant ERAVM_KPASS_SIGNERS = 0xcCc0b54E5538fa5B4E0EcE1f2B0ba9C01c8A1cCc;
address constant ERAVM_KPASS_SIGNERS_DEPLOYER = 0x755DDeBf547DD2e9838d16b51525fe8e925a56D0;

// dev.kimlikdao.eth
address constant DEV_FUND = 0xC152e02e54CbeaCB51785C174994c2084bd9EF51;
36 changes: 5 additions & 31 deletions contracts/AvalancheTokens.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,12 @@
pragma solidity ^0.8.0;

import "./IERC20Permit.sol";
import {TCKO_ADDR} from "./Addresses.sol";
import {KDAO_ADDR} from "./Addresses.sol";

IERC20Permit constant FRAX = IERC20Permit(
0xD24C2Ad096400B6FBcd2ad8B24E7acBc21A1da64
);
IERC20Permit constant TCKO = IERC20Permit(KDAO_ADDR);

IERC20Permit constant MIM = IERC20Permit(
0x130966628846BFd36ff31a822705796e8cb8C18D
);
IERC20Permit constant TRYB = IERC20Permit(0x564A341Df6C126f90cf3ECB92120FD7190ACb401);

IERC20Permit constant TCKO = IERC20Permit(TCKO_ADDR);
IERC20Permit constant USDC = IERC20Permit(0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E);

IERC20Permit constant TRYB = IERC20Permit(
0x564A341Df6C126f90cf3ECB92120FD7190ACb401
);

IERC20Permit constant USDC = IERC20Permit(
0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E
);

IERC20Permit constant USDD = IERC20Permit(
0xcf799767d366d789e8B446981C2D578E241fa25c
);

IERC20Permit constant USDT = IERC20Permit(
0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7
);

IERC20Permit constant YUSD = IERC20Permit(
0x111111111111ed1D73f860F57b2798b683f2d325
);

IERC20Permit constant BUSD = IERC20Permit(
0x9C9e5fD8bbc25984B178FdCE6117Defa39d2db39
);
IERC20Permit constant USDT = IERC20Permit(0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7);
28 changes: 0 additions & 28 deletions contracts/IDAOKasasi.sol

This file was deleted.

43 changes: 38 additions & 5 deletions contracts/IDIDSigners.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

pragma solidity ^0.8.0;

struct Signature {
bytes32 r;
uint256 yParityAndS;
}

uint256 constant DEPOSIT_OFFSET = 64;

uint256 constant END_TS_OFFSET = 112;

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

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

type uint128x2 is uint256;

/**
*
* `signerInfo` layout:
* |-- color --|-- withdraw --|-- endTs --|-- deposit --|-- startTs --|
* |-- 32 --|-- 48 --|-- 64 --|-- 48 --|-- 64 --|
*/
type SignerInfo is uint256;

interface IDIDSigners {
function authenticateExposureReportID3Sigs(
bytes32 exposureReportID,
uint128x2 weightThresholdAndSignatureTs,
Signature[3] calldata sigs
) external view;

function authenticateHumanID3Sigs(
bytes32 exposureReportID,
uint128x2 weightThresholdAndSignatureTs,
bytes32 commitmentR,
Signature[3] calldata sigs
) external view;

function authenticateHumanID5Sigs(
bytes32 humanID,
uint128x2 weightThresholdAndSignatureTs,
bytes32 commitmentR,
Signature[5] calldata sigs
) external view;

/**
* Maps a signer node address to a bit packed struct.
*
*`signerInfo` layout:
* |-- color --|-- withdraw --|-- endTs --|-- deposit --|-- startTs --|
* |-- 32 --|-- 48 --|-- 64 --|-- 48 --|-- 64 --|
*/
function signerInfo(address signer) external view returns (uint256);
function signerInfo(address signer) external view returns (SignerInfo);
}
2 changes: 1 addition & 1 deletion contracts/DistroStage.sol → contracts/IDistroStage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ enum DistroStage {
FinalUnlock
}

interface HasDistroStage {
interface IDistroStage {
function distroStage() external view returns (DistroStage);
}
17 changes: 3 additions & 14 deletions contracts/IERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,13 @@ interface IERC20 {

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

function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);

function allowance(address owner, address spender)
external
view
returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);

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

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

event Approval(
address indexed owner,
address indexed spender,
uint256 amount
);
event Approval(address indexed owner, address indexed spender, uint256 amount);
}
11 changes: 2 additions & 9 deletions contracts/IERC20Permit.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,8 @@ pragma solidity ^0.8.0;
import "./IERC20.sol";

interface IERC20Permit is IERC20 {
function permit(
address owner,
address spender,
uint256 amount,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
function permit(address owner, address spender, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
external;

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

Expand Down
6 changes: 1 addition & 5 deletions contracts/IERC721.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,5 @@ interface IERC721 {

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

event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
}
26 changes: 26 additions & 0 deletions contracts/IProtocolFund.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

uint256 constant REDEEM_INFO_AMOUNT_OFFSET = 208;

uint256 constant REDEEM_INFO_SUPPLY_OFFSET = 160;

/**
* `RedeemInfo` layout
* |-- amount --|-- supply --|-- redeemer --|
* |-- 48 --|-- 48 --|-- 160 --|
*/
type RedeemInfo is uint256;

interface IProtocolFund {
/**
* @param redeemInfo the packed struct containing redeemed amount out of the
* total supply and the redeemer address.
*
* In the signal chain `ProtocolFund`, the method completes the asset transfer
* atomically. The remote `ProtocolFund`
*
*/
function redeem(RedeemInfo redeemInfo) external;
}
9 changes: 9 additions & 0 deletions contracts/IUpgradable.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IUpgradable {
function versionHash() external pure returns (bytes32);

function migrateToCode(IUpgradable codeAddress) external;
}
29 changes: 0 additions & 29 deletions contracts/testing/MockDAOKasasiV1.sol

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,11 @@ contract MockDAOKasasi {
assembly {
let codeAddress := sload(CODE_SLOT)
calldatacopy(0, 0, calldatasize())
let result := delegatecall(
gas(),
codeAddress,
0,
calldatasize(),
0,
0
)
let result := delegatecall(gas(), codeAddress, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
switch result
case 0 {
revert(0, returndatasize())
}
default {
return(0, returndatasize())
}
case 0 { revert(0, returndatasize()) }
default { return(0, returndatasize()) }
}
}
}
Loading

0 comments on commit 4d61a1e

Please sign in to comment.