forked from Carbonable/carbon-protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
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
7 changed files
with
152 additions
and
182 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
user: | ||
admin: 1000 | ||
anyone: 1001 | ||
|
||
nft: | ||
name: Project | ||
symbol: NFT | ||
|
||
token: | ||
name: Token | ||
symbol: TOK | ||
decimals: 6 | ||
initial_supply: 1000000 | ||
|
||
minter: | ||
public_sale_open: 0 | ||
max_buy_per_tx: 5 | ||
unit_price: 10 | ||
max_supply_for_mint: 10 | ||
reserved_supply_for_mint: 4 | ||
|
||
whitelist: | ||
slots: 5 | ||
merkle_root: 3236969588476960619958150604131083087415975923122021901088942336874683133579 | ||
merkle_proof: | ||
- 1489335374474017495857579265074565262713421005832572026644103123081435719307 | ||
merkle_proof_len: 1 |
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 was deleted.
Oops, something went wrong.
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,19 @@ | ||
user: | ||
admin: 1000 | ||
anyone: 1001 | ||
|
||
nft: | ||
name: Project | ||
symbol: NFT | ||
|
||
token: | ||
name: Token | ||
symbol: TOK | ||
decimals: 6 | ||
initial_supply: 1000000 | ||
|
||
carbonable_token: | ||
name: Carbonable | ||
symbol: CARBZ | ||
decimals: 6 | ||
initial_supply: 1000000 |
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,68 @@ | ||
# SPDX-License-Identifier: MIT | ||
# Carbonable smart contracts written in Cairo v0.1.0 (library.cairo) | ||
|
||
%lang starknet | ||
|
||
# Starkware dependencies | ||
from starkware.cairo.common.cairo_builtins import HashBuiltin | ||
from starkware.cairo.common.bool import TRUE, FALSE | ||
|
||
func setup{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr}(): | ||
%{ | ||
# Load config | ||
import yaml | ||
with open("./tests/integrations/yield/config.yml", 'r') as file_instance: | ||
config = yaml.safe_load(file_instance) | ||
for section, subconfig in config.items(): | ||
for key, value in subconfig.items(): | ||
name = f"{section.lower()}_{key.lower()}" | ||
setattr(context, name, value) | ||
# ERC-721 deployment | ||
context.project_nft_contract = deploy_contract( | ||
"./src/nft/project/CarbonableProjectNFT.cairo", | ||
{ | ||
"name": context.nft_name, | ||
"symbol": context.nft_symbol, | ||
"owner": context.user_admin, | ||
}, | ||
).contract_address | ||
# Reward token ERC-20 deployment | ||
context.reward_token_contract = deploy_contract( | ||
"./tests/mocks/token/erc20.cairo", | ||
{ | ||
"name": context.token_name, | ||
"symbol": context.token_symbol, | ||
"decimals": context.token_decimals, | ||
"initial_supply": context.token_initial_supply, | ||
"recipient": context.user_anyone | ||
}, | ||
).contract_address | ||
# Carbonable token ERC-20 deployment | ||
context.carbonable_token_contract = deploy_contract( | ||
"./tests/mocks/token/erc20.cairo", | ||
{ | ||
"name": context.carbonable_token_name, | ||
"symbol": context.carbonable_token_symbol, | ||
"decimals": context.carbonable_token_decimals, | ||
"initial_supply": context.carbonable_token_initial_supply, | ||
"recipient": context.user_anyone | ||
}, | ||
).contract_address | ||
# Yield Manager deployment | ||
context.yield_manager_contract = deploy_contract( | ||
"./src/yield/yield_manager.cairo", | ||
{ | ||
"owner": context.user_admin, | ||
"project_nft_address": context.project_nft_contract, | ||
"carbonable_token_address": context.carbonable_token_contract, | ||
"reward_token_address": context.reward_token_contract, | ||
}, | ||
).contract_address | ||
%} | ||
|
||
return () | ||
end |
Oops, something went wrong.