Skip to content

Instantly share code, notes, and snippets.

@Ernesto-tha-great
Created July 19, 2024 15:18
Show Gist options
  • Save Ernesto-tha-great/dbed048a68a27f15ee13d245ca15d528 to your computer and use it in GitHub Desktop.
Save Ernesto-tha-great/dbed048a68a27f15ee13d245ca15d528 to your computer and use it in GitHub Desktop.
[
{
"type": "constructor",
"inputs": [
{
"name": "_propertyNFT",
"type": "address",
"internalType": "address"
},
{ "name": "_okidoToken", "type": "address", "internalType": "address" }
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "buyShares",
"inputs": [
{ "name": "tokenId", "type": "uint256", "internalType": "uint256" },
{ "name": "shares", "type": "uint256", "internalType": "uint256" }
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "createProperty",
"inputs": [
{ "name": "name", "type": "string", "internalType": "string" },
{ "name": "symbol", "type": "string", "internalType": "string" },
{ "name": "uri", "type": "string", "internalType": "string" },
{ "name": "totalShares", "type": "uint256", "internalType": "uint256" },
{
"name": "pricePerShare",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "getUserProperties",
"inputs": [
{ "name": "user", "type": "address", "internalType": "address" }
],
"outputs": [
{ "name": "", "type": "uint256[]", "internalType": "uint256[]" }
],
"stateMutability": "view"
},
{
"type": "function",
"name": "listProperties",
"inputs": [],
"outputs": [
{
"name": "",
"type": "tuple[]",
"internalType": "struct OkidoFinance.Property[]",
"components": [
{ "name": "tokenId", "type": "uint256", "internalType": "uint256" },
{
"name": "fractionalContract",
"type": "address",
"internalType": "contract FractionalOwnership"
},
{
"name": "pricePerShare",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "totalShares",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "sharesSold",
"type": "uint256",
"internalType": "uint256"
},
{ "name": "name", "type": "string", "internalType": "string" },
{ "name": "uri", "type": "string", "internalType": "string" }
]
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "okidoToken",
"inputs": [],
"outputs": [
{ "name": "", "type": "address", "internalType": "contract IERC20" }
],
"stateMutability": "view"
},
{
"type": "function",
"name": "owner",
"inputs": [],
"outputs": [{ "name": "", "type": "address", "internalType": "address" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "properties",
"inputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
"outputs": [
{ "name": "tokenId", "type": "uint256", "internalType": "uint256" },
{
"name": "fractionalContract",
"type": "address",
"internalType": "contract FractionalOwnership"
},
{
"name": "pricePerShare",
"type": "uint256",
"internalType": "uint256"
},
{ "name": "totalShares", "type": "uint256", "internalType": "uint256" },
{ "name": "sharesSold", "type": "uint256", "internalType": "uint256" },
{ "name": "name", "type": "string", "internalType": "string" },
{ "name": "uri", "type": "string", "internalType": "string" }
],
"stateMutability": "view"
},
{
"type": "function",
"name": "propertyCounter",
"inputs": [],
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "propertyNFT",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract OkidoPropertyNFT"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "userProperties",
"inputs": [
{ "name": "", "type": "address", "internalType": "address" },
{ "name": "", "type": "uint256", "internalType": "uint256" }
],
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
"stateMutability": "view"
},
{
"type": "event",
"name": "PropertyCreated",
"inputs": [
{
"name": "tokenId",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "fractionalContract",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "pricePerShare",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "name",
"type": "string",
"indexed": false,
"internalType": "string"
},
{
"name": "uri",
"type": "string",
"indexed": false,
"internalType": "string"
}
],
"anonymous": false
},
{
"type": "event",
"name": "SharesPurchased",
"inputs": [
{
"name": "tokenId",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "buyer",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "shares",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment