Skip to content

Commit

Permalink
Merge pull request #7 from Polymarket/fix/updated-contracts
Browse files Browse the repository at this point in the history
Fix: update addresses, tests, abi
  • Loading branch information
JonathanAmenechi authored Sep 26, 2022
2 parents 69b3bcb + 67aa7a8 commit d6dac7f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions pkg/builder/exchange_order_builder_impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func TestBuildOrderHash(t *testing.T) {
assert.NoError(t, err)
assert.NotNil(t, orderHash)

expectedOrderHash := common.Hex2Bytes("41ae598a16959ad2f14e9a610f7861948ad502479ca7a49d1c744de310f7be88")
expectedOrderHash := common.Hex2Bytes("bf58957703791db2ab057528d03d1cff5375d9a475b14a9073bb7d892398dc96")
assert.Equal(t, expectedOrderHash, orderHash[:])
}

Expand Down Expand Up @@ -175,7 +175,7 @@ func TestBuildOrderSignature(t *testing.T) {
assert.NoError(t, err)
assert.NotNil(t, orderSignature)

expectedSignature := common.Hex2Bytes("748008725feeb87db204b2b237869f09176a756abfcb03f9b66e833e80effbcf22c1564cbf18bf8daa88db2ea95eeb6057938bf6bdee7e3708655aa34842db3d1c")
expectedSignature := common.Hex2Bytes("3874d2cfe79c0e82577f4f76ec58d950522ee5923a6f08441927d382c8178a5a2190fd4d5c49705e94d75999a58ec843f94a432e87ebc15cdb2186d315b3cc201b")
assert.Equal(t, expectedSignature, orderSignature)
}

Expand Down Expand Up @@ -239,6 +239,6 @@ func TestBuildSignedOrder(t *testing.T) {
assert.Equal(t, signedOrder.SignatureType.String(), "0")
assert.NotEmpty(t, hex.EncodeToString(signedOrder.Signature))

expectedSignature := common.Hex2Bytes("748008725feeb87db204b2b237869f09176a756abfcb03f9b66e833e80effbcf22c1564cbf18bf8daa88db2ea95eeb6057938bf6bdee7e3708655aa34842db3d1c")
expectedSignature := common.Hex2Bytes("3874d2cfe79c0e82577f4f76ec58d950522ee5923a6f08441927d382c8178a5a2190fd4d5c49705e94d75999a58ec843f94a432e87ebc15cdb2186d315b3cc201b")
assert.Equal(t, expectedSignature, signedOrder.Signature)
}
4 changes: 2 additions & 2 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ type Contracts struct {
func GetContracts(chainId int64) (*Contracts, error) {
var (
MUMBAI_CONTRACTS = &Contracts{
Exchange: common.HexToAddress("0xfffd6f0dB1ec30A58884B23546B4F1bB333f818f"),
Exchange: common.HexToAddress("0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E"),
Collateral: common.HexToAddress("0x2E8DCfE708D44ae2e406a1c02DFE2Fa13012f961"),
Conditional: common.HexToAddress("0x7D8610E9567d2a6C9FBf66a5A13E9Ba8bb120d43"),
}

MATIC_CONTRACTS = &Contracts{
Exchange: common.HexToAddress("0xfffd6f0dB1ec30A58884B23546B4F1bB333f818f"),
Exchange: common.HexToAddress("0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E"),
Collateral: common.HexToAddress("0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"),
Conditional: common.HexToAddress("0x4D97DCd97eC945f40cF65F87097ACe5EA0476045"),
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import (
func TestGetContracts(t *testing.T) {
var (
mumbai = &Contracts{
Exchange: common.HexToAddress("0xfffd6f0dB1ec30A58884B23546B4F1bB333f818f"),
Exchange: common.HexToAddress("0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E"),
Collateral: common.HexToAddress("0x2E8DCfE708D44ae2e406a1c02DFE2Fa13012f961"),
Conditional: common.HexToAddress("0x7D8610E9567d2a6C9FBf66a5A13E9Ba8bb120d43"),
}

matic = &Contracts{
Exchange: common.HexToAddress("0xfffd6f0dB1ec30A58884B23546B4F1bB333f818f"),
Exchange: common.HexToAddress("0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E"),
Collateral: common.HexToAddress("0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"),
Conditional: common.HexToAddress("0x4D97DCd97eC945f40cF65F87097ACe5EA0476045"),
}
Expand Down
Loading

0 comments on commit d6dac7f

Please sign in to comment.