Skip to content

Commit

Permalink
Merge pull request #106 from unification-com/shibarium
Browse files Browse the repository at this point in the history
Add support for Shibarium
  • Loading branch information
Codegnosis authored Sep 15, 2023
2 parents 4bffeba + 158e23d commit 9b0e60b
Show file tree
Hide file tree
Showing 12 changed files with 818 additions and 180 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/make -f

abigen:
npx truffle run abigen
abigen --abi smart-contracrts/abigenBindings/abi/Router.abi --pkg ooo_router --out go-ooo/ooo_router/ooo_router.go
cd smart-contracts && npx truffle run abigen
abigen --abi smart-contracts/abigenBindings/abi/Router.abi --pkg ooo_router --out go-ooo/ooo_router/ooo_router.go

# Dev environment
dev-env:
Expand Down
2 changes: 1 addition & 1 deletion docker/assets/request-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ module.exports = async function (callback) {
console.log("requesting", data)
receipt = await demoConsumer.requestData(endpoint, pair, { from: consumerOwner })
console.log("tx hash", receipt.tx)
const requestId = receipt.receipt.rawLogs[2].topics[3]
const requestId = receipt.receipt.rawLogs[1].topics[3]
console.log("requestId", requestId)

console.log("waiting for fulfilment. This may take 3 - 4 blocks.")
Expand Down
8 changes: 1 addition & 7 deletions go-ooo/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@ var keystorePass string
// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "app",
Short: "A brief description of your application",
Long: `A longer description that spans multiple lines and likely contains
examples and usage of using your application. For example:
Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
Short: "OoO Provider Application",
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
return server.InterceptConfigsPreRunHandler(cmd)
},
Expand Down
11 changes: 11 additions & 0 deletions go-ooo/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ func (c *Config) InitForNet(network string) {
case "dev":
c.InitForDevNet()
break
case "shibarium":
c.InitForShibarium()
break
default:
c.InitForDevNet()
break
Expand Down Expand Up @@ -192,6 +195,14 @@ func (c *Config) InitForPolygon() {
c.Chain.FirstBlock = 24460663
}

func (c *Config) InitForShibarium() {
c.Chain.ContractAddress = "0x2E9ade949900e19735689686E61BF6338a65B881"
c.Chain.EthHttpHost = ""
c.Chain.EthWsHost = ""
c.Chain.NetworkId = 109
c.Chain.FirstBlock = 591096
}

func (c *Config) SetKeystore(path, account string) {
c.Keystore.File = path
c.Keystore.Account = account
Expand Down
Loading

0 comments on commit 9b0e60b

Please sign in to comment.