Skip to content

Commit

Permalink
🚚 rename to tokei
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelStark committed Oct 9, 2023
1 parent 1916b17 commit 89d781e
Show file tree
Hide file tree
Showing 10 changed files with 89 additions and 85 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Za Warudo Book
name: Tokei Book

on:
push:
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<p align="center">
<img src="assets/logo/za-warudo.png" height="256">
<img src="assets/logo/tokei.png" height="256">
</p>

<h1 align="center">⏳ Za Warudo ⏳</h1>
<h1 align="center">⏳ Tokei ⏳</h1>

<p align="center">
<strong>✨ 🐺 Starknet ERC20 token streaming protocol πŸ’°β³, inspired by Sablier.</strong>
</p>

<p align="center">
<a href="LICENSE">
<img src="https://img.shields.io/github/license/abdelhamidbakhta/za-warudo.svg?style=flat-square" alt="Project license">
<img src="https://img.shields.io/github/license/abdelhamidbakhta/tokei.svg?style=flat-square" alt="Project license">
</a>
<a href="https://github.com/abdelhamidbakhta/za-warudo/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22">
<a href="https://github.com/abdelhamidbakhta/tokei/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22">
<img src="https://img.shields.io/badge/PRs-welcome-ff69b4.svg?style=flat-square" alt="Pull Requests welcome">
</a>
<a href="https://abdelhamidbakhta.github.io/za-warudo/">
<img src="https://img.shields.io/badge/Read-Za Warudo_Book-blue" alt="Read Za Warudo Book">
<a href="https://abdelhamidbakhta.github.io/tokei/">
<img src="https://img.shields.io/badge/Read-Tokei_Book-blue" alt="Read Tokei Book">
</a>
</p>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

## ⚑ About Za Warudo ⚑
## ⚑ About Tokei ⚑

Za Warudo is a token streaming protocol, inspired by Sablier, for Starknet.
Tokei is a token streaming protocol, inspired by Sablier, for Starknet.

