This repository has been archived by the owner on Sep 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove getter functions for ver to address mapping and make public * Set address to version mapping * Rearrange vars * Move mapping for ver to addr to interface * Remove compiled * Refactor getEventFactoryAddress * Refactor getOracleFactoryAddress * Add name to return values * Change truffle version * Recompile * Add setters for current versions * Add tests for setting indexes * Recompile * Run linter
- Loading branch information
1 parent
ed4146a
commit 064703d
Showing
18 changed files
with
139 additions
and
79 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[{"constant":false,"inputs":[{"name":"_contractAddress","type":"address"}],"name":"setOracleFactoryAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_contractAddress","type":"address"}],"name":"setEventFactoryAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currentEventFactoryIndex","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getLastEventFactoryIndex","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_indexOfAddress","type":"uint16"}],"name":"getOracleFactoryAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bodhiTokenAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"botDecimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getLastOracleFactoryIndex","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"currentOracleFactoryIndex","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"arbitrationLength","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newThreshold","type":"uint256"}],"name":"setStartingOracleThreshold","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"startingOracleThreshold","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"consensusThresholdIncrement","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_indexOfAddress","type":"uint16"}],"name":"getEventFactoryAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenAddress","type":"address"}],"name":"setBodhiTokenAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newLength","type":"uint256"}],"name":"setArbitrationLength","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newIncrement","type":"uint256"}],"name":"setConsensusThresholdIncrement","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_newAddress","type":"address"}],"name":"BodhiTokenAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_index","type":"uint16"},{"indexed":true,"name":"_contractAddress","type":"address"}],"name":"EventFactoryAddressAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_index","type":"uint16"},{"indexed":true,"name":"_contractAddress","type":"address"}],"name":"OracleFactoryAddressAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_previousOwner","type":"address"},{"indexed":true,"name":"_newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}] | ||
[{"constant":false,"inputs":[{"name":"_contractAddress","type":"address"}],"name":"setOracleFactoryAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_contractAddress","type":"address"}],"name":"setEventFactoryAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currentEventFactoryIndex","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"oracleFactoryAddressToVersion","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getLastEventFactoryIndex","outputs":[{"name":"lastEventFactoryIndex","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bodhiTokenAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"botDecimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint16"}],"name":"oracleFactoryVersionToAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint16"}],"name":"eventFactoryVersionToAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getLastOracleFactoryIndex","outputs":[{"name":"lastOracleFactoryIndex","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"eventFactoryAddressToVersion","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"currentOracleFactoryIndex","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"arbitrationLength","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newThreshold","type":"uint256"}],"name":"setStartingOracleThreshold","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"startingOracleThreshold","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"consensusThresholdIncrement","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenAddress","type":"address"}],"name":"setBodhiTokenAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newIndex","type":"uint16"}],"name":"setCurrentEventFactoryIndex","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newIndex","type":"uint16"}],"name":"setCurrentOracleFactoryIndex","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newLength","type":"uint256"}],"name":"setArbitrationLength","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newIncrement","type":"uint256"}],"name":"setConsensusThresholdIncrement","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_newAddress","type":"address"}],"name":"BodhiTokenAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_index","type":"uint16"},{"indexed":true,"name":"_contractAddress","type":"address"}],"name":"EventFactoryAddressAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_index","type":"uint16"},{"indexed":true,"name":"_contractAddress","type":"address"}],"name":"OracleFactoryAddressAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_previousOwner","type":"address"},{"indexed":true,"name":"_newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
60606040526004805460a060020a63ffffffff0219169055620151806005556402540be400600655633b9aca00600755341561003a57600080fd5b3380600160a060020a038116151561005157600080fd5b5060048054600160a060020a031916600160a060020a03929092169190911790556107c9806100816000396000f3006060604052600436106101065763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630634865a811461010b57806306acf31b1461012c578063105845ef1461014b5780632c04da69146101755780632c8d3831146101885780635145e0b6146101be57806352cb21f9146101d157806361437116146101f657806373787b68146102095780638da5cb5b1461021c5780638db8203d1461022f5780639125c20814610242578063a6a5f15814610258578063bb8613c51461026b578063db7acd5e1461027e578063dfff739e14610298578063e893f01b146102b7578063edb9640a146102cd578063f2fde38b146102e3575b600080fd5b341561011657600080fd5b61012a600160a060020a0360043516610302565b005b341561013757600080fd5b61012a600160a060020a03600435166103f7565b341561015657600080fd5b61015e6104ea565b60405161ffff909116815260200160405180910390f35b341561018057600080fd5b61015e6104fb565b341561019357600080fd5b6101a261ffff60043516610531565b604051600160a060020a03909116815260200160405180910390f35b34156101c957600080fd5b6101a2610550565b34156101dc57600080fd5b6101e4610567565b60405190815260200160405180910390f35b341561020157600080fd5b61015e61056c565b341561021457600080fd5b61015e6105a3565b341561022757600080fd5b6101a26105b4565b341561023a57600080fd5b6101e46105c3565b341561024d57600080fd5b61012a6004356105c9565b341561026357600080fd5b6101e46105e9565b341561027657600080fd5b6101e46105ef565b341561028957600080fd5b6101a261ffff600435166105f5565b34156102a357600080fd5b61012a600160a060020a0360043516610614565b34156102c257600080fd5b61012a6004356106b3565b34156102d857600080fd5b61012a6004356106e0565b34156102ee57600080fd5b61012a600160a060020a0360043516610700565b60045460009033600160a060020a0390811691161461032057600080fd5b81600160a060020a038116151561033657600080fd5b6004805461ffff60b060020a918290048116600081815260096020526040908190208054600160a060020a038a1673ffffffffffffffffffffffffffffffffffffffff1990911681179091558554858104851660010190941690940277ffff000000000000000000000000000000000000000000001990931692909217909355919350907f011dcc0d75eca61e4c4cfb8aa7ba2d65f9e3e99d597bf3b1588d73b338a803f59084905161ffff909116815260200160405180910390a2505050565b60045460009033600160a060020a0390811691161461041557600080fd5b81600160a060020a038116151561042b57600080fd5b6004805461ffff60a060020a918290048116600081815260086020526040908190208054600160a060020a038a1673ffffffffffffffffffffffffffffffffffffffff1990911681179091558554858104851660010190941690940275ffff00000000000000000000000000000000000000001990931692909217909355919350907fd80505e9c569278b031e70f516734c6efc3e12a1696ef9f39c75095b3808b4f29084905161ffff909116815260200160405180910390a2505050565b60045460a060020a900461ffff1681565b60045460009060a060020a900461ffff16151561051a5750600061052e565b5060045460a060020a900461ffff16600019015b90565b61ffff16600090815260096020526040902054600160a060020a031690565b6000546401000000009004600160a060020a031681565b600881565b60045460009060b060020a900461ffff16151561058b5750600061052e565b5060045460b060020a900461ffff166000190161052e565b60045460b060020a900461ffff1681565b600454600160a060020a031681565b60055481565b60045433600160a060020a039081169116146105e457600080fd5b600655565b60065481565b60075481565b61ffff16600090815260086020526040902054600160a060020a031690565b60045433600160a060020a0390811691161461062f57600080fd5b80600160a060020a038116151561064557600080fd5b6000805477ffffffffffffffffffffffffffffffffffffffff000000001916640100000000600160a060020a0385811682029290921792839055909104167f1382cfcc04a185218552b17a22c13884b38120016da0ab30a77b904375c2109860405160405180910390a25050565b60045433600160a060020a039081169116146106ce57600080fd5b600081116106db57600080fd5b600555565b60045433600160a060020a039081169116146106fb57600080fd5b600755565b60045433600160a060020a0390811691161461071b57600080fd5b80600160a060020a038116151561073157600080fd5b600454600160a060020a0380841691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a723058204817c2e8834e0fefc863b9e66477f7c8459fe4843050c087ba416233a64ae8760029 | ||
60606040526006805460a060020a63ffffffff0219169055620151806007556402540be400600855633b9aca00600955341561003a57600080fd5b3380600160a060020a038116151561005157600080fd5b5060068054600160a060020a031916600160a060020a0392909216919091179055610959806100816000396000f3006060604052600436106101325763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630634865a811461013757806306acf31b14610158578063105845ef1461017757806325d5bcf8146101a15780632c04da69146101c05780635145e0b6146101d357806352cb21f914610202578063548897e5146102275780635db82dca14610241578063614371161461025b5780636532cd991461026e57806373787b681461028d5780638da5cb5b146102a05780638db8203d146102b35780639125c208146102c6578063a6a5f158146102dc578063bb8613c5146102ef578063dfff739e14610302578063e04080ec14610321578063e5f6673b1461033b578063e893f01b14610355578063edb9640a1461036b578063f2fde38b14610381575b600080fd5b341561014257600080fd5b610156600160a060020a03600435166103a0565b005b341561016357600080fd5b610156600160a060020a03600435166104ad565b341561018257600080fd5b61018a6105b8565b60405161ffff909116815260200160405180910390f35b34156101ac57600080fd5b61018a600160a060020a03600435166105c9565b34156101cb57600080fd5b61018a6105df565b34156101de57600080fd5b6101e6610615565b604051600160a060020a03909116815260200160405180910390f35b341561020d57600080fd5b61021561062c565b60405190815260200160405180910390f35b341561023257600080fd5b6101e661ffff60043516610631565b341561024c57600080fd5b6101e661ffff6004351661064c565b341561026657600080fd5b61018a610667565b341561027957600080fd5b61018a600160a060020a036004351661069e565b341561029857600080fd5b61018a6106b4565b34156102ab57600080fd5b6101e66106c5565b34156102be57600080fd5b6102156106d4565b34156102d157600080fd5b6101566004356106da565b34156102e757600080fd5b6102156106fa565b34156102fa57600080fd5b610215610700565b341561030d57600080fd5b610156600160a060020a0360043516610706565b341561032c57600080fd5b61015661ffff600435166107a5565b341561034657600080fd5b61015661ffff600435166107f3565b341561036057600080fd5b610156600435610843565b341561037657600080fd5b610156600435610870565b341561038c57600080fd5b610156600160a060020a0360043516610890565b60065460009033600160a060020a039081169116146103be57600080fd5b81600160a060020a03811615156103d457600080fd5b6006805461ffff60b060020a91829004811660008181526005602090815260408083208054600160a060020a038c1673ffffffffffffffffffffffffffffffffffffffff199091168117909155808452600b90925291829020805461ffff1916841790558554858104851660010190941690940277ffff000000000000000000000000000000000000000000001990931692909217909355919350907f011dcc0d75eca61e4c4cfb8aa7ba2d65f9e3e99d597bf3b1588d73b338a803f59084905161ffff909116815260200160405180910390a2505050565b60065460009033600160a060020a039081169116146104cb57600080fd5b81600160a060020a03811615156104e157600080fd5b6006805461ffff60a060020a91829004811660008181526004602090815260408083208054600160a060020a038c1673ffffffffffffffffffffffffffffffffffffffff199091168117909155808452600a90925291829020805461ffff1916841790558554858104851660010190941690940275ffff00000000000000000000000000000000000000001990931692909217909355919350907fd80505e9c569278b031e70f516734c6efc3e12a1696ef9f39c75095b3808b4f29084905161ffff909116815260200160405180910390a2505050565b60065460a060020a900461ffff1681565b600b6020526000908152604090205461ffff1681565b60065460009060a060020a900461ffff1615156105fe57506000610612565b5060065460a060020a900461ffff16600019015b90565b6000546401000000009004600160a060020a031681565b600881565b600560205260009081526040902054600160a060020a031681565b600460205260009081526040902054600160a060020a031681565b60065460009060b060020a900461ffff16151561068657506000610612565b5060065460b060020a900461ffff1660001901610612565b600a6020526000908152604090205461ffff1681565b60065460b060020a900461ffff1681565b600654600160a060020a031681565b60075481565b60065433600160a060020a039081169116146106f557600080fd5b600855565b60085481565b60095481565b60065433600160a060020a0390811691161461072157600080fd5b80600160a060020a038116151561073757600080fd5b6000805477ffffffffffffffffffffffffffffffffffffffff000000001916640100000000600160a060020a0385811682029290921792839055909104167f1382cfcc04a185218552b17a22c13884b38120016da0ab30a77b904375c2109860405160405180910390a25050565b60065433600160a060020a039081169116146107c057600080fd5b6006805461ffff90921660a060020a0275ffff000000000000000000000000000000000000000019909216919091179055565b60065433600160a060020a0390811691161461080e57600080fd5b6006805461ffff90921660b060020a0277ffff0000000000000000000000000000000000000000000019909216919091179055565b60065433600160a060020a0390811691161461085e57600080fd5b6000811161086b57600080fd5b600755565b60065433600160a060020a0390811691161461088b57600080fd5b600955565b60065433600160a060020a039081169116146108ab57600080fd5b80600160a060020a03811615156108c157600080fd5b600654600160a060020a0380841691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a7230582040c1ee49901faaad8ff91e081f3c3e12fe1a4aa1cba2db4a8c8d6bb327df15420029 |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.