Skip to content

Commit

Permalink
Marketplace smart contract (#56)
Browse files Browse the repository at this point in the history
Co-authored-by: bitfalt <75431447+bitfalt@users.noreply.github.com>
Co-authored-by: Alfredo Bonilla <info@alfredobonilla.com>
Co-authored-by: Jonatan Chaverri <jonatan.chaverri@kyndryl.com>
  • Loading branch information
4 people authored Dec 5, 2024
1 parent b123d11 commit bb393dc
Show file tree
Hide file tree
Showing 7 changed files with 516 additions and 0 deletions.
429 changes: 429 additions & 0 deletions apps/snfoundry/contracts/src/Marketplace.cairo

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions apps/snfoundry/contracts/src/lib.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mod cofi_collection;
mod marketplace;

mod test {
mod test_cofi_collection;
Expand Down
Empty file.
15 changes: 15 additions & 0 deletions apps/snfoundry/scripts-ts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,21 @@ const deployScript = async (): Promise<void> => {
upgrader: deployer.address,
},
});
// Deploy Marketplace
await deployContract({
contract: "Marketplace.cairo",
contractName: "Marketplace",
// TODO: incluide constructor args for deploy
// cofi_collection_address: ContractAddress
// cofi_vault_address: ContractAddress
// strk_contract: ContractAddress
constructorArgs: {
cofi_collection_address: deployer.address,
cofi_vault_address: deployer.address,
strk_contract: deployer.address,
admin: deployer.address,
},
});
};

deployScript()
Expand Down
8 changes: 8 additions & 0 deletions apps/web/src/contracts/configExternalContracts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* This file is autogenerated by Scaffold-Stark.
* You should not edit it manually or your changes might be overwritten.
*/

const configExternalContracts = {} as const;

export default configExternalContracts;
8 changes: 8 additions & 0 deletions apps/web/src/contracts/deployedContracts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* This file is autogenerated by Scaffold-Stark.
* You should not edit it manually or your changes might be overwritten.
*/

const deployedContracts = {} as const;

export default deployedContracts;
55 changes: 55 additions & 0 deletions apps/web/src/contracts/predeployedContracts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/**
* This file is autogenerated by Scaffold-Stark.
* You should not edit it manually or your changes might be overwritten.
*/

import {
devnetEthClassHash,
devnetStrkClassHash,
universalEthAddress,
sepoliaMainnetEthClassHash,
universalStrkAddress,
sepoliaMainnetStrkClassHash,
universalErc20Abi,
} from "../utils/Constants";

const preDeployedContracts = {
devnet: {
Eth: {
address: universalEthAddress,
abi: universalErc20Abi,
classHash: devnetEthClassHash,
},
Strk: {
address: universalStrkAddress,
abi: universalErc20Abi,
classHash: devnetStrkClassHash,
},
},
sepolia: {
Eth: {
address: universalEthAddress,
abi: universalErc20Abi,
classHash: sepoliaMainnetEthClassHash,
},
Strk: {
address: universalStrkAddress,
abi: universalErc20Abi,
classHash: sepoliaMainnetStrkClassHash,
},
},
mainnet: {
Eth: {
address: universalEthAddress,
abi: universalErc20Abi,
classHash: sepoliaMainnetEthClassHash,
},
Strk: {
address: universalStrkAddress,
abi: universalErc20Abi,
classHash: sepoliaMainnetStrkClassHash,
},
},
} as const;

export default preDeployedContracts;

0 comments on commit bb393dc

Please sign in to comment.