Read the [Za Warudo Book](https://abdelhamidbakhta.github.io/za-warudo/) to learn more about the project.
Read the [Tokei Book](https://abdelhamidbakhta.github.io/tokei/) to learn more about the project.

## πŸ› οΈ Build

Expand All @@ -51,7 +51,7 @@ snforge

Here are some resources to help you get started:

- [Za Warudo Book](https://abdelhamidbakhta.github.io/za-warudo/)
- [Tokei Book](https://abdelhamidbakhta.github.io/tokei/)
- [Cairo Book](https://book.cairo-lang.org/)
- [Starknet Book](https://book.starknet.io/)
- [Starknet Foundry Book](https://foundry-rs.github.io/starknet-foundry/)
Expand Down
8 changes: 4 additions & 4 deletions Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "za_warudo"
name = "tokei"
version = "0.1.0"
authors = ["Abdelhamid Bakhta <@abdelhamidbakhta>"]
license = "MIT"
keywords = ["starknet", "vesting"]
description = "✨ 🐺 Starknet ERC20 token vesting smart contracts πŸ’°β³"
documentation = "https://github.com/abdelhamidbakhta/za-warudo"
homepage = "https://github.com/abdelhamidbakhta/za-warudo"
repository = "https://github.com/abdelhamidbakhta/za-warudo"
documentation = "https://github.com/abdelhamidbakhta/tokei"
homepage = "https://github.com/abdelhamidbakhta/tokei"
repository = "https://github.com/abdelhamidbakhta/tokei"

[[target.starknet-contract]]
sierra = true
Expand Down
6 changes: 3 additions & 3 deletions book/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ authors = ["@abdelhamidbakhta"]
language = "en"
multilingual = false
src = "src"
title = "Za Warudo Book"
title = "Tokei Book"

[output.html]
git-repository-url = "https://github.com/abdelhamidbakhta/za-warudo"
edit-url-template = "https://github.com/abdelhamidbakhta/za-warudo/book/{path}"
git-repository-url = "https://github.com/abdelhamidbakhta/tokei"
edit-url-template = "https://github.com/abdelhamidbakhta/tokei/book/{path}"

[output.html.playground]
runnable = false
8 changes: 5 additions & 3 deletions book/src/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# ⏳ Za Warudo ⏳
# ⏳ Tokei ⏳

Za Warudo is a token streaming protocol, inspired by Sablier, for Starknet.
Tokei is a token streaming protocol, inspired by Sablier, for Starknet.

![Za Warudo](./assets/za-warudo-hello.gif)
Tokei means "clock" in Japanese.

![Tokei](./assets/tokei-hello.gif)
14 changes: 7 additions & 7 deletions book/src/getting-started/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Sample output:

```shell
tree target/dev
β”œβ”€β”€ za_warudo.starknet_artifacts.json
β”œβ”€β”€ za_warudo_ERC20.casm.json
β”œβ”€β”€ za_warudo_ERC20.sierra.json
β”œβ”€β”€ za_warudo_ERC721.casm.json
β”œβ”€β”€ za_warudo_ERC721.sierra.json
β”œβ”€β”€ za_warudo_ZaWarudoLockupLinear.casm.json
└── za_warudo_ZaWarudoLockupLinear.sierra.json
β”œβ”€β”€ tokei.starknet_artifacts.json
β”œβ”€β”€ tokei_ERC20.casm.json
β”œβ”€β”€ tokei_ERC20.sierra.json
β”œβ”€β”€ tokei_ERC721.casm.json
β”œβ”€β”€ tokei_ERC721.sierra.json
β”œβ”€β”€ tokei_TokeiLockupLinear.casm.json
└── tokei_TokeiLockupLinear.sierra.json
```
58 changes: 31 additions & 27 deletions src/core/lockup_linear.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Main contract of Za Warudo protocol.
//! Main contract of Tokei protocol.

// *************************************************************************
// IMPORTS
Expand All @@ -9,27 +9,31 @@ use core::traits::Into;
use starknet::{ContractAddress, ClassHash};

// Local imports.
use za_warudo::types::lockup_linear::{Range, Broker};

// β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
// β•šβ•β•β–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—
// β–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘
// β–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘
// β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
// β•šβ•β•β•β•β•β•β•β•šβ•β• β•šβ•β• β•šβ•β•β•β•šβ•β•β• β•šβ•β• β•šβ•β•β•šβ•β• β•šβ•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•

// β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
// β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—
// β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
// β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—
// β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘
// β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•šβ•β• β•šβ•β• β•šβ•β•β•β•β•β• β•šβ•β• β•šβ•β•β•β•β•β•β•β•šβ•β•β•šβ•β• β•šβ•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β• β•šβ•β•β•šβ•β• β•šβ•β•
use tokei::types::lockup_linear::{Range, Broker};

// ______ ____ __ __ ______ ____
// /_ __// __ \ / //_/ / ____// _/
// / / / / / // ,< / __/ / /
// / / / /_/ // /| | / /___ _/ /
// /_/ \____//_/ |_|/_____//___/

// __ ____ ______ __ __ __ __ ____
// / / / __ \ / ____// //_// / / // __ \
// / / / / / // / / ,< / / / // /_/ /
// / /___/ /_/ // /___ / /| |/ /_/ // ____/
// /_____/\____/ \____//_/ |_|\____//_/

// __ ____ _ __ ______ ___ ____
// / / / _// | / // ____// | / __ \
// / / / / / |/ // __/ / /| | / /_/ /
// / /___ _/ / / /| // /___ / ___ | / _, _/
// /_____//___//_/ |_//_____//_/ |_|/_/ |_|

// *************************************************************************
// Interface of the `ZaWarudoLockupLinear` contract.
// Interface of the `TokeiLockupLinear` contract.
// *************************************************************************
#[starknet::interface]
trait IZaWarudoLockupLinear<TContractState> {
trait ITokeiLockupLinear<TContractState> {
/// Create a new stream.
/// # Arguments
/// * `sender` - The address streaming the assets, with the ability to cancel the stream.
Expand All @@ -55,7 +59,7 @@ trait IZaWarudoLockupLinear<TContractState> {
}

#[starknet::contract]
mod ZaWarudoLockupLinear {
mod TokeiLockupLinear {
// *************************************************************************
// IMPORTS
// *************************************************************************
Expand All @@ -69,10 +73,10 @@ mod ZaWarudoLockupLinear {
use traits::Into;
use debug::PrintTrait;
// Local imports.
use za_warudo::types::lockup_linear::{Range, Broker, LockupLinearStream};
use za_warudo::types::lockup::LockupAmounts;
use za_warudo::tokens::erc721::{ERC721, IERC721};
use za_warudo::libraries::helpers;
use tokei::types::lockup_linear::{Range, Broker, LockupLinearStream};
use tokei::types::lockup::LockupAmounts;
use tokei::tokens::erc721::{ERC721, IERC721};
use tokei::libraries::helpers;

// *************************************************************************
// STORAGE
Expand Down Expand Up @@ -126,7 +130,7 @@ mod ZaWarudoLockupLinear {
// Initialize as ERC-721 contract.
let mut state: ERC721::ContractState = ERC721::unsafe_new_contract_state();
IERC721::initializer(
ref state, 'Za Warudo Lockup Linear NFT', 'ZW-LOCKUP-LIN', get_contract_address()
ref state, 'Tokei Lockup Linear NFT', 'ZW-LOCKUP-LIN', get_contract_address()
);
}

Expand All @@ -135,7 +139,7 @@ mod ZaWarudoLockupLinear {
// EXTERNAL FUNCTIONS
// *************************************************************************
#[external(v0)]
impl ZaWarudoLockupLinear of super::IZaWarudoLockupLinear<ContractState> {
impl TokeiLockupLinear of super::ITokeiLockupLinear<ContractState> {
/// Create a new stream.
/// # Arguments
/// * `sender` - The address streaming the assets, with the ability to cancel the stream.
Expand All @@ -158,7 +162,7 @@ mod ZaWarudoLockupLinear {
range: Range,
broker: Broker,
) -> u64 {
// Safe Interactions: query the protocol fee. This is safe because it's a known Za Warudo contract that does
// Safe Interactions: query the protocol fee. This is safe because it's a known Tokei contract that does
// not call other unknown contracts.
// TODO: implement.
let protocol_fee = 0;
Expand Down Expand Up @@ -233,7 +237,7 @@ mod ZaWarudoLockupLinear {
}

#[external(v0)]
impl ZaWarudoLockupLinearERC721 of IERC721<ContractState> {
impl TokeiLockupLinearERC721 of IERC721<ContractState> {
fn initializer(
ref self: ContractState, name_: felt252, symbol_: felt252, admin: ContractAddress
) {}
Expand Down
4 changes: 2 additions & 2 deletions src/libraries/helpers.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
use zeroable::Zeroable;

// Local imports.
use za_warudo::types::lockup::CreateAmounts;
use za_warudo::libraries::errors;
use tokei::types::lockup::CreateAmounts;
use tokei::libraries::errors;

//Checks that neither fee is greater than `max_fee`, and then calculates the protocol fee amount, the
/// broker fee amount, and the deposit amount from the total amount.
Expand Down
2 changes: 1 addition & 1 deletion src/types/lockup_linear.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use traits::{TryInto, Into};
use starknet::ContractAddress;

// Local imports.
use za_warudo::types::lockup::LockupAmounts;
use tokei::types::lockup::LockupAmounts;

/// Represent a Lockup Linear Stream.
#[derive(Drop, starknet::Store, Serde)]
Expand Down
52 changes: 25 additions & 27 deletions tests/test_lockup_linear.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ use snforge_std::{declare, start_prank, stop_prank, ContractClassTrait};


// Local imports.
use za_warudo::core::lockup_linear::{
IZaWarudoLockupLinearSafeDispatcher, IZaWarudoLockupLinearSafeDispatcherTrait
use tokei::core::lockup_linear::{
ITokeiLockupLinearSafeDispatcher, ITokeiLockupLinearSafeDispatcherTrait
};
use za_warudo::types::lockup_linear::{Range, Broker};
use za_warudo::tokens::erc721::{IERC721SafeDispatcher, IERC721SafeDispatcherTrait};
use tokei::types::lockup_linear::{Range, Broker};
use tokei::tokens::erc721::{IERC721SafeDispatcher, IERC721SafeDispatcherTrait};

/// TODO: Implement actual test and change the name of this function.
#[test]
Expand All @@ -34,7 +34,7 @@ fn given_normal_conditions_when_create_with_range_then_expected_results() {
// *********************************************************************************************
let caller_address = contract_address_const::<'caller'>();

let (za_warudo) = setup(caller_address);
let (tokei) = setup(caller_address);
// *********************************************************************************************
// * TEST LOGIC *
// *********************************************************************************************
Expand All @@ -54,14 +54,14 @@ fn given_normal_conditions_when_create_with_range_then_expected_results() {
let broker = Broker { account: broker_account, fee: broker_fee, };

// Actual test.
let stream_id = za_warudo
let stream_id = tokei
.create_with_range(sender, recipient, total_amount, asset, cancelable, range, broker,)
.unwrap();

// Assertions.
assert(stream_id == 1, 'wrong stream id');

let stream_nft = IERC721SafeDispatcher { contract_address: za_warudo.contract_address };
let stream_nft = IERC721SafeDispatcher { contract_address: tokei.contract_address };

// Check that the stream nft was minted to the recipient.
assert(stream_nft.owner_of(stream_id.into()).unwrap() == recipient, 'wrong stream nft owner');
Expand All @@ -70,49 +70,47 @@ fn given_normal_conditions_when_create_with_range_then_expected_results() {
// *********************************************************************************************
// * TEARDOWN *
// *********************************************************************************************
teardown(za_warudo);
teardown(tokei);
}

/// Utility function to setup the test environment.
fn setup(caller_address: ContractAddress) -> (IZaWarudoLockupLinearSafeDispatcher,) {
fn setup(caller_address: ContractAddress) -> (ITokeiLockupLinearSafeDispatcher,) {
// Setup the contracts.
let (za_warudo,) = setup_contracts(caller_address);
let (tokei,) = setup_contracts(caller_address);
// Prank the caller address.
prepare_contracts(caller_address, za_warudo,);
prepare_contracts(caller_address, tokei,);
// Return the caller address and the contract interfaces.
(za_warudo,)
(tokei,)
}

// Utility function to prank the caller address
fn prepare_contracts(
caller_address: ContractAddress, za_warudo: IZaWarudoLockupLinearSafeDispatcher,
) {
// Prank the caller address for calls to `ZaWarudoLockupLinear` contract.
start_prank(za_warudo.contract_address, caller_address);
fn prepare_contracts(caller_address: ContractAddress, tokei: ITokeiLockupLinearSafeDispatcher,) {
// Prank the caller address for calls to `TokeiLockupLinear` contract.
start_prank(tokei.contract_address, caller_address);
}

/// Utility function to teardown the test environment.
fn teardown(za_warudo: IZaWarudoLockupLinearSafeDispatcher,) {
stop_prank(za_warudo.contract_address);
fn teardown(tokei: ITokeiLockupLinearSafeDispatcher,) {
stop_prank(tokei.contract_address);
}

/// Setup required contracts.
fn setup_contracts(caller_address: ContractAddress) -> (IZaWarudoLockupLinearSafeDispatcher,) {
fn setup_contracts(caller_address: ContractAddress) -> (ITokeiLockupLinearSafeDispatcher,) {
// Deploy the role store contract.
let za_warudo_address = deploy_za_warudo(caller_address);
let tokei_address = deploy_tokei(caller_address);

// Create a role store dispatcher.
let za_warudo = IZaWarudoLockupLinearSafeDispatcher { contract_address: za_warudo_address };
let tokei = ITokeiLockupLinearSafeDispatcher { contract_address: tokei_address };

// Return the caller address and the contract interfaces.
(za_warudo,)
(tokei,)
}


/// Utility function to deploy a `ZaWarudoLockupLinear` contract and return its address.
fn deploy_za_warudo(initial_admin: ContractAddress) -> ContractAddress {
let za_warudo_contract = declare('ZaWarudoLockupLinear');
/// Utility function to deploy a `TokeiLockupLinear` contract and return its address.
fn deploy_tokei(initial_admin: ContractAddress) -> ContractAddress {
let tokei_contract = declare('TokeiLockupLinear');
let mut constructor_calldata = array![initial_admin.into()];
za_warudo_contract.deploy(@constructor_calldata).unwrap()
tokei_contract.deploy(@constructor_calldata).unwrap()
}

0 comments on commit 89d781e

Please sign in to comment.