This example showcases how to write multiple Starknet contracts within a single Scarb package.
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
// SPDX-License-Identifier: Apache-2.0 | |
pragma solidity ^0.8.0; | |
/// @author thirdweb | |
import { ERC1155 } from "../eip/ERC1155.sol"; | |
import "../extension/ContractMetadata.sol"; | |
import "../extension/Multicall.sol"; | |
import "../extension/Ownable.sol"; |
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
// SPDX-License-Identifier: Apache-2.0 | |
pragma solidity ^0.8.0; | |
/// @author thirdweb | |
import "../external-deps/openzeppelin/token/ERC20/extensions/ERC20Permit.sol"; | |
import "../extension/ContractMetadata.sol"; | |
import "../extension/Multicall.sol"; | |
import "../extension/Ownable.sol"; |
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
// SPDX-License-Identifier: Apache-2.0 | |
pragma solidity ^0.8.0; | |
/// @author thirdweb | |
import "../external-deps/openzeppelin/token/ERC20/extensions/ERC20Permit.sol"; | |
import "../extension/ContractMetadata.sol"; | |
import "../extension/Multicall.sol"; | |
import "../extension/Ownable.sol"; |
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
ref: refs/heads/main |
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
{ | |
"overrides": [ | |
{ | |
"files": "*.sol", | |
"options": { | |
"printWidth": 80, | |
"tabWidth": 4, | |
"useTabs": false, | |
"singleQuote": false, | |
"bracketSpacing": false |
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
ref: refs/heads/main |
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
{ | |
function allocate_unbounded() -> memPtr { | |
memPtr := mload(64) | |
} | |
function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() { | |
revert(0, 0) | |
} |
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
{ | |
function array_length_t_string_memory_ptr(value) -> length { | |
length := mload(value) | |
} | |
function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos { | |
mstore(pos, length) |
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
{ | |
"overrides": [ | |
{ | |
"files": "*.sol", | |
"options": { | |
"printWidth": 80, | |
"tabWidth": 4, | |
"useTabs": false, | |
"singleQuote": false, | |
"bracketSpacing": false |
NewerOlder