1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

Merge pull request #63 from oceanprotocol/feature/contracts

Feature/contracts
This commit is contained in:
Ahmed Ali 2020-06-16 18:56:02 +02:00 committed by GitHub
commit 40cf27f6dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 604 deletions

View File

@ -45,8 +45,8 @@
"whatwg-url": "^8.0.0"
},
"devDependencies": {
"@oceanprotocol/contracts": "^0.2.0",
"@release-it/bumper": "^1.1.0",
"@oceanprotocol/contracts": "0.2.0",
"@truffle/hdwallet-provider": "^1.0.33",
"@types/chai": "^4.2.11",
"@types/chai-spies": "^1.0.1",

View File

@ -1,7 +1,6 @@
import Account from '../ocean/Account'
const defaultFactoryABI = require('../datatokens/FactoryABI.json')
const defaultDatatokensABI = require('../datatokens/DatatokensABI.json')
const defaultFactoryABI = require('@oceanprotocol/artifacts/development/Factory.json')
const defaultDatatokensABI = require('@oceanprotocol/artifacts/development/DatatokenTemplate.json')
/**
* Provides a interface to DataTokens

View File

@ -1,450 +0,0 @@
[
{
"constant": false,
"inputs": [
{
"name": "spender",
"type": "address"
},
{
"name": "value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "from",
"type": "address"
},
{
"name": "to",
"type": "address"
},
{
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "spender",
"type": "address"
},
{
"name": "addedValue",
"type": "uint256"
}
],
"name": "increaseAllowance",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "spender",
"type": "address"
},
{
"name": "subtractedValue",
"type": "uint256"
}
],
"name": "decreaseAllowance",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "to",
"type": "address"
},
{
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "owner",
"type": "address"
},
{
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "name",
"type": "string"
},
{
"name": "symbol",
"type": "string"
},
{
"name": "minter",
"type": "address"
},
{
"name": "cap",
"type": "uint256"
},
{
"name": "blob",
"type": "string"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "from",
"type": "address"
},
{
"indexed": true,
"name": "to",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "owner",
"type": "address"
},
{
"indexed": true,
"name": "spender",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"name": "name",
"type": "string"
},
{
"name": "symbol",
"type": "string"
},
{
"name": "minter",
"type": "address"
},
{
"name": "cap",
"type": "uint256"
},
{
"name": "blob",
"type": "string"
}
],
"name": "initialize",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "account",
"type": "address"
},
{
"name": "value",
"type": "uint256"
}
],
"name": "mint",
"outputs": [],
"payable": true,
"stateMutability": "payable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "pause",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "unpause",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "minter",
"type": "address"
}
],
"name": "setMinter",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "symbol",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "blob",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "decimals",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "cap",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "account",
"type": "address"
}
],
"name": "isMinter",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "isInitialized",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "isPaused",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
]

View File

@ -1,150 +0,0 @@
[
{
"constant": true,
"inputs": [
{
"name": "str1",
"type": "string"
},
{
"name": "str2",
"type": "string"
}
],
"name": "concatenateStrings",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "value",
"type": "uint256"
}
],
"name": "uintToString",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"name": "_template",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "newTokenAddress",
"type": "address"
},
{
"indexed": false,
"name": "templateAddress",
"type": "address"
},
{
"indexed": false,
"name": "tokenName",
"type": "string"
}
],
"name": "TokenCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "tokenAddress",
"type": "address"
},
{
"indexed": true,
"name": "tokenName",
"type": "string"
},
{
"indexed": true,
"name": "tokenSymbol",
"type": "string"
},
{
"indexed": false,
"name": "tokenCap",
"type": "uint256"
},
{
"indexed": false,
"name": "RegisteredBy",
"type": "address"
},
{
"indexed": false,
"name": "RegisteredAt",
"type": "uint256"
},
{
"indexed": false,
"name": "blob",
"type": "string"
}
],
"name": "TokenRegistered",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "instance",
"type": "address"
}
],
"name": "InstanceDeployed",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"name": "blob",
"type": "string"
}
],
"name": "createToken",
"outputs": [
{
"name": "token",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
]