forked from AmazingAng/WTF-Solidity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImport.sol
More file actions
23 lines (20 loc) · 719 Bytes
/
Import.sol
File metadata and controls
23 lines (20 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;
// Importar por localização relativa do arquivo
import './Yeye.sol';
// Importar um contrato específico através do `símbolo global`
import {Yeye} from './Yeye.sol';
// Por meio de um URL de referência
//github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol';
// Importar contrato OpenZeppelin
import '@openzeppelin/contracts/access/Ownable.sol';
contract Import {
// Sucesso ao importar a biblioteca Address
using Address for address;
// Declarando a variável yeye
Yeye yeye = new Yeye();
// Testar se é possível chamar a função do yeye
function test() external{
yeye.hip();
}
}