Skip to content

Commit

Permalink
App abstraction (go changes) (#2349)
Browse files Browse the repository at this point in the history
* Update `generate.go`

* Regenerate `sin-executor`

* Update Example App references

* Use non-zero period in tests

* Use `GetMessageFee` for setting the message value

* Use non-zero gas airdrop amount in tests
  • Loading branch information
ChiTimesChi authored Mar 22, 2024
1 parent f697db0 commit 2f21dcb
Show file tree
Hide file tree
Showing 15 changed files with 9,436 additions and 3,839 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sin-executor/contracts/mocks/executionfeesmock/generate.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package executionfeesmock

//go:generate go run github.com/synapsecns/sanguine/tools/abigen generate --sol ../../../../packages/contracts-communication/flattened/ExecutionfeesMock.sol --pkg executionfeesmock --sol-version 0.8.20 --filename executionfeesmock --evm-version istanbul
//go:generate go run github.com/synapsecns/sanguine/tools/abigen generate --sol ../../../../packages/contracts-communication/flattened/ExecutionFeesMock.sol --pkg executionfeesmock --sol-version 0.8.20 --filename executionfeesmock --evm-version istanbul
2 changes: 1 addition & 1 deletion sin-executor/contracts/mocks/interchainapp/generate.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package interchainapp

//go:generate go run github.com/synapsecns/sanguine/tools/abigen generate --sol ../../../../packages/contracts-communication/flattened/InterchainAppExample.sol --pkg interchainapp --sol-version 0.8.20 --filename interchainapp --evm-version istanbul
//go:generate go run github.com/synapsecns/sanguine/tools/abigen generate --sol ../../../../packages/contracts-communication/flattened/ExampleAppV1.sol --pkg interchainapp --sol-version 0.8.20 --filename interchainapp --evm-version istanbul
8 changes: 4 additions & 4 deletions sin-executor/contracts/mocks/interchainapp/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

// InterchainAppMockRef is a reference to an interchain db.
type InterchainAppMockRef struct {

Check failure on line 12 in sin-executor/contracts/mocks/interchainapp/helpers.go

View workflow job for this annotation

GitHub Actions / Lint (sin-executor)

type name will be used as interchainapp.InterchainAppMockRef by other packages, and that stutters; consider calling this MockRef (golint)
*InterchainAppExample
*ExampleAppV1
// address of the interchain client
address common.Address
}
Expand All @@ -22,13 +22,13 @@ func (i *InterchainAppMockRef) Address() common.Address {

// NewInterchainAppRef creates a new interchain client with a contract ref.
func NewInterchainAppRef(address common.Address, backend bind.ContractBackend) (*InterchainAppMockRef, error) {
instance, err := NewInterchainAppExample(address, backend)
instance, err := NewExampleAppV1(address, backend)
if err != nil {
return nil, fmt.Errorf("could not create instance of InterchainClient: %w", err)
}
return &InterchainAppMockRef{
InterchainAppExample: instance,
address: address,
ExampleAppV1: instance,
address: address,
}, nil
}

Expand Down
Loading

0 comments on commit 2f21dcb

Please sign in to comment.