Skip to content

Commit

Permalink
Upgrades the Soroban XDR to the latest version. (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic authored Aug 7, 2023
1 parent 7c85cc4 commit 3b95892
Show file tree
Hide file tree
Showing 18 changed files with 17,835 additions and 17,596 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ XDR_FILES_CURR= \
Stellar-types.x
XDR_FILES_LOCAL_CURR=$(addprefix xdr/curr/,$(XDR_FILES_CURR))

XDR_BASE_URL_NEXT=https://github.com/stellar/stellar-xdr/raw/e372df9f677961aac04c5a4cc80a3667f310b29f
XDR_BASE_URL_NEXT=https://github.com/stellar/stellar-xdr/raw/ec04dce3983103f8ed8b3b25ef028c08c9d8c59d
XDR_BASE_LOCAL_NEXT=xdr/next
XDR_FILES_NEXT= \
Stellar-SCP.x \
Expand Down
24 changes: 12 additions & 12 deletions src/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,22 +170,22 @@ export function buildAuthEntry(envelope, signature, publicKey) {
address: new Address(publicKey).toScAddress(),
nonce: auth.nonce(),
signatureExpirationLedger: auth.signatureExpirationLedger(),
signatureArgs: [
nativeToScVal(
signature: nativeToScVal(
[
{
public_key: StrKey.decodeEd25519PublicKey(publicKey),
signature
},
{
// force the keys to be interpreted as symbols (expected for
// Soroban [contracttype]s)
type: {
public_key: ['symbol', null],
signature: ['symbol', null]
}
}
)
]
],
// force conversion of map keys to ScSymbol as this is expected by
// custom [contracttype] Rust structures
{
type: {
public_key: ['symbol', null],
signature: ['symbol', null]
}
}
)
})
)
});
Expand Down
12 changes: 7 additions & 5 deletions src/contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ export class Contract {
*/
call(method, ...params) {
return Operation.invokeHostFunction({
func: xdr.HostFunction.hostFunctionTypeInvokeContract([
this.address().toScVal(),
xdr.ScVal.scvSymbol(method),
...params
]),
func: xdr.HostFunction.hostFunctionTypeInvokeContract(
new xdr.InvokeContractArgs({
contractAddress: this.address().toScAddress(),
functionName: method,
args: params
})
),
auth: []
});
}
Expand Down
Loading

0 comments on commit 3b95892

Please sign in to comment